RE: deriving Bits

2014-09-03 Thread Simon Peyton Jones
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.

Simon

| -Original Message-
| From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Kazu
| Yamamoto
| Sent: 03 September 2014 06:48
| To: ghc-devs@haskell.org
| Subject: deriving Bits
| 
| Hi,
| 
| Recently, I found that we can put Bits in deriving. I checked the
| GHC manual but it seems to me that this page does not cover Bits:
| 
|   https://www.haskell.org/ghc/docs/7.8.3/html/users_guide/deriving.h
| tml
| 
| Are there any other classes which can be automatically derived and are
| not listed in this page?
| 
| If the number of such classes is not large, how about adding them to
| this page?
| 
| --Kazu
| ___
| ghc-devs mailing list
| ghc-devs@haskell.org
| http://www.haskell.org/mailman/listinfo/ghc-devs
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: deriving Bits

2014-09-03 Thread 山本和彦
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
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


RE: deriving Bits

2014-09-03 Thread Simon Peyton Jones
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:k...@iij.ad.jp]
| Sent: 03 September 2014 07:35
| To: Simon Peyton Jones
| Cc: ghc-devs@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
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: deriving Bits

2014-09-03 Thread 山本和彦
Simon,

 As the GND documentation says, it works for ANY class.  So we can't
 list them!

Understand. Thanks.

--Kazu
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs