Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- leftIdentityOnElemWithEquality :: (b -> a -> a) -> (a -> a -> Bool) -> b -> a -> Bool
- leftIdentityOnGenWithEquality :: Show a => (b -> a -> a) -> (a -> a -> Bool) -> b -> Gen a -> (a -> [a]) -> Property
- leftIdentityOnGen :: (Show a, Eq a) => (b -> a -> a) -> b -> Gen a -> (a -> [a]) -> Property
- leftIdentity :: (Show a, Eq a, GenValid a) => (b -> a -> a) -> b -> Property
- leftIdentityOnArbitrary :: (Show a, Eq a, Arbitrary a) => (b -> a -> a) -> b -> Property
- rightIdentityOnElemWithEquality :: (a -> b -> a) -> (a -> a -> Bool) -> b -> a -> Bool
- rightIdentityOnGenWithEquality :: Show a => (a -> b -> a) -> (a -> a -> Bool) -> b -> Gen a -> (a -> [a]) -> Property
- rightIdentityOnGen :: (Show a, Eq a) => (a -> b -> a) -> b -> Gen a -> (a -> [a]) -> Property
- rightIdentity :: (Show a, Eq a, GenValid a) => (a -> b -> a) -> b -> Property
- rightIdentityOnArbitrary :: (Show a, Eq a, Arbitrary a) => (a -> b -> a) -> b -> Property
- identityOnGen :: (Show a, Eq a) => (a -> a -> a) -> a -> Gen a -> (a -> [a]) -> Property
- identity :: (Show a, Eq a, GenValid a) => (a -> a -> a) -> a -> Property
- identityOnArbitrary :: (Show a, Eq a, Arbitrary a) => (a -> a -> a) -> a -> Property
Documentation
leftIdentityOnElemWithEquality Source #
:: (b -> a -> a) | A binary operation |
-> (a -> a -> Bool) | An equality |
-> b | A candidate left-identity |
-> a | An element |
-> Bool |
\[ LeftIdentity(\star, \doteq, b) \quad\equiv\quad \forall a: (b \star a) \doteq a \]
leftIdentity :: (Show a, Eq a, GenValid a) => (b -> a -> a) -> b -> Property Source #
leftIdentity (flip ((^) :: Int -> Int -> Int)) 1
leftIdentityOnArbitrary :: (Show a, Eq a, Arbitrary a) => (b -> a -> a) -> b -> Property Source #
leftIdentityOnArbitrary (flip ((^) :: Int -> Int -> Int)) 1
rightIdentityOnElemWithEquality Source #
:: (a -> b -> a) | A binary operation |
-> (a -> a -> Bool) | An equality |
-> b | A candidate right-identity |
-> a | An element |
-> Bool |
\[ RightIdentity(\star, \doteq, b) \quad\equiv\quad \forall a: (a \star b) \doteq a \]
rightIdentity :: (Show a, Eq a, GenValid a) => (a -> b -> a) -> b -> Property Source #
rightIdentity ((^) :: Int -> Int -> Int) 1
rightIdentityOnArbitrary :: (Show a, Eq a, Arbitrary a) => (a -> b -> a) -> b -> Property Source #
rightIdentityOnArbitrary ((^) :: Int -> Int -> Int) 1
identityOnGen :: (Show a, Eq a) => (a -> a -> a) -> a -> Gen a -> (a -> [a]) -> Property Source #
\[ Identity(\star, \doteq, b) \quad\equiv\quad LeftIdentity(\star, \doteq, b) \wedge RightIdentity(\star, \doteq, b) \]