@@ -425,6 +425,12 @@ module Data.Maybe where
425 show (Just x) = "Just " ++ (show x)
425 show (Just x) = "Just " ++ (show x)
426 show Nothing = "Nothing"
426 show Nothing = "Nothing"
428+ instance eqMaybe :: (Eq a) => Eq (Maybe a) where
429+ (==) Nothing Nothing = true
430+ (==) (Just a1) (Just a2) = a1 == a2
432+ (/=) a b = not (a == b)
428module Data.Either where
434module Data.Either where
430 import Prelude
436 import Prelude
@@ -452,6 +458,12 @@ module Data.Either where
452 show (Left x) = "Left " ++ (show x)
458 show (Left x) = "Left " ++ (show x)
453 show (Right y) = "Right " ++ (show y)
459 show (Right y) = "Right " ++ (show y)
461+ instance eqEither :: (Eq a, Eq b) => Eq (Either a b) where
462+ (==) (Left a1) (Left a2) = a1 == a2
463+ (==) (Right b1) (Right b2) = b1 == b2
465+ (/=) a b = not (a == b)
455module Data.Array where
467module Data.Array where
457 import Prelude
469 import Prelude