Data.Map, Data.IntMap documentation

Adrian Hey ahey at
Fri Aug 17 02:57:56 EDT 2007

Benjamin Franksen wrote:
> Adrian Hey wrote:
>> apfelmus wrote:
>>> The Ord-constraint is too limiting for tries. 
>> Well it isn't going to disappear while I'm in charge of GT class :-)
>> Why do you object to it? Ultimately we must be able to test keys
>> for equality at least. Is there a type that is an instance of Eq,
>> but not Ord (or could not reasonably be made an instance of Ord)?
> Data.Typeable.TypeRep

Interesting problem, but I don't see any reason why this could not
be an instance of Ord. Because of the weird Key hack that's there
I guess you'd have to hand write this instance, not derive it.
Then for GT you'd have to either hand write a matching GT instance
or fall back on the less efficient but general purpose OrdGT..

Adrian Hey

More information about the Libraries mailing list