| Safe Haskell | Safe |
|---|---|
| Language | Haskell98 |
Algebra.ZeroTestable
Documentation
Maybe the naming should be according to Algebra.Unit:
Algebra.Zero as module name, and query as method name.
Instances
defltIsZero :: (Eq a, C a) => a -> Bool #
Checks if a number is the zero element.
This test is not possible for all C types,
since e.g. a function type does not belong to Eq.
isZero is possible for some types where (==zero) fails
because there is no unique zero.
Examples are
vector (the length of the zero vector is unknown),
physical values (the unit of a zero quantity is unknown),
residue class (the modulus is unknown).