[GHC] #11031: Record Pattern Synonym Cleanup

I tried to refactor RecSelId to RecSelId [DataCon] Bool but this causes some pain when it comes to the interface files. Next try it is something
#11031: Record Pattern Synonym Cleanup -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: task | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.10.2 Keywords: newcomer | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Ben comments that there are some loose ends with record pattern synonyms. * It's still not clear to me that the free variables produced in rnPatSynBind are correct * Perhaps in the future we want to refactor tc_single to use a function which extends the typechecking environment instead of using setGblEnv * @mpickering's suggested refactoring of RecSelId to RecSelId (Either PatSyn TyCon) Bool described in the comment in TcExpr.hs * There is a TODO in tc_patsyn_finish which should either be clarified so it can be considered actionable, removed, or just fixed The comment from TcExpr was: like RecSelId (Either PatSyn TyCon) Bool with the aim for something better in the future. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11031 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11031: Record Pattern Synonym Cleanup -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: task | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by bgamari: Old description:
Ben comments that there are some loose ends with record pattern synonyms.
* It's still not clear to me that the free variables produced in rnPatSynBind are correct * Perhaps in the future we want to refactor tc_single to use a function which extends the typechecking environment instead of using setGblEnv * @mpickering's suggested refactoring of RecSelId to RecSelId (Either PatSyn TyCon) Bool described in the comment in TcExpr.hs * There is a TODO in tc_patsyn_finish which should either be clarified so it can be considered actionable, removed, or just fixed
The comment from TcExpr was:
I tried to refactor RecSelId to RecSelId [DataCon] Bool but this causes some pain when it comes to the interface files. Next try it is something like RecSelId (Either PatSyn TyCon) Bool with the aim for something better in the future.
I tried to refactor RecSelId to RecSelId [DataCon] Bool but this causes some pain when it comes to the interface files. Next try it is something
New description: Ben comments that there are some loose ends with record pattern synonyms (Phab:D1152), * It's still not clear to me that the free variables produced in `rnPatSynBind` are correct * Perhaps in the future we want to refactor `tc_single` to use a function which extends the typechecking environment instead of using `setGblEnv` * @mpickering's suggested refactoring of `RecSelId` to `RecSelId (Either PatSyn TyCon) Bool` described in the comment in `TcExpr.hs` * There is a TODO in `tc_patsyn_finish` which should either be clarified so it can be considered actionable, removed, or just fixed The comment from TcExpr was: like RecSelId (Either PatSyn TyCon) Bool with the aim for something better in the future. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11031#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11031: Record Pattern Synonym Cleanup -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: task | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * version: 7.10.2 => 7.11 Old description:
Ben comments that there are some loose ends with record pattern synonyms (Phab:D1152),
* It's still not clear to me that the free variables produced in `rnPatSynBind` are correct * Perhaps in the future we want to refactor `tc_single` to use a function which extends the typechecking environment instead of using `setGblEnv` * @mpickering's suggested refactoring of `RecSelId` to `RecSelId (Either PatSyn TyCon) Bool` described in the comment in `TcExpr.hs` * There is a TODO in `tc_patsyn_finish` which should either be clarified so it can be considered actionable, removed, or just fixed
The comment from TcExpr was:
I tried to refactor RecSelId to RecSelId [DataCon] Bool but this causes some pain when it comes to the interface files. Next try it is something like RecSelId (Either PatSyn TyCon) Bool with the aim for something better in the future.
New description: Ben comments that there are some loose ends with record pattern synonyms (Phab:D1152), * It's still not clear to me that the free variables produced in `rnPatSynBind` are correct * Perhaps in the future we want to refactor `tc_single` to use a function which extends the typechecking environment instead of using `setGblEnv` * @mpickering's suggested refactoring of `RecSelId` to `RecSelId (Either PatSyn TyCon) Bool` described in the comment in `TcExpr.hs` * There is a TODO in `tc_patsyn_finish` which should either be clarified so it can be considered actionable, removed, or just fixed The comment from `TcExpr` was:
I tried to refactor `RecSelId `to `RecSelId [DataCon] Bool` but this causes some pain when it comes to the interface files. Next try it is something like `RecSelId (Either PatSyn TyCon) Bool` with the aim for something better in the future.
-- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11031#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11031: Record Pattern Synonym Cleanup -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: task | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj):
@mpickering's suggested refactoring of RecSelId to RecSelId (Either PatSyn TyCon) Bool described in the comment in TcExpr.hs
Is that not done already, using `RecSelParent` rather than the `Either` type? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11031#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11031: Record Pattern Synonym Cleanup -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: task | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by mpickering): * keywords: newcomer => -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11031#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC