
There are several packagings of lattices and semilattices strewn across hackage, and not much convergence on any single one. Sent from my iPhone
On May 5, 2018, at 4:54 PM, Matthew Farkas-Dyck
wrote: On 5/5/18, Edward Kmett
wrote: 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?