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

Safe Haskell | None
Language | Haskell2010

Test.Validity.Functions.Inverse

Description

Standard tests involving inverse functions

Synopsis

- inverseFunctionsOnGen :: (Show a, Eq a) => (a -> b) -> (b -> a) -> Gen a -> (a -> [a]) -> Property
- inverseFunctions :: (Show a, Eq a, GenValid a) => (a -> b) -> (b -> a) -> Property
- inverseFunctionsOnArbitrary :: (Show a, Eq a, Arbitrary a) => (a -> b) -> (b -> a) -> Property
- inverseFunctionsIfFirstSucceedsOnGen :: (Show a, Eq a, CanFail f) => (a -> f b) -> (b -> a) -> Gen a -> (a -> [a]) -> Property
- inverseFunctionsIfFirstSucceeds :: (Show a, Eq a, GenValid a, CanFail f) => (a -> f b) -> (b -> a) -> Property
- inverseFunctionsIfFirstSucceedsOnArbitrary :: (Show a, Eq a, Arbitrary a, CanFail f) => (a -> f b) -> (b -> a) -> Property
- inverseFunctionsIfSecondSucceedsOnGen :: (Show a, Eq a, CanFail f) => (a -> b) -> (b -> f a) -> Gen a -> (a -> [a]) -> Property
- inverseFunctionsIfSecondSucceeds :: (Show a, Eq a, GenValid a, CanFail f) => (a -> b) -> (b -> f a) -> Property
- inverseFunctionsIfSecondSucceedsOnArbitrary :: (Show a, Eq a, Arbitrary a, CanFail f) => (a -> b) -> (b -> f a) -> Property
- inverseFunctionsIfSucceedOnGen :: (Show a, Eq a, CanFail f, CanFail g) => (a -> f b) -> (b -> g a) -> Gen a -> (a -> [a]) -> Property
- inverseFunctionsIfSucceed :: (Show a, Eq a, GenValid a, CanFail f, CanFail g) => (a -> f b) -> (b -> g a) -> Property
- inverseFunctionsIfSucceedOnArbitrary :: (Show a, Eq a, Arbitrary a, CanFail f, CanFail g) => (a -> f b) -> (b -> g a) -> Property

# Documentation

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

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

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

`id` is its own inverse function for every type: prop> inverseFunctionsOnArbitrary id (id :: Int -> Int)

inverseFunctionsIfFirstSucceedsOnGen :: (Show a, Eq a, CanFail f) => (a -> f b) -> (b -> a) -> Gen a -> (a -> [a]) -> Property Source #

inverseFunctionsIfFirstSucceeds :: (Show a, Eq a, GenValid a, CanFail f) => (a -> f b) -> (b -> a) -> Property Source #

inverseFunctionsIfFirstSucceedsOnArbitrary :: (Show a, Eq a, Arbitrary a, CanFail f) => (a -> f b) -> (b -> a) -> Property Source #

inverseFunctionsIfSecondSucceedsOnGen :: (Show a, Eq a, CanFail f) => (a -> b) -> (b -> f a) -> Gen a -> (a -> [a]) -> Property Source #

inverseFunctionsIfSecondSucceeds :: (Show a, Eq a, GenValid a, CanFail f) => (a -> b) -> (b -> f a) -> Property Source #

inverseFunctionsIfSecondSucceedsOnArbitrary :: (Show a, Eq a, Arbitrary a, CanFail f) => (a -> b) -> (b -> f a) -> Property Source #

inverseFunctionsIfSucceedOnGen :: (Show a, Eq a, CanFail f, CanFail g) => (a -> f b) -> (b -> g a) -> Gen a -> (a -> [a]) -> Property Source #

inverseFunctionsIfSucceed :: (Show a, Eq a, GenValid a, CanFail f, CanFail g) => (a -> f b) -> (b -> g a) -> Property Source #

inverseFunctionsIfSucceedOnArbitrary :: (Show a, Eq a, Arbitrary a, CanFail f, CanFail g) => (a -> f b) -> (b -> g a) -> Property Source #