numeric-prelude-0.4.3: An experimental alternative hierarchy of numeric type classes

Safe HaskellSafe
LanguageHaskell98

Algebra.ZeroTestable

Contents

Synopsis

Documentation

class C a where Source #

Maybe the naming should be according to Algebra.Unit: Algebra.Zero as module name, and query as method name.

Minimal complete definition

isZero

Methods

isZero :: a -> Bool Source #

Instances

C Double Source # 

Methods

isZero :: Double -> Bool Source #

C Float Source # 

Methods

isZero :: Float -> Bool Source #

C Int Source # 

Methods

isZero :: Int -> Bool Source #

C Int8 Source # 

Methods

isZero :: Int8 -> Bool Source #

C Int16 Source # 

Methods

isZero :: Int16 -> Bool Source #

C Int32 Source # 

Methods

isZero :: Int32 -> Bool Source #

C Int64 Source # 

Methods

isZero :: Int64 -> Bool Source #

C Integer Source # 

Methods

isZero :: Integer -> Bool Source #

C Word Source # 

Methods

isZero :: Word -> Bool Source #

C Word8 Source # 

Methods

isZero :: Word8 -> Bool Source #

C Word16 Source # 

Methods

isZero :: Word16 -> Bool Source #

C Word32 Source # 

Methods

isZero :: Word32 -> Bool Source #

C Word64 Source # 

Methods

isZero :: Word64 -> Bool Source #

C T Source # 

Methods

isZero :: T -> Bool Source #

C T Source # 

Methods

isZero :: T -> Bool Source #

C T Source # 

Methods

isZero :: T -> Bool Source #

C T Source # 

Methods

isZero :: T -> Bool Source #

C v => C [v] Source # 

Methods

isZero :: [v] -> Bool Source #

(C a, C a) => C (T a) Source # 

Methods

isZero :: T a -> Bool Source #

(Eq a, Num a) => C (T a) Source # 

Methods

isZero :: T a -> Bool Source #

C a => C (T a) Source # 

Methods

isZero :: T a -> Bool Source #

C a => C (T a) Source # 

Methods

isZero :: T a -> Bool Source #

C a => C (T a) Source # 

Methods

isZero :: T a -> Bool Source #

C a => C (T a) Source # 

Methods

isZero :: T a -> Bool Source #

C a => C (T a) Source # 

Methods

isZero :: T a -> Bool Source #

C a => C (T a) Source # 

Methods

isZero :: T a -> Bool Source #

(C v0, C v1) => C (v0, v1) Source # 

Methods

isZero :: (v0, v1) -> Bool Source #

C v => C (T a v) Source # 

Methods

isZero :: T a v -> Bool Source #

C v => C (T a v) Source # 

Methods

isZero :: T a v -> Bool Source #

C v => C (T a v) Source # 

Methods

isZero :: T a v -> Bool Source #

(C v0, C v1, C v2) => C (v0, v1, v2) Source # 

Methods

isZero :: (v0, v1, v2) -> Bool Source #

defltIsZero :: (Eq a, C a) => a -> Bool Source #

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