Alex Ferguson <[EMAIL PROTECTED]> wrote (8 Dec 1997) on Partially annoying orders: > I recently found myself needing a partial order class, and found > that: > The most likely-looking operator symbols are all "taken"; > It'd be desirable to have such a class be a superclass of Ord, but > this isn't possible without hacking the Prelude; > It's not possible to have an instance declaration making all total > orders also partial orders. ... > ... looks like a PartOrd class in the Prelude, and a Jones, P-J and > Meijer-style generalisation of instance declarations would do the > trick. In my program class (Eq a,Show a,Read a) => OrdereSet a where compare_m :: a -> a -> Maybe Order ... compare_m expresses the partial ordering. Further, for many instances of Ord, i define compare_m as agreed with compare: \x y-> Just (compare x y) Indeed, it is better to have a possibility to make Ord a subclass of, say, PartOrd. --------------------- Sergey Mechveliani [EMAIL PROTECTED]