QuickCheck-2.15: Automatic testing of Haskell programs
Safe HaskellSafe
LanguageHaskell2010

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

Instances details
Arbitrary A Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

arbitrary :: Gen A Source #

shrink :: A -> [A] Source #

CoArbitrary A Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

Function A Source # 
Instance details

Defined in Test.QuickCheck.Function

Methods

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

Show A Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

showsPrec :: Int -> A -> ShowS #

show :: A -> String #

showList :: [A] -> ShowS #

Eq A Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

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

newtype B Source #

Constructors

B 

Fields

Instances

Instances details
Arbitrary B Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

arbitrary :: Gen B Source #

shrink :: B -> [B] Source #

CoArbitrary B Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

Function B Source # 
Instance details

Defined in Test.QuickCheck.Function

Methods

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

Show B Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

showsPrec :: Int -> B -> ShowS #

show :: B -> String #

showList :: [B] -> ShowS #

Eq B Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

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

newtype C Source #

Constructors

C 

Fields

Instances

Instances details
Arbitrary C Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

arbitrary :: Gen C Source #

shrink :: C -> [C] Source #

CoArbitrary C Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

Function C Source # 
Instance details

Defined in Test.QuickCheck.Function

Methods

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

Show C Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

showsPrec :: Int -> C -> ShowS #

show :: C -> String #

showList :: [C] -> ShowS #

Eq C Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

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

newtype OrdA Source #

Constructors

OrdA 

Fields

Instances

Instances details
Arbitrary OrdA Source # 
Instance details

Defined in Test.QuickCheck.Poly

CoArbitrary OrdA Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

Function OrdA Source # 
Instance details

Defined in Test.QuickCheck.Function

Methods

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

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 #

Show OrdA Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

showsPrec :: Int -> OrdA -> ShowS #

show :: OrdA -> String #

showList :: [OrdA] -> ShowS #

Eq OrdA Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

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

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 #

newtype OrdB Source #

Constructors

OrdB 

Fields

Instances

Instances details
Arbitrary OrdB Source # 
Instance details

Defined in Test.QuickCheck.Poly

CoArbitrary OrdB Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

Function OrdB Source # 
Instance details

Defined in Test.QuickCheck.Function

Methods

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

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 #

Show OrdB Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

showsPrec :: Int -> OrdB -> ShowS #

show :: OrdB -> String #

showList :: [OrdB] -> ShowS #

Eq OrdB Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

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

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 #

newtype OrdC Source #

Constructors

OrdC 

Fields

Instances

Instances details
Arbitrary OrdC Source # 
Instance details

Defined in Test.QuickCheck.Poly

CoArbitrary OrdC Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

Function OrdC Source # 
Instance details

Defined in Test.QuickCheck.Function

Methods

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

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 #

Show OrdC Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

showsPrec :: Int -> OrdC -> ShowS #

show :: OrdC -> String #

showList :: [OrdC] -> ShowS #

Eq OrdC Source # 
Instance details

Defined in Test.QuickCheck.Poly

Methods

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

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

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 #