Proposal: Add hasBitSize to Data.Bits.Bits
Edward Kmett
ekmett at gmail.com
Tue Aug 14 00:44:13 CEST 2012
I'd be okay with this version of things as well.
Sent from my iPhone
On Aug 13, 2012, at 6:26 PM, Henning Thielemann <lemming at henning-thielemann.de> wrote:
>
> On Mon, 13 Aug 2012, Johan Tibell wrote:
>
>> On Mon, Aug 13, 2012 at 3:19 PM, Henning Thielemann <lemming at henning-thielemann.de> 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