numhask-prelude-0.0.5.1: A numeric prelude

Safe HaskellNone
LanguageHaskell2010

NumHask.Laws

Synopsis

Documentation

data LawArity a Source #

unification of law equations

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 #

unification of law equations with 2 types

Constructors

Unary10 (a -> Bool) 
Unary01 (b -> Bool) 
Binary11 (a -> b -> Bool) 
Binary20 (a -> a -> Bool) 
Ternary21 (a -> a -> b -> Bool) 
Ternary12 (a -> b -> b -> Bool) 
Ternary30 (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 #

additive

additiveLaws_ :: Epsilon a => [Law a] Source #

additive with approximate association equality

additiveLawsFail :: (Eq a, Additive a, Show a, Arbitrary a) => [Law a] Source #

additive laws with a failure on association

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

metricIntegralLaws :: forall a b. (FromInteger b, Ord b, Signed b, Epsilon b, Metric a b) => [Law2 a b] Source #

metricIntegralBoundedLaws :: forall a b. (FromInteger b, Bounded b, Ord b, Signed b, Epsilon b, Metric a b) => [Law2 a b] Source #

metricRationalLaws :: forall a b. (FromRatio b, Ord b, Signed b, Epsilon b, Metric a b, Normed a b) => [Law2 a b] Source #

expFieldLaws :: forall a b. (FromInteger b, AdditiveUnital b, ExpField a, Normed a b, Epsilon a, Ord a, Ord b) => [Law2 a b] Source #

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

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

expFieldContainerLaws :: (ExpField (r a), Foldable r, ExpField a, Epsilon a, Signed a, FromRatio a, Epsilon (r 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 :: (Foldable r, Epsilon (r a), Banach r a, Singleton r, Signed a, FromRatio a, Ord a) => [Law2 (r a) a] Source #

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

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

semiring

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

ring

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

starsemiring

involutiveRingLaws :: forall a. (Eq a, MultiplicativeUnital a, InvolutiveRing a) => [Law a] Source #

involutive ring