@@ -63,6 +63,17 @@ maybeToEither def (Just j) = Right j
63maybeToEither def Nothing = Left def
63maybeToEither def Nothing = Left def
66+--------------------------------------------------------------------------------
68+--------------------------------------------------------------------------------
70+instance (Eq a, Eq b) => Eq (Either a b) where
71+ (==) (Left x) (Left y) = x == y
72+ (==) (Right x) (Right y) = x == y
66--------------------------------------------------------------------------------
77--------------------------------------------------------------------------------
67-- Injectivity of constructors
78-- Injectivity of constructors
68--------------------------------------------------------------------------------
79--------------------------------------------------------------------------------