Eq package:base

The Eq class defines equality (==) and inequality (/=). All the basic datatypes exported by the Prelude are instances of Eq, and Eq may be derived for any datatype whose constituents are also instances of Eq. The Haskell Report defines no laws for Eq. However, instances are encouraged to follow these properties:
  • Reflexivity x == x = True
  • Symmetry x == y = y == x
  • Transitivity if x == y && y == z = True, then x == z = True
  • Extensionality if x == y = True and f is a function whose return type is an instance of Eq, then f x == f y = True
  • Negation x /= y = not (x == y)
Equality
This data type represents an equivalence relation. Equivalence relations are expected to satisfy three laws: The types alone do not enforce these laws, so you'll have to check them yourself.
Definition of propositional equality (:~:). Pattern-matching on a variable of type (a :~: b) produces a proof that a ~ b.
Lift the standard (==) function through the type constructor.
Lift the standard (==) function through the type constructor.
Equality on StableName that does not require that the types of the arguments match.
Type equality
This String equality predicate is used when desugaring pattern-matches against strings.