Proposal: Add hasBitSize to Data.Bits.Bits

Henning Thielemann lemming at
Mon Aug 13 23:48:05 CEST 2012

On Mon, 13 Aug 2012, Edward Kmett wrote:

> Correct. This is not a viable solution for the problem, also it precludes the existance of support for
> someone else's Natural number type, etc.
> Every type that is currently an instance of Bits is either of a fixed size or potentially infinite.
> Changing bitSize to return a Maybe a works. Making a separate BitSize class simply forces me to do exactly
> what I'm doing right now, which is ignore it and manually probe. 

How about two versions of 'bitSize' - one with Maybe return type in the 
Bits class and one without Maybe in a FixedBitSize subclass?

More information about the Libraries mailing list