QuickCheck-2.1.1.1: Automatic testing of Haskell programsContentsIndex
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
Blind x: as x, but x does not have to be in the Show class.
Constructors
Blind a
show/hide Instances
Enum a => Enum (Blind a)
Eq a => Eq (Blind a)
Integral a => Integral (Blind a)
Num a => Num (Blind a)
Ord a => Ord (Blind a)
Real a => Real (Blind a)
Show (Blind a)
Arbitrary a => Arbitrary (Blind a)
newtype Fixed a
Fixed x: as x, but will not be shrunk.
Constructors
Fixed a
show/hide Instances
Enum a => Enum (Fixed a)
Eq a => Eq (Fixed a)
Integral a => Integral (Fixed a)
Num a => Num (Fixed a)
Ord a => Ord (Fixed a)
Read a => Read (Fixed a)
Real a => Real (Fixed a)
Show a => Show (Fixed a)
Arbitrary a => Arbitrary (Fixed a)
newtype OrderedList a
Ordered xs: guarantees that xs is ordered.
Constructors
Ordered [a]
show/hide Instances
newtype NonEmptyList a
NonEmpty xs: guarantees that xs is non-empty.
Constructors
NonEmpty [a]
show/hide Instances
newtype Positive a
Positive x: guarantees that x > 0.
Constructors
Positive a
show/hide Instances
Enum a => Enum (Positive a)
Eq a => Eq (Positive a)
Integral a => Integral (Positive a)
Num a => Num (Positive a)
Ord a => Ord (Positive a)
Read a => Read (Positive a)
Real a => Real (Positive a)
Show a => Show (Positive a)
(Num a, Ord a, Arbitrary a) => Arbitrary (Positive a)
newtype NonZero a
NonZero x: guarantees that x /= 0.
Constructors
NonZero a
show/hide Instances
Enum a => Enum (NonZero a)
Eq a => Eq (NonZero a)
Integral a => Integral (NonZero a)
Num a => Num (NonZero a)
Ord a => Ord (NonZero a)
Read a => Read (NonZero a)
Real a => Real (NonZero a)
Show a => Show (NonZero a)
(Num a, Ord a, Arbitrary a) => Arbitrary (NonZero a)
newtype NonNegative a
NonNegative x: guarantees that x >= 0.
Constructors
NonNegative a
show/hide Instances
data Smart a
Smart _ x: tries a different order when shrinking.
Constructors
Smart Int a
show/hide Instances
newtype Shrink2 a
Shrink2 x: allows 2 shrinking steps at the same time when shrinking x
Constructors
Shrink2 a
show/hide Instances
Enum a => Enum (Shrink2 a)
Eq a => Eq (Shrink2 a)
Integral a => Integral (Shrink2 a)
Num a => Num (Shrink2 a)
Ord a => Ord (Shrink2 a)
Read a => Read (Shrink2 a)
Real a => Real (Shrink2 a)
Show a => Show (Shrink2 a)
Arbitrary a => Arbitrary (Shrink2 a)
data Shrinking s a
Shrinking _ x: allows for maintaining a state during shrinking.
Constructors
Shrinking s a
show/hide Instances
class ShrinkState s a where
Methods
shrinkInit :: a -> s
shrinkState :: a -> s -> [(a, s)]
Produced by Haddock version 2.7.2