Bits.bitSize

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Bits.bitSize

ALeX Kazik
Hi,

I think it would be a good idea to provide a default implementation
for bitSize, example:

  bitSize b = fromMaybe (error "bitSize is undefined") (bitSizeMaybe b)

The advantage is that from now on new instances of Bits no longer need
to define bitSize.
And once bitSize has been removed there will be no errors about it not
being a method of class Bits.

ALeX.
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.