On Tue, Aug 3, 2010 at 7:27 AM, Neil Brown <nc...@kent.ac.uk> wrote:
> I like the look of this.  Eq and Ord instances that use epsilon values look
> like they will be handy.  I have a design question/suggestion.  You have:

What properties does Eq need to obey?

Reflexivity: (a == a)
Symmetry: (a == b)  ==  (b == a)
Transitivity: ((a == b) && (b == c)) == (a == c)

An instance using epsilon values clearly is reflexive and symmetric,
but it is not transitive.

I've looked [1] and appearently Eq doesn't list the laws it should
satisfy, not even '(a == b) == not (a /= b)' is mentioned.

[1] 
http://haskell.org/ghc/docs/6.12.1/html/libraries/base-4.2.0.0/Prelude.html#t%3AEq

Cheers, =)

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

Reply via email to