Opened 20 months ago

Last modified 13 months ago

#15252 new bug

syn_arg_wraps and syn_res_wrap are only populated after typechecking

Reported by: mpickering Owned by:
Priority: normal Milestone: 8.10.1
Component: Compiler Version: 8.4.3
Keywords: newcomer Cc: sh.najd@…, alan.zimm@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown 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 }  

Change History (5)

comment:1 Changed 20 months ago by simonpj

Cc: sh.najd@… alan.zimm@… added

Yes indeed. Cc'ing Alan and Shayan

comment:2 Changed 20 months ago 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.

comment:3 Changed 20 months ago 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 the idiom. I will close this ticket once I am done.

comment:4 Changed 20 months ago by bgamari


These won't be addressed in GHC 8.6.

comment:5 Changed 13 months ago by osa1


Bumping milestones of low-priority tickets.

Note: See TracTickets for help on using tickets.