genvalidity-property-0.0.0.0: Standard properties for functions on `Validity` types

Safe HaskellNone
LanguageHaskell2010

Test.Validity.Operations.Commutativity

Synopsis

Documentation

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

commutativeOnValids :: (Show a, Eq a, GenValid a) => (a -> a -> a) -> Property Source #

commutative ((+) :: Double -> Double -> Double)
commutative ((*) :: Double -> Double -> Double)

commutative :: (Show a, Eq a, GenUnchecked a) => (a -> a -> a) -> Property Source #

commutative ((+) :: Int -> Int -> Int)
commutative ((*) :: Int -> Int -> Int)

commutativeOnArbitrary :: (Show a, Eq a, Arbitrary a) => (a -> a -> a) -> Property Source #

commutativeOnArbitrary ((+) :: Int -> Int -> Int)
commutativeOnArbitrary ((*) :: Int -> Int -> Int)