Proposal: Add hasBitSize to Data.Bits.Bits
Henning Thielemann
lemming at henning-thielemann.de
Mon Sep 24 01:28:20 CEST 2012
On Sun, 23 Sep 2012, Ian Lynagh wrote:
> On Wed, Aug 22, 2012 at 07:49:49PM -0400, Edward Kmett wrote:
>>
>> We want to add
>>
>>> class Bits b where
>>> bitSizeMaybe :: b -> Maybe Int
>>
>> and deprecate, but not remove bitSize this iteration, and make a separate
>> class FiniteBits for things with a finite, fixed number of bits:
>>
>>> class Bits b => FiniteBits b where
>>> finiteBitSize :: b -> Int
>>> finiteBitSize = bitSize
>
> I've just pushed a patch implementing what I think the conclusion was.
> Please let me know if you think I got it wrong.
My last comment was, that FiniteBits is not an appropriate name, and then
we arrived at FixedBits:
http://www.haskell.org/pipermail/libraries/2012-August/018349.html
More information about the Libraries
mailing list