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
- leftIdentityOnValid :: (Show a, Eq a, GenValid a) => (b -> a -> a) -> b -> Property
- leftIdentity :: (Show a, Eq a, GenUnchecked 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
- rightIdentityOnValid :: (Show a, Eq a, GenValid a) => (a -> b -> a) -> b -> Property
- rightIdentity :: (Show a, Eq a, GenUnchecked 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
- identityOnValid :: (Show a, Eq a, GenValid a) => (a -> a -> a) -> a -> Property
- identity :: (Show a, Eq a, GenUnchecked 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 \]
leftIdentityOnValid :: (Show a, Eq a, GenValid a) => (b -> a -> a) -> b -> Property Source #
leftIdentityOnValid (flip ((^) :: Rational -> Int -> Rational)) 1
leftIdentity :: (Show a, Eq a, GenUnchecked 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 \]
rightIdentityOnValid :: (Show a, Eq a, GenValid a) => (a -> b -> a) -> b -> Property Source #
rightIdentityOnValid ((^) :: Rational -> Int -> Rational) 1
rightIdentity :: (Show a, Eq a, GenUnchecked 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) \]
identityOnValid :: (Show a, Eq a, GenValid a) => (a -> a -> a) -> a -> Property Source #
identityOnValid ((*) :: Rational -> Rational -> Rational) 1
identityOnValid ((+) :: Rational -> Rational -> Rational) 0