Proposal: Add hasBitSize to Data.Bits.Bits

Johan Tibell johan.tibell at gmail.com
Tue Aug 14 01:08:39 CEST 2012


On Mon, Aug 13, 2012 at 3:42 PM, Edward Kmett <ekmett at gmail.com> wrote:
> Then code that only works for finite cases can use bitSize, code that already worked with infinite cases that never touched bitSize can continue to work, existing users that called bitSize but could only handle finite cases can change to FiniteBits and doesn't need to take a performance hit or fiddling with the Just constructor, and code that can work for the infinite case if it didn't crap out with bottom can safely upgrade to perhapsBitSize.

This will still break client code though. The #ifdefs would then have
to go in the import lists instead. I like Lennart's suggestion to
deprecate 'bitSize' but not remove it.



More information about the Libraries mailing list