QuickCheck-2.1.0.2: Automatic testing of Haskell programsSource codeContentsIndex
Test.QuickCheck.Modifiers
Contents
Type-level modifiers for changing generator behavior
Synopsis
newtype Blind a = Blind a
newtype Fixed a = Fixed a
newtype OrderedList a = Ordered [a]
newtype NonEmptyList a = NonEmpty [a]
newtype Positive a = Positive a
newtype NonZero a = NonZero a
newtype NonNegative a = NonNegative a
data Smart a = Smart Int a
newtype Shrink2 a = Shrink2 a
data Shrinking s a = Shrinking s a
class ShrinkState s a where
shrinkInit :: a -> s
shrinkState :: a -> s -> [(a, s)]
Type-level modifiers for changing generator behavior
newtype Blind a Source
Blind x: as x, but x does not have to be in the Show class.
Constructors
Blind a
newtype Fixed a Source
Fixed x: as x, but will not be shrunk.
Constructors
Fixed a
newtype OrderedList a Source
Ordered xs: guarantees that xs is ordered.
Constructors
Ordered [a]
newtype NonEmptyList a Source
NonEmpty xs: guarantees that xs is non-empty.
Constructors
NonEmpty [a]
newtype Positive a Source
Positive x: guarantees that x > 0.
Constructors
Positive a
newtype NonZero a Source
NonZero x: guarantees that x /= 0.
Constructors
NonZero a
newtype NonNegative a Source
NonNegative x: guarantees that x >= 0.
Constructors
NonNegative a
data Smart a Source
Smart _ x: tries a different order when shrinking.
Constructors
Smart Int a
newtype Shrink2 a Source
Shrink2 x: allows 2 shrinking steps at the same time when shrinking x
Constructors
Shrink2 a
data Shrinking s a Source
Shrinking _ x: allows for maintaining a state during shrinking.
Constructors
Shrinking s a
class ShrinkState s a whereSource
Methods
shrinkInit :: a -> sSource
shrinkState :: a -> s -> [(a, s)]Source
Produced by Haddock version 2.6.0