Proposal: Add hasBitSize to Data.Bits.Bits
Johan Tibell
johan.tibell at gmail.com
Tue Aug 14 00:21:56 CEST 2012
On Mon, Aug 13, 2012 at 3:19 PM, Henning Thielemann
<lemming at henning-thielemann.de> wrote:
>
> On Mon, 13 Aug 2012, Johan Tibell wrote:
>
>> On Mon, Aug 13, 2012 at 2:48 PM, Henning Thielemann
>> <lemming at henning-thielemann.de> wrote:
>>>
>>> How about two versions of 'bitSize' - one with Maybe return type in the
>>> Bits
>>> class and one without Maybe in a FixedBitSize subclass?
>>
>>
>> Is this worth breaking existing users of bitSize over?
>
>
> 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. Perhaps I'm getting old and cranky but I more in the
never-break-anything camp than I used to be.
-- Johan
More information about the Libraries
mailing list