Proposal: Add hasBitSize to Data.Bits.Bits

Henning Thielemann lemming at
Tue Aug 14 00:26:49 CEST 2012

On Mon, 13 Aug 2012, Johan Tibell wrote:

> On Mon, Aug 13, 2012 at 3:19 PM, Henning Thielemann <lemming at> wrote:
>> If the method of 'FixedBitSize' is named 'bitSize' then only the type
>> signature will be affected (FixedBitSize constraint instead of Bits).
>> Although I don't know whether this is a good solution.
> Imports will have to be modified as well if Bits keeps the name
> 'bitSize' for its method.
> In general these kind of breakages has been very painful in the past.
> Most libraries need to support the last two or three released versions
> of GHC (and thus base) so breaking changes like this are likely to
> result in lots of #ifdefs in client code to paper over the
> differences.

That's true. How about keeping 'bitSize' as it is, maybe deprecate it in 
the future, add maybeBitSize to Bits class and add a new class 
FixedBitSize with method fixedBitSize?

More information about the Libraries mailing list