numhask-hedgehog-0.4.0: Laws and tests for numhask

Safe HaskellNone
LanguageHaskell2010

NumHask.Hedgehog.Prop

Contents

Synopsis

Documentation

assertProps :: GroupName -> TestLimit -> Gen a -> (Gen a -> [(PropertyName, Property)]) -> IO Bool Source #

running tests in parallel

assertPropsSeq :: GroupName -> TestLimit -> Gen a -> (Gen a -> [(PropertyName, Property)]) -> IO Bool Source #

run tests sequentially

Combinators

unary :: Show a => Gen a -> (a -> Bool) -> Property Source #

Combinator for a property of involving a single element

binary :: Show a => Gen a -> (a -> a -> Bool) -> Property Source #

Combinator for a property involving two elements

ternary :: Show a => Gen a -> (a -> a -> a -> Bool) -> Property Source #

Combinator for a property involving three elements

isIdempotent :: (Eq a, Show a) => (a -> a -> a) -> Gen a -> Property Source #

isCommutative :: (Eq a, Show a) => (a -> a -> a) -> Gen a -> Property Source #

isUnital :: (Eq a, Show a) => a -> (a -> a -> a) -> Gen a -> Property Source #

isAssociative :: (Eq a, Show a) => (a -> a -> a) -> Gen a -> Property Source #

isGroup :: (Eq a, Show a) => a -> (a -> a -> a) -> (a -> a -> a) -> (a -> a) -> Gen a -> Property Source #

isDistributive :: (Eq a, Show a) => a -> (a -> a -> a) -> (a -> a -> a) -> Gen a -> Property Source #

isAbsorbativeUnit :: (Eq a, Show a) => a -> (a -> a -> a) -> Gen a -> Property Source #

isAbsorbative :: (Eq a, Show a) => (a -> a -> a) -> (a -> a -> a) -> Gen a -> Property Source #

isSigned :: (Eq a, Show a, Signed a) => Gen a -> Property Source #

isNormed :: forall a b. (JoinSemiLattice b, Show a, Normed a b) => [b] -> Gen a -> Property Source #

isNormedBounded :: forall a. (JoinSemiLattice a, Bounded a, Show a, Normed a a) => Gen a -> Property Source #

isNormedUnbounded :: forall a. (JoinSemiLattice a, Show a, Normed a a) => Gen a -> Property Source #

isExpField :: forall a. (Ord a, Epsilon a, ExpField a, Show a, Normed a a) => Gen a -> Property Source #

isInvolutive :: forall a. (Eq a, Show a, InvolutiveRing a) => Gen a -> Property Source #