[Haskell-cafe] Bits.bitSize

ALeX Kazik alex at kazik.de
Thu Dec 8 15:44:02 UTC 2016


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.


More information about the Haskell-Cafe mailing list