[Haskell-cafe] Why is Bool no instance of Num and Bits?

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Fri May 8 13:18:37 EDT 2009

On May 8, 2009, at 12:00 , Neil Brown wrote:
> If you change fromInteger in Num Bool to be fromInteger x = x /= 0,  
> then we could all start writing nasty C-like if-expressions...

I'd be strongly tempted to say

 > fromInteger = const False

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090508/1ba55820/PGP.bin

More information about the Haskell-Cafe mailing list