QuickCheck-2.12: Automatic testing of Haskell programs

Safe HaskellSafe
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 # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

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

Show A Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

showsPrec :: Int -> A -> ShowS #

show :: A -> String #

showList :: [A] -> ShowS #

CoArbitrary A Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

Arbitrary A Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

arbitrary :: Gen A Source #

shrink :: A -> [A] Source #

Function A Source # 
Instance details

Defined in Test.QuickCheck.Function

Methods

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

newtype B Source #

Constructors

B 

Fields

Instances
Eq B Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

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

Show B Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

showsPrec :: Int -> B -> ShowS #

show :: B -> String #

showList :: [B] -> ShowS #

CoArbitrary B Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

Arbitrary B Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

arbitrary :: Gen B Source #

shrink :: B -> [B] Source #

Function B Source # 
Instance details

Defined in Test.QuickCheck.Function

Methods

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

newtype C Source #

Constructors

C 

Fields

Instances
Eq C Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

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

Show C Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

showsPrec :: Int -> C -> ShowS #

show :: C -> String #

showList :: [C] -> ShowS #

CoArbitrary C Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

Arbitrary C Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

arbitrary :: Gen C Source #

shrink :: C -> [C] Source #

Function C Source # 
Instance details

Defined in Test.QuickCheck.Function

Methods

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

newtype OrdA Source #

Constructors

OrdA 

Fields

Instances
Eq OrdA Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

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

Num OrdA Source # 
Instance details

Defined in Test.QuickCheck.Poly

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 # 
Instance details

Defined in Test.QuickCheck.Poly

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 # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

showsPrec :: Int -> OrdA -> ShowS #

show :: OrdA -> String #

showList :: [OrdA] -> ShowS #

CoArbitrary OrdA Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

Arbitrary OrdA Source # 
Instance details

Defined in Test.QuickCheck.Poly

Function OrdA Source # 
Instance details

Defined in Test.QuickCheck.Function

Methods

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

newtype OrdB Source #

Constructors

OrdB 

Fields

Instances
Eq OrdB Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

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

Num OrdB Source # 
Instance details

Defined in Test.QuickCheck.Poly

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 # 
Instance details

Defined in Test.QuickCheck.Poly

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 # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

showsPrec :: Int -> OrdB -> ShowS #

show :: OrdB -> String #

showList :: [OrdB] -> ShowS #

CoArbitrary OrdB Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

Arbitrary OrdB Source # 
Instance details

Defined in Test.QuickCheck.Poly

Function OrdB Source # 
Instance details

Defined in Test.QuickCheck.Function

Methods

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

newtype OrdC Source #

Constructors

OrdC 

Fields

Instances
Eq OrdC Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

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

Num OrdC Source # 
Instance details

Defined in Test.QuickCheck.Poly

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 # 
Instance details

Defined in Test.QuickCheck.Poly

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 # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

showsPrec :: Int -> OrdC -> ShowS #

show :: OrdC -> String #

showList :: [OrdC] -> ShowS #

CoArbitrary OrdC Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

Arbitrary OrdC Source # 
Instance details

Defined in Test.QuickCheck.Poly

Function OrdC Source # 
Instance details

Defined in Test.QuickCheck.Function

Methods

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