Module

Data.Eq

Package
purescript-prelude
Repository
purescript/purescript-prelude

#Eq Source

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

#(==) Source

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

#notEq Source

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

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

#(/=) Source

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

#Eq1 Source

class Eq1 f  where

The Eq1 type class represents type constructors with decidable equality.

Members

Instances

#notEq1 Source

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

#EqRecord Source

class EqRecord rowlist row  where

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

Members

Instances