Eq implements
is_eq : a, a -> Bool
where a implements Eq
Defines a type that can be compared for total equality.
Total equality means that all values of the type can be compared to each
other, and two values a, b are identical if and only if is_eq(a, b) is
Bool.true.
Not all types support total equality. For example, F32 and F64 can
be a NaN (Not a Number), and the
IEEE-754 floating point standard
specifies that two NaNs are not equal.
is_not_eq : a, a -> Bool
where a implements Eq
This will call the function Bool.is_eq on the inputs, and then Bool.not
on the result. The is equivalent to the logic
XOR gate. The infix operator
!= can also be used as shorthand for Bool.is_not_eq.
Note that is_not_eq does not accept arguments whose types contain
functions.
expect Bool.is_not_eq(Bool.false, Bool.true) == Bool.true
expect (Bool.false != Bool.false) == Bool.false
expect "Apples" != "Oranges"