quickcheck-combinators-0.0.0: Simple type-level combinators for augmenting QuickCheck instances.

Safe HaskellNone
LanguageHaskell2010

Test.QuickCheck.Combinators

Synopsis

Documentation

newtype AtLeast n t a Source

Generate with a minimum, inclusive size as n :: Nat

Constructors

AtLeast (t a) 

Instances

Enum (t a) => Enum (AtLeast n t a) Source 
Eq (t a) => Eq (AtLeast n t a) Source 
Ord (t a) => Ord (AtLeast n t a) Source 
Read (t a) => Read (AtLeast n t a) Source 
Show (t a) => Show (AtLeast n t a) Source 
(UnfoldableR p t, Monoid (t a), Arbitrary a, Arbitrary (t a), KnownNat n, p a) => Arbitrary (AtLeast n t a) Source 

newtype AtMost n t a Source

Generate with a maximum, inclusive size as n :: Nat

Constructors

AtMost (t a) 

Instances

Enum (t a) => Enum (AtMost n t a) Source 
Eq (t a) => Eq (AtMost n t a) Source 
Ord (t a) => Ord (AtMost n t a) Source 
Read (t a) => Read (AtMost n t a) Source 
Show (t a) => Show (AtMost n t a) Source 
(UnfoldableR p t, Monoid (t a), Arbitrary a, Arbitrary (t a), KnownNat m, p a) => Arbitrary (AtMost m t a) Source 

newtype Between n m t a Source

Generate between the inclusive range of n :: Nat and m :: Nat

Constructors

Between (t a) 

Instances

Enum (t a) => Enum (Between n m t a) Source 
Eq (t a) => Eq (Between n m t a) Source 
Ord (t a) => Ord (Between n m t a) Source 
Read (t a) => Read (Between n m t a) Source 
Show (t a) => Show (Between n m t a) Source 
(UnfoldableR p t, Monoid (t a), Arbitrary a, Arbitrary (t a), KnownNat n, KnownNat m, p a) => Arbitrary (Between n m t a) Source 

type NonMempty = AtLeast 1 Source

Convenience for AtLeast 1