
4 Mar
2011
4 Mar
'11
10:50 a.m.
On Fri, Mar 4, 2011 at 17:37, Chris Smith
The most common use of Ord in real code, to be honest, is to use the value in some data structure like Data.Set.Set or Data.Map.Map, which requires Ord instances. For this purpose, any Ord instance that is compatible with Eq will do fine.
It's true that you can build valid Maps and Sets with any valid instance of Ord that defines a total order that is consistent with Eq, and lookup, membership testing and insert will work. However, there are operations on Maps and Sets which make the order visible to the caller: min, max, splits, folds, etc. --Max