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:
Compare the underlying pointers of two values for equality.
Returns 1 if the pointers are equal and 0 otherwise.
The two values must be of the same type, of kind Type. See
also reallyUnsafePtrEquality#, which doesn't have such
restrictions.
Compare the underlying pointers of two unlifted values for equality.
This is less dangerous than reallyUnsafePtrEquality, since the
arguments are guaranteed to be evaluated. This means there is no risk
of accidentally comparing a thunk. It's however still more dangerous
than e.g. sameArray#.