
#10598: DeriveAnyClass and GND don't work well together -------------------------------------+------------------------------------- Reporter: osa1 | Owner: RyanGlScott Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Generics 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 RyanGlScott):
That magic somewhat disturbs me, especially since it means a type synonym is not equivalent to its expansion.
But if you think it's better than (backwards-compatibly) extending the
I'm not proposing making these type synonyms expand to something different than what they're defined as above. The only magic comes when it's used in a `deriving` statement—that would cause its underlying (expanded) type to have a different derived //instance//, but the types are honest. parser to reuse keywords... (I guess `default` is a bit of a stretch anyway.) It's not quite backwards-compatible—we'd also have to make a breaking change to `template-haskell` in order to accommodate the presence of these new pragmas. The type synonym approach, however, is only backportable to GHC 7.6. (It should be noted that many uses of this feature would not be usable on older GHCs in the first place, so perhaps this isn't a huge concern.)
In any case, you should also decide how to annotate a `class` definition, which is where I actually suggested a pragma.
I'm not sure what you mean. Are talking about annotating when you should use `DeriveAnyClass` (`DAC`)? Or something else? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10598#comment:25 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler