numhask-prelude-0.0.2.0: A numeric prelude

Safe HaskellNone
LanguageHaskell2010

NumHask.Laws

Synopsis

Documentation

data LawArity a Source #

Constructors

Nonary Bool 
Unary (a -> Bool) 
Binary (a -> a -> Bool) 
Ternary (a -> a -> a -> Bool) 
Ornary (a -> a -> a -> a -> Bool) 
Failiary (a -> Property) 

data LawArity2 a b Source #

Constructors

Unary2 (a -> Bool) 
Binary2 (a -> b -> Bool) 
Ternary2 (a -> a -> b -> Bool) 
Ternary2' (a -> b -> b -> Bool) 
Ternary2'' (a -> a -> a -> Bool) 
Quad31 (a -> a -> a -> b -> Bool) 
Quad22 (a -> a -> b -> b -> Bool) 
Failiary2 (a -> Property) 

type Law a = (TestName, LawArity a) Source #

type Law2 a b = (TestName, LawArity2 a b) Source #

testLawOf :: (Arbitrary a, Show a) => [a] -> Law a -> TestTree Source #

testLawOf2 :: (Arbitrary a, Show a, Arbitrary b, Show b) => [(a, b)] -> Law2 a b -> TestTree Source #

additiveLaws :: (Eq a, Additive a) => [Law a] Source #

signedLaws :: (Eq a, Signed a) => [Law a] Source #

additiveBasisLaws :: (Eq (r a), Epsilon (r a), AdditiveBasis r a) => [Law (r a)] Source #

additiveModuleLaws :: (Eq (r a), Epsilon a, Epsilon (r a), AdditiveModule r a) => [Law2 (r a) a] Source #

additiveGroupModuleLaws :: (Eq (r a), Epsilon a, Epsilon (r a), AdditiveGroupModule r a) => [Law2 (r a) a] Source #

expFieldNaperianLaws :: (ExpField (r a), Foldable r, ExpField a, Epsilon a, Signed a, Epsilon (r a), Fractional a, Ord a) => [Law (r a)] Source #

tensorProductLaws :: (Eq (r (r a)), Additive (r (r a)), TensorProduct (r a), Epsilon (r a)) => [Law2 (r a) a] Source #

banachLaws :: (Ord a, Fractional a, Signed a, Foldable r, Eq (r a), Epsilon (r a), Banach r a, Singleton r) => [Law2 (r a) b] Source #

hilbertLaws :: (Eq a, MultiplicativeModule r a, Epsilon a, Epsilon (r a), Hilbert r a) => [Law2 (r a) a] Source #

semiringLaws :: (Eq a, Semiring a) => [Law a] Source #

semiring

ringLaws :: (Eq a, Ring a) => [Law a] Source #

ring

starSemiringLaws :: (Eq a, StarSemiring a) => [Law a] Source #

starsemiring