Data type for expressing equivalence in type class laws.
All laws expressed by this sub-project are expressed in
terms of such equivalences.
An Equiv represents a sentence whose truthiness remains
to be proved in testing:
Equiv.of(a, b) <-> a is equivalent to b
Note equivalence may or may not imply equality. Some types
cannot declare an equality operation (e.g. functions, or
Promise because it needs asynchronous execution). Equivalence
simply means that the left hand value can always be substituted
by the right hand value and vice versa, without changing the
output of the program (see referential transparency).
Data type for expressing equivalence in type class laws.
All laws expressed by this sub-project are expressed in terms of such equivalences.
An
Equiv
represents a sentence whose truthiness remains to be proved in testing:Equiv.of(a, b) <-> a is equivalent to b
Note equivalence may or may not imply equality. Some types cannot declare an equality operation (e.g. functions, or
Promise
because it needs asynchronous execution). Equivalence simply means that the left hand value can always be substituted by the right hand value and vice versa, without changing the output of the program (see referential transparency).