The Eq is a type class used to determine equality between 2
instances of the same type. Any 2 instances x and y are equal
if eqv(x, y) is true. Moreover, eqv should form an
equivalence relation.
Tests equality for two values of type A by using the type's
registered Eq instance, falling back to the universal equality
defined by is and IEquals (in funfix-core) in case no such
Eq<A> is implemented.
The
Eqis a type class used to determine equality between 2 instances of the same type. Any 2 instancesxandyare equal ifeqv(x, y)istrue. Moreover,eqvshould form an equivalence relation.Example:
const F = eqOf(Option) F.eqv(Some(1), Some(1)) // true F.eqv(Some(1), None) // falseMUST obey the laws defined in EqLaws.
CREDITS: this type class is inspired by the equivalent in Haskell's standard library and the implementation is inspired by the Typelevel Cats project.