
5 May
2018
5 May
'18
4:54 p.m.
On 5/5/18, Edward Kmett
In that same light, we're also missing packaged monoids for the bitwise (.|.), (.&.), xor (and the non-existent xnor) from Data.Bits.
I defined a `BitSet` type in my alg package: http://hackage.haskell.org/package/alg (Building docs failed, so here is the definition: `newtype BitSet a = BitSet { bits :: a }`) The `Monoid` instance is (`False`, `xor`) (wasn't thinking about xnor, stupid me). I was also trying to define `Monoid` instances for `Min (BitSet a)` and `Max (BitSet a)` but alas, they overlap, tho `BitSet` is not `Ord` (so usual instances are useless). Maybe we want a `Lattice` class?