
30 Mar
2005
30 Mar
'05
10:57 a.m.
On Tue, 29 Mar 2005 13:20:12 +0200, Johannes Waldmann
What does Ord guarantee?
I hope it is a total ordering compatible with (==) (so that Maps could be elements of Sets etc.) If so, perhaps there should be a comment in the documentation. From reading the source ghc-6.4/libraries/base/Data/Map.hs it is not clear why Eq uses toAscList but Ord uses toList - so perhaps there is some hidden magic?
The magic is rather simple since toList is simly aliased to "toAscList". This is probably better changed to use toAscList. Cheers, JP.