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
andy == z
thenx == 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
- Modules
- Control.
Applicative - Control.
Apply - Control.
Bind - Control.
Category - Control.
Monad - Control.
Semigroupoid - Data.
Boolean - Data.
BooleanAlgebra - Data.
Bounded - Data.
Bounded. Generic - Data.
CommutativeRing - Data.
DivisionRing - Data.
Eq - Data.
Eq. Generic - Data.
EuclideanRing - Data.
Field - Data.
Function - Data.
Functor - Data.
Generic. Rep - Data.
HeytingAlgebra - Data.
HeytingAlgebra. Generic - Data.
Monoid - Data.
Monoid. Additive - Data.
Monoid. Conj - Data.
Monoid. Disj - Data.
Monoid. Dual - Data.
Monoid. Endo - Data.
Monoid. Generic - Data.
Monoid. Multiplicative - Data.
NaturalTransformation - Data.
Ord - Data.
Ord. Generic - Data.
Ordering - Data.
Ring - Data.
Ring. Generic - Data.
Semigroup - Data.
Semigroup. First - Data.
Semigroup. Generic - Data.
Semigroup. Last - Data.
Semiring - Data.
Semiring. Generic - Data.
Show - Data.
Show. Generic - Data.
Symbol - Data.
Unit - Data.
Void - Prelude
- Record.
Unsafe - Type.
Data. Row - Type.
Data. RowList - Type.
Proxy