Subsumption in partially ordered sets

Tom Pledger Tom.Pledger at
Tue Nov 18 09:14:07 EST 2003

Graham Klyne writes:
 | Below is some code I have written, which works, but I'm not sure
 | that it's especially efficient or elegant.  Are there any published
 | Haskell libraries that contain something like this?


Partially ordered sets are in cahoots with lattices, so you may be
interested in .

And here's some off-the-cuff feedback...

How about using Maybe Ordering, instead of a new data type?
(As in

Instead of hard-wiring Maybe into the element type in dropSubsumed,
how about passing in a partial comparison function?

    dropSubsumedBy :: (a -> a -> Maybe Ordering) -> [a] -> [a]

- Tom

More information about the Haskell-Cafe mailing list