Proposal: change the Bits instance for Bool to align with other basic types and support branchless calculations

Brandon Allbery allbery.b at
Sun Sep 28 18:49:27 UTC 2014

On Sun, Sep 28, 2014 at 2:45 PM, David Feuer <david.feuer at> wrote:

> I would think what you're trying to do would likely be better with a
> different class, by another name, supporting things like .&&., .||., etc.,
> or maybe even moving && and || into a class. Another direction is to look
> at structures representing other sorts of logics. I just don't see that
> Data.Bits is the right place to try to do these things.

Yes. This is what I was trying to get at with my question; Data.Bits
already has a specific usage, and that usage just doesn't seem to fit the
proposed one; that proposal belongs in a related yet different (and, I
suspect, significantly different once fleshed out) class. Otherwise, we
might well be reinventing the current Enum/Bounded mess or something
similar --- trying to wedge something that looks superficially similar into
an inappropriate structure.

brandon s allbery kf8nh                               sine nomine associates
allbery.b at                                  ballbery at
unix, openafs, kerberos, infrastructure, xmonad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Libraries mailing list