Module

Data.Eq

#Eq

class Eq a  where

The Eq type class represents types which support decidable equality.

Eq instances should satisfy the following laws:

  • Reflexivity: x == x = true
  • Symmetry: x == y = y == x
  • Transitivity: if x == y and y == z then x == z

Note: The Number type is not an entirely law abiding member of this class due to the presence of NaN, since NaN /= NaN. Additionally, computing with Number can result in a loss of precision, so sometimes values that should be equivalent are not.

Members

Instances

#(==)

Operator alias for Data.Eq.eq (non-associative / precedence 4)

#notEq

notEq :: forall a. Eq a => a -> a -> Boolean

notEq tests whether one value is not equal to another. Shorthand for not (eq x y).

#(/=)

Operator alias for Data.Eq.notEq (non-associative / precedence 4)

#Eq1

class Eq1 :: (Type -> Type) -> Constraintclass Eq1 f  where

The Eq1 type class represents type constructors with decidable equality.

Members

Instances

#notEq1

notEq1 :: forall f a. Eq1 f => Eq a => f a -> f a -> Boolean

#EqRecord

class EqRecord :: RowList Type -> Row Type -> Constraintclass EqRecord rowlist row  where

A class for records where all fields have Eq instances, used to implement the Eq instance for records.

Members

Instances

Modules