
#11345: Template Haskell's handling of infix GADT constructors is broken -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: RyanGlScott Type: bug | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): Hm... I might have been a bit too optimistic in my timeframe estimate. I ran into a very tricky stumbling block when trying to implement this. Namely, what happens when you try to splice an infix `GadtC` into source code in `Convert.hs`? Unlike `InfixC`, the infixity of a GADT constructor depends on the presence of a user-supplied fixity declaration. But AFAIK, there's no way to look up what things have fixity declarations in `CvtM`. I suppose you could just ignore the declaration fixity field of `GadtC` during splicing. But then if you don't also splice in a corresponding fixity declaration, you might actually end up with a non-infix GADT constructor in the end, even if you marked it otherwise. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11345#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler