Ord instance for Data.Map?

Henning Thielemann lemming at henning-thielemann.de
Mon May 21 06:46:23 EDT 2007

On Wed, 18 Apr 2007, Isaac Dupree wrote:

> And then what do you do with (set1 `union` set2) where they have
> different comparators?  C++ collections have that think-o, I don't know
> about Java.... the problem being that the comparators are not statically
> required to be "the same", just the same *type*, so, what do you do with
> two different ones?

I expect that local instances of equal types provide equal method
dictionaries, don't they?

However I don't think that local instances solve the problem here. Locally
used (<) for complex numbers should be regarded the same error like (<)
for complex numbers everywhere.

More information about the Libraries mailing list