Add Ord Laws to next Haskell Report

Henning Thielemann lemming at henning-thielemann.de
Fri Feb 8 00:19:48 UTC 2019


On Thu, 7 Feb 2019, Andrew Butterfield wrote:

> Imagine trying to define the obvious partial ordering on sets - i.e. 
> subset-or-equal using the Ord class. What should be the result, for 
> Instance Ord (Set Int) of
> 
> compare (fromList [1]) (fromList [2])    or  fromList [2] <= fromList [1] ?

Partial ordering means to me that the comparison function is partial.
I.e. fromList [2] <= fromList [1] would be "undefined".


More information about the Libraries mailing list