S.D.Mechveliani writes:
 > Tom Pledger <[EMAIL PROTECTED]>  writes
 > 
 > > May we please have a partial order class in Haskell at some stage?  It
 > > can be done outside the prelude (see below), but would be nicer inside
 > > (see below, removing all the tildes and primes).
 > > 
 > [...]
 > 
 > 
 > Year and half ago all these things, and many others, were suggested 
 > in
 >    http://www.botik.ru/pub/local/Mechveliani/basAlgPropos/
 > 
 > There the partial ordering was  compare_m :: a -> a -> Maybe Ordering

Hi.

Thanks for the pointer.  I apologise for not remembering it.

For the partial comparison function, Maybe Ordering is a better return
type than PartialOrdering.

An afterthought:
  The partial order class should be derivable, if it becomes the home
of (<=).  The derivation should be like Ord's, except that when a
comparison of constituent values returns Nothing, the overall
comparison also returns Nothing.  That way, there's the least
disruption to existing types which derive Ord.

Regards,
Tom

Reply via email to