proposal/RFC: add bSwap to base in Data.Bits

Vincent Hanquez tab at
Fri May 17 07:50:37 CEST 2013

On Thu, May 16, 2013 at 03:24:53PM +0200, Bertram Felgenhauer wrote:
> Dear Vincent,
> thanks for working on this proposal.

You're welcome.

> This can't be right, since it ignores the bitSize. In fact, from
> bSwapDefault 1 = 1 one could conclude that the datatype is 1 byte wide.
> bSwapDefault (bSwapDefault 256) = 1 shows that bSwapDefault is not its
> own inverse.

You're absolutely right. not sure what i was thinking when i did the patch to
base after thinking it was not possible to do it without a fixed size.

The function above just fall apart if the "highest" bit is not set.

I'll rework this to depends on FiniteBits.


More information about the Libraries mailing list