
Friends Just a heads-up. Pedro is working on implementing "Generic Defaults", as described in his Haskell Symposium 2010 paper www.dreixel.net/research/pdf/gdmh_nocolor.pdf It will replace (and improve on) the "Derivable type classes" stuff in GHC at the moment, which was originally presented in a paper of that title that Ralf and I wrote in the 2000 Haskell workshop http://research.microsoft.com/en-us/um/people/simonpj/papers/derive.htm. The "Derivable type class" extension is barely used, I believe, and isn't even documented in the manual. So I propose to switch from one to the other, rather than to try to support both. This change will happen in GHC 7.2 or 7.4, depending on when Pedro is done. Please yell if you are a secret user of derivable type classes, so this change would discombobulate you. Simon

Hi,
2011/2/9 Simon Peyton-Jones
Friends
Just a heads-up. Pedro is working on implementing "Generic Defaults", as described in his Haskell Symposium 2010 paper www.dreixel.net/research/pdf/gdmh_nocolor.pdf
It will replace (and improve on) the "Derivable type classes" stuff in GHC at the moment, which was originally presented in a paper of that title that Ralf and I wrote in the 2000 Haskell workshop http://research.microsoft.com/en-us/um/people/simonpj/papers/derive.htm.
The "Derivable type class" extension is barely used, I believe, and isn't even documented in the manual.
Isn't it this?: http://www.haskell.org/ghc/docs/latest/html/users_guide/generic-classes.html But anyway, I can't remember seeing any use of it. Cheers, Pedro

The "Derivable type class" extension is barely used, I believe, and isn't even documented in the manual.
Isn't it this?: http://www.haskell.org/ghc/docs/latest/html/users_guide/generic-classes.html
Oh yes, silly me. It is documented!
Simon
From: José Pedro Magalhães [mailto:jpm@cs.uu.nl]
Sent: 09 February 2011 12:20
To: Simon Peyton-Jones
Cc: GHC users
Subject: Re: Deriviable type classes
Hi,
2011/2/9 Simon Peyton-Jones

2011/2/9 Simon Peyton-Jones:
Friends
Just a heads-up. Pedro is working on implementing "Generic Defaults", as described in his Haskell Symposium 2010 paper www.dreixel.net/research/pdf/gdmh_nocolor.pdf
It will replace (and improve on) the "Derivable type classes" stuff in GHC at the moment, which was originally presented in a paper of that title that Ralf and I wrote in the 2000 Haskell workshop http://research.microsoft.com/en-us/um/people/simonpj/papers/derive.htm.
The "Derivable type class" extension is barely used, I believe, and isn't even documented in the manual. So I propose to switch from one to the other, rather than to try to support both. This change will happen in GHC 7.2 or 7.4, depending on when Pedro is done.
Please yell if you are a secret user of derivable type classes, so this change would discombobulate you.
The only time I came across a use of it was in James Cheney's FreshLib [1]. I don't know if the latest version still uses it, though. There was also this bug [2] that prevented FreshLib from being compiled, but that is apparently fixed now. [1] http://homepages.inf.ed.ac.uk/jcheney/programs/freshlib/ [2] http://hackage.haskell.org/trac/ghc/ticket/2824 Regards, Sean

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. 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. Thanks, Yitz

Hi,
2011/2/10 Yitzchak Gale
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
participants (4)
-
José Pedro Magalhães
-
Sean Leather
-
Simon Peyton-Jones
-
Yitzchak Gale