[Haskell-cafe] Justification for Ord inheriting from Eq?

ajb at spamcop.net ajb at spamcop.net
Fri Apr 7 01:36:15 EDT 2006


G'day all.

Quoting Robert Dockins <robdockins at fastmail.fm>:

> Ewwwwww! Be careful how far you depend on properties of typeclasses, and make
> sure you document it when you do.

The behaviour of NaN actually makes perfect sense when you realise that
it is Not a Number.  Things that are not numbers are incomparable with
things that are.

Yes, NaN can be of type Float.  But it's not a Float.

Cheers,
Andrew Bromage


More information about the Haskell-Cafe mailing list