Test.QuickCheck.Modifiers
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
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]
Instances
newtype NonEmptyList a Source
NonEmpty xs: guarantees that xs is non-empty.
Constructors
NonEmpty [a]
Instances
Positive x: guarantees that x > 0.
Constructors
Positive a
NonZero x: guarantees that x /= 0.
Constructors
NonZero a
Smart _ x: tries a different order when shrinking.
Shrink2 x: allows 2 shrinking steps at the same time when shrinking x
Constructors
Shrink2 a
Shrinking _ x: allows for maintaining a state during shrinking.
Constructors
Shrinking s a
class ShrinkState s a whereSource