[Haskell-cafe] ANNOUNCE: approximate-equality 1.0 -- Newtype
wrappers for approximate equality
felipe.lessa at gmail.com
Tue Aug 3 06:39:02 EDT 2010
On Tue, Aug 3, 2010 at 7:27 AM, Neil Brown <nccb2 at 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  and appearently Eq doesn't list the laws it should
satisfy, not even '(a == b) == not (a /= b)' is mentioned.
More information about the Haskell-Cafe