QuickCheck-2.1.0.1: Automatic testing of Haskell programsSource codeContentsIndex
Test.QuickCheck.Function
Contents
Magic functions
Generating monotonic functions
Description
Uses magic to show and shrink functions.
Synopsis
data Function a b = Function (FunctionTable a b) (a -> b)
function :: (a -> b) -> Function a b
newtype MonotonicFunction = Monotonic (Function Int Int)
newtype StrictlyMonotonicFunction = StrictlyMonotonic (Function Int Int)
Magic functions
data Function a b Source
Functions from a to b which keep track of arguments that they are applied to. This allows showing function tables and shrinking functions.
Constructors
Function (FunctionTable a b) (a -> b)
show/hide Instances
(Show a, Show b) => Show (Function a b)
(Eq a, CoArbitrary a, Arbitrary b) => Arbitrary (Function a b)
function :: (a -> b) -> Function a bSource
Generating monotonic functions
newtype MonotonicFunction Source
Monotonic fun: guarantees that fun is monotonic.
Constructors
Monotonic (Function Int Int)
show/hide Instances
newtype StrictlyMonotonicFunction Source
StrictlyMonotonic fun: guarantees that fun is strictly monotonic.
Constructors
StrictlyMonotonic (Function Int Int)
show/hide Instances
Produced by Haddock version 2.4.2