Deriviable type classes

José Pedro Magalhães jpm at cs.uu.nl
Thu Feb 10 09:49:11 CET 2011


Hi,

2011/2/10 Yitzchak Gale <gale at sefer.org>

> Simon Peyton-Jones wrote:
> > "Generic Defaults"... will replace... the "Derivable type classes"
> > stuff... in GHC 7.2 or 7.4...
> > Please yell if you are a secret user of derivable type classes,
> > so this change would discombobulate you.
>
> Could you give us a preview of the parts of the syntax
> spectrum that will be gobbled up by this? That is a way
> that the change could affect even people who are not using
> the current generics.
>

As far as I understand, only the keyword "generic" will be taken. A new
GHC.Generics module will define many new types with common names like `C`
and `D`; these are used for the generic representation of datatypes in any
module that enables -XGenerics, but there are no clashes unless the
programmer explicitly imports GHC.Generics, so that should be ok.


>
> For example, the old generics knocked a very nice bracket
> out of consideration for TH syntax. It also blessed the names
> of certain magical constructors, which can be good to know
> about even if the magic doesn't leak out of the generics world.
>

I remember there was some strange behavior with a type constructor `1` which
was supposedly caused by the old generics (or was it syb?). Hopefully there
will be nothing like that in the new mechanism.


Cheers,
Pedro


>
> Thanks,
> Yitz
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20110210/13954f3d/attachment.htm>


More information about the Glasgow-haskell-users mailing list