Default implementations in type classes
Add a /= operation, which defaults to negation
- class Eq a where (==), (/=) :: a -> a -> Bool x /= y = not (x==y)
instance (Eq a,Eq b)=> Eq(a,b) where (x1,y1) == (x2,y2) = x1==x2 and y1 == y2 --inherits default /=, -- but could override