[GHC] #15252: syn_arg_wraps and syn_res_wrap are only populated after typechecking

#15252: syn_arg_wraps and syn_res_wrap are only populated after typechecking -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 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: -------------------------------------+------------------------------------- The definition for `SyntaxExpr` has two fields which are only populated after type checking. `SyntaxExpr` should have an extension point which contains these two fields. {{{ data SyntaxExpr p = SyntaxExpr { syn_expr :: HsExpr p , syn_arg_wraps :: [HsWrapper] , syn_res_wrap :: HsWrapper } }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15252 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15252: syn_arg_wraps and syn_res_wrap are only populated after typechecking -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 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 simonpj): * cc: sh.najd@…, alan.zimm@… (added) Comment: Yes indeed. Cc'ing Alan and Shayan -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15252#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15252: syn_arg_wraps and syn_res_wrap are only populated after typechecking -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 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 alanz): I am pretty sure I tried to do this on two different occasions without success, then left it as an after the fact cleanup. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15252#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15252: syn_arg_wraps and syn_res_wrap are only populated after typechecking -------------------------------------+------------------------------------- Reporter: mpickering | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 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 Shayan-Najd): Thanks for reporting this. I also battled with this before. As far as I remember, all instances of `SyntaxExpr` should be considered as extensions. I am revisiting the current implementation of TTG to match [wiki:ImplementingTreesThatGrow/TreesThatGrowGuidance the idiom]. I will close this ticket once I am done. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15252#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC