Generic instances for GHC AST

Alan & Kim Zimmerman alan.zimm at gmail.com
Wed Jan 14 21:03:21 UTC 2015


At the moment every part of the GHC AST derives instances of Data and
Typeable.

There are no instances of Generic.

If I try to standalone derive these, the derivation eventually fails for

    deriving instance Generic (Name)

because the constructors are not all in scope.

So, does it make sense in GHC to at least derive Generic for the items that
are opaque, and at most to do so for the whole AST.

I know there were some concerns earlier about too many instances being
derived, and its impact on compilation time and memory, so the minimal
version may be best.

This will allow the new generation libraries built around Generics to
perform on GHC data structures too.

Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20150114/26f9b539/attachment.html>


More information about the ghc-devs mailing list