Data.Map, Data.IntMap documentation

Benjamin Franksen benjamin.franksen at
Fri Aug 17 21:33:19 EDT 2007

Adrian Hey wrote:
> Benjamin Franksen wrote:
>> Adrian Hey wrote:
>>> 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.

I asked this question once and got as answer (from one of the Simons, IIRC)
that exposing the obvious Ord instance would break referential
transparency: there is no guarantee that the integer keys and therefore the
order among TypeReps is the same for different runs, even of the same

This (counter-)example may be irrelevant for the discussion at hand or not.
Anyway, you asked for one...


More information about the Libraries mailing list