Eq β Equality Types
(==) :: a -> a -> Bool
(/=) :: a -> a -> Boolclass Eq a where
(==), (/=) :: a -> a-> Bool
-- Minimal complete definition:
-- (==) or (/=)
x /= y = not (x == y)
x == y = not (x /= y)instance Eq Bool where
False == True = False
True == False = False
_ == _ = True
-- or using the (/=) method
instance Eq Bool where
False /= True = True
True /= False = True
_ /= _ = FalseLast updated