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

Safe HaskellNone
LanguageHaskell2010

Test.Validity.Operations.Associativity

Synopsis

Documentation

associativeOnGens :: (Show a, Eq a) => (a -> a -> a) -> Gen (a, a, a) -> ((a, a, a) -> [(a, a, a)]) -> Property Source #

\[ Associative(\star) \quad\equiv\quad \forall a, b, c: (a \star b) \star c = a \star (b \star c) \]

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

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

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

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

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