Neil Mitchell wrote:
> instance Eq Foo where
>     (==) (Foo a _) (Foo b _) = (==) a b
[...]
> Please give the sane law that this ordering violates. I can't see any!

The (non-existant) law would be

    (Eq1)   x == y  =>  f x == f y,  for all f of appropriate type

which is analogous to this (existant) law about observational equality:

    (Eq2)   x = y   =>  f x = f y,   for all f of appropriate type

Kalman

----------------------------------------------------------------------
Finally - A spam blocker that actually works.
http://www.bluebottle.com/tag/4

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

Reply via email to