
#10704: Can't lookup fixities of infix types in Template Haskell -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: | RyanGlScott Type: feature request | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.1 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1109 -------------------------------------+------------------------------------- Comment (by goldfire): Now that this is done (see Phab:D1109 -- many thanks!), it looks like it could all be refactored a little more cleanly. What about {{{ module TH.Syntax where ... class ... => Quasi q where ... qReifyFixity :: Name -> q Fixity reifyFixity :: Name -> Q Fixity }}} and then remove all of the `Fixity` fields in `Info`? This should not be a hard change to deal with downstream, and it would declutter things somewhat. It's true that `TyVarI` doesn't have fixities (although they should, morally, except that Haskell provides no way of giving a fixity specification to a type variable), but `PrimTyConI` ''can'' have a fixity: `(->)` has hard-wired fixity `infixr 0`. I'm not wedded to this change, but I do think it's an improvement. Speak up if you have a strong opinion! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10704#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler