QuickCheck-2.9.2: Automatic testing of Haskell programs

Safe HaskellNone
LanguageHaskell98

Test.QuickCheck.Poly

Description

Types to help with testing polymorphic properties.

Types A, B and C are newtype wrappers around Integer that implement Eq, Show, Arbitrary and CoArbitrary. Types OrdA, OrdB and OrdC also implement Ord and Num.

See also Test.QuickCheck.All for an automatic way of testing polymorphic properties.

Documentation

newtype A Source #

Constructors

A 

Fields

Instances

Eq A Source # 

Methods

(==) :: A -> A -> Bool #

(/=) :: A -> A -> Bool #

Show A Source # 

Methods

showsPrec :: Int -> A -> ShowS #

show :: A -> String #

showList :: [A] -> ShowS #

CoArbitrary A Source # 

Methods

coarbitrary :: A -> Gen b -> Gen b Source #

Arbitrary A Source # 

Methods

arbitrary :: Gen A Source #

shrink :: A -> [A] Source #

Function A Source # 

Methods

function :: (A -> b) -> A :-> b Source #

newtype B Source #

Constructors

B 

Fields

Instances

Eq B Source # 

Methods

(==) :: B -> B -> Bool #

(/=) :: B -> B -> Bool #

Show B Source # 

Methods

showsPrec :: Int -> B -> ShowS #

show :: B -> String #

showList :: [B] -> ShowS #

CoArbitrary B Source # 

Methods

coarbitrary :: B -> Gen b -> Gen b Source #

Arbitrary B Source # 

Methods

arbitrary :: Gen B Source #

shrink :: B -> [B] Source #

Function B Source # 

Methods

function :: (B -> b) -> B :-> b Source #

newtype C Source #

Constructors

C 

Fields

Instances

Eq C Source # 

Methods

(==) :: C -> C -> Bool #

(/=) :: C -> C -> Bool #

Show C Source # 

Methods

showsPrec :: Int -> C -> ShowS #

show :: C -> String #

showList :: [C] -> ShowS #

CoArbitrary C Source # 

Methods

coarbitrary :: C -> Gen b -> Gen b Source #

Arbitrary C Source # 

Methods

arbitrary :: Gen C Source #

shrink :: C -> [C] Source #

Function C Source # 

Methods

function :: (C -> b) -> C :-> b Source #

newtype OrdA Source #

Constructors

OrdA 

Fields

Instances

Eq OrdA Source # 

Methods

(==) :: OrdA -> OrdA -> Bool #

(/=) :: OrdA -> OrdA -> Bool #

Num OrdA Source # 

Methods

(+) :: OrdA -> OrdA -> OrdA #

(-) :: OrdA -> OrdA -> OrdA #

(*) :: OrdA -> OrdA -> OrdA #

negate :: OrdA -> OrdA #

abs :: OrdA -> OrdA #

signum :: OrdA -> OrdA #

fromInteger :: Integer -> OrdA #

Ord OrdA Source # 

Methods

compare :: OrdA -> OrdA -> Ordering #

(<) :: OrdA -> OrdA -> Bool #

(<=) :: OrdA -> OrdA -> Bool #

(>) :: OrdA -> OrdA -> Bool #

(>=) :: OrdA -> OrdA -> Bool #

max :: OrdA -> OrdA -> OrdA #

min :: OrdA -> OrdA -> OrdA #

Show OrdA Source # 

Methods

showsPrec :: Int -> OrdA -> ShowS #

show :: OrdA -> String #

showList :: [OrdA] -> ShowS #

CoArbitrary OrdA Source # 

Methods

coarbitrary :: OrdA -> Gen b -> Gen b Source #

Arbitrary OrdA Source # 
Function OrdA Source # 

Methods

function :: (OrdA -> b) -> OrdA :-> b Source #

newtype OrdB Source #

Constructors

OrdB 

Fields

Instances

Eq OrdB Source # 

Methods

(==) :: OrdB -> OrdB -> Bool #

(/=) :: OrdB -> OrdB -> Bool #

Num OrdB Source # 

Methods

(+) :: OrdB -> OrdB -> OrdB #

(-) :: OrdB -> OrdB -> OrdB #

(*) :: OrdB -> OrdB -> OrdB #

negate :: OrdB -> OrdB #

abs :: OrdB -> OrdB #

signum :: OrdB -> OrdB #

fromInteger :: Integer -> OrdB #

Ord OrdB Source # 

Methods

compare :: OrdB -> OrdB -> Ordering #

(<) :: OrdB -> OrdB -> Bool #

(<=) :: OrdB -> OrdB -> Bool #

(>) :: OrdB -> OrdB -> Bool #

(>=) :: OrdB -> OrdB -> Bool #

max :: OrdB -> OrdB -> OrdB #

min :: OrdB -> OrdB -> OrdB #

Show OrdB Source # 

Methods

showsPrec :: Int -> OrdB -> ShowS #

show :: OrdB -> String #

showList :: [OrdB] -> ShowS #

CoArbitrary OrdB Source # 

Methods

coarbitrary :: OrdB -> Gen b -> Gen b Source #

Arbitrary OrdB Source # 
Function OrdB Source # 

Methods

function :: (OrdB -> b) -> OrdB :-> b Source #

newtype OrdC Source #

Constructors

OrdC 

Fields

Instances

Eq OrdC Source # 

Methods

(==) :: OrdC -> OrdC -> Bool #

(/=) :: OrdC -> OrdC -> Bool #

Num OrdC Source # 

Methods

(+) :: OrdC -> OrdC -> OrdC #

(-) :: OrdC -> OrdC -> OrdC #

(*) :: OrdC -> OrdC -> OrdC #

negate :: OrdC -> OrdC #

abs :: OrdC -> OrdC #

signum :: OrdC -> OrdC #

fromInteger :: Integer -> OrdC #

Ord OrdC Source # 

Methods

compare :: OrdC -> OrdC -> Ordering #

(<) :: OrdC -> OrdC -> Bool #

(<=) :: OrdC -> OrdC -> Bool #

(>) :: OrdC -> OrdC -> Bool #

(>=) :: OrdC -> OrdC -> Bool #

max :: OrdC -> OrdC -> OrdC #

min :: OrdC -> OrdC -> OrdC #

Show OrdC Source # 

Methods

showsPrec :: Int -> OrdC -> ShowS #

show :: OrdC -> String #

showList :: [OrdC] -> ShowS #

CoArbitrary OrdC Source # 

Methods

coarbitrary :: OrdC -> Gen b -> Gen b Source #

Arbitrary OrdC Source # 
Function OrdC Source # 

Methods

function :: (OrdC -> b) -> OrdC :-> b Source #