QuickCheck-2.1.0.1: Automatic testing of Haskell programs

Test.QuickCheck.Function

Contents

Description

Uses magic to show and shrink functions.

Synopsis

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) 

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) 

newtype StrictlyMonotonicFunction Source

StrictlyMonotonic fun: guarantees that fun is strictly monotonic.