NumericPrelude-0.0: An experimental alternative hierarchy of numeric type classesContentsIndex
Algebra.ZeroTestable
Contents
Instances for atomic types
Instances for composed types
Synopsis
class C a where
isZero :: a -> Bool
defltIsZero :: (Eq a, C a) => a -> Bool
Documentation
class C a where
Maybe the naming should be according to Algebra.Unit: Algebra.Zero as module name, and query as method name.
Methods
isZero :: a -> Bool
show/hide Instances
C Double
C Float
C Int
C Integer
C T
C T
(C v0, C v1) => C (v0, v1)
(C v0, C v1, C v2) => C (v0, v1, v2)
(C a, C a) => C (T a)
C a => C (T a)
C a => C (T a)
C a => C (T a)
C a => C (T a)
C v => C [v]
C v => C (T a v)
C v => C (T a v)
C v => C (T a v)
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).
Instances for atomic types
Instances for composed types
Produced by Haddock version 0.7