Proposal: add new Data.Bits.Bits(bitZero) method (was: Proposal: Explicitly require "Data.Bits.bit (-1) == 0" property)

Edward Kmett ekmett at gmail.com
Thu Feb 27 21:39:27 UTC 2014


I like those laws insofar as they go.

It'd be nice to sit down and specify the rest of the Data.Bits laws some
day. (Not volunteering!)

-Edward


On Wed, Feb 26, 2014 at 8:30 PM, wren ng thornton
<winterkoninkje at gmail.com>wrote:

> I'm +1 for the following slightly extended proposal:
>
> * add zeroBits
> * with default implementation: clearBit (bit 0) 0
> * and requiring the following laws for all n valid for the type:
>     * clearBit zeroBits n == zeroBits
>     * setBit zeroBits n == bit n
>     * testBit zeroBits n == False
>     * popCount zeroBits == 0
>
> --
> Live well,
> ~wren
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140227/60820834/attachment.html>


More information about the Libraries mailing list