deriving Bits

Simon Peyton Jones simonpj at microsoft.com
Wed Sep 3 06:37:35 UTC 2014


As the GND documentation says, it works for ANY class.  So we can't list them!  It works for classes you define and we don't know about.

Here is the documentation:
http://www.haskell.org/ghc/docs/latest/html/users_guide/deriving.html#newtype-deriving

Simon

| -----Original Message-----
| From: Kazu Yamamoto [mailto:kazu at iij.ad.jp]
| Sent: 03 September 2014 07:35
| To: Simon Peyton Jones
| Cc: ghc-devs at haskell.org
| Subject: Re: deriving Bits
| 
| Hi Simon,
| 
| > Can you give an example?  GHC has no specific code for Bits as far
| > as I know.  Perhaps you are using GeneralisedNewtypeDeriving?  You
| > don't give enough context to say.
| 
| Yes, I'm using GeneralisedNewtypeDeriving. So, my question should be:
| 
| Are there any other classes which can be automatically derived if
| GeneralisedNewtypeDeriving is specified and are not listed in this
| page?
| 
| --Kazu


More information about the ghc-devs mailing list