Data.Map, Data.IntMap documentation

Isaac Dupree isaacdupree at charter.net
Fri Aug 17 15:58:09 EDT 2007


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)?

STRef and similar, I think are in Eq but would need performance 
penalties to be in Ord, since they essentially only contain a pointer to 
their contents, and garbage collection can move and re-order them and 
their contents.

Isaac


More information about the Libraries mailing list