Remi Turk wrote:
I wouldn't bet on it either:

Prelude> 0.0 == -0.0
True
Prelude> isNegativeZero 0.0 == isNegativeZero (-0.0)
False

Although isNegativeZero might be considered a ``private,
"internal" interface that exposes implementation details.''

Interesting example.

So is the correct conclusion from this that all (polymorphic) code
that assumes (x == y) = True implies x=y is inherently broken,
or is just this particular Eq instance that's broken?

Regards
--
Adrian Hey


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to