Skip to content

Eq

Eq is the class of all types that support equality testing of their values. We discussed it in this chapter already.

GHCi
>>> :info Eq
type Eq :: * -> Constraint
class Eq a where
  (==) :: a -> a -> Bool
  (/=) :: a -> a -> Bool
  {-# MINIMAL (==) | (/=) #-}
    -- Defined in ‘GHC.Classes’
[More omitted output]