haskellari / lattices

Fine-grained lattice primitives for Haskell
BSD 3-Clause "New" or "Revised" License
35 stars 15 forks source link

PartialOrd a => PartialOrd (Lifted a)? #71

Closed ocharles closed 5 years ago

ocharles commented 5 years ago

https://hackage.haskell.org/package/lattices-1.7.1.1/docs/Algebra-Lattice-Lifted.html grafts a new least onto an unbounded lattice. Should this have a PartialOrd instance, such that leq Bottom x = True for all x?

ocharles commented 5 years ago

I note it's also lacking a Universe instance, which seems fine if we have Universe a (just fmap Lift over the existing universe and add Bottom).

phadej commented 5 years ago

is there instances for Dropped or Leviated (and other wrappers). The PR for adding them will be welcomed

ocharles commented 5 years ago

Great, I'll get you a PR. I just wanted to make sure they made sense. Levitated and Dropped also lack these.

phadej commented 5 years ago

Done in https://github.com/phadej/lattices/commit/787b093eeb046a8c8e708e9a547c4d20dbb67b76