
3 Aug
2010
3 Aug
'10
6:39 a.m.
On Tue, Aug 3, 2010 at 7:27 AM, Neil Brown
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#... Cheers, =) -- Felipe.