Proposal: Add hasBitSize to Data.Bits.Bits

Henning Thielemann lemming at henning-thielemann.de
Sun Aug 26 22:53:56 CEST 2012


On Sun, 26 Aug 2012, Ian Lynagh wrote:

> On Wed, Aug 22, 2012 at 07:49:49PM -0400, Edward Kmett wrote:
>>
>> 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


Bit size is always finite in strict data types, isn't it? I suggest a name 
containing "Fixed".



More information about the Libraries mailing list