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 17:51:16 UTC 2014

On Sun, Sep 28, 2014 at 1:34 PM, Edward Kmett <ekmett at> wrote:

> I can envision a point in Haskell's future where we might want to let the
> combinators in Data.Bits be the ones we use for Bool, where
> &&/||/and/or/any/all/not/ just smash things together with Bits and we
> generalize more of base.
> That would be an incredibly dumb thing to do with non-short-circuiting
> versions of the operators.
> I for one don't want to cut off that possible future for a 10% gain for a
> limited usecase.

My counter-question is: is it even worth considering this generalization if
it only makes sense for the Bool case? Because none of the other instances

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