Test.QuickCheck.Poly

QuickCheck-2.9.2: Automatic testing of Haskell programs

Safe Haskell | None
Language | Haskell98

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 #

Constructors

A |
Fields unA :: Integer

Instances

Eq A # |
Methods (==) :: A -> A -> Bool # (/=) :: A -> A -> Bool #
Show A # |
Methods showsPrec :: Int -> A -> ShowS # show :: A -> String # showList :: [A] -> ShowS #
CoArbitrary A # |
Methods coarbitrary :: A -> Gen b -> Gen b #
Arbitrary A # |
Methods arbitrary :: Gen A # shrink :: A -> [A] #
Function A # |
Methods function :: (A -> b) -> A :-> b #

newtype B #

Constructors

B |
Fields unB :: Integer

Instances

Eq B # |
Methods (==) :: B -> B -> Bool # (/=) :: B -> B -> Bool #
Show B # |
Methods showsPrec :: Int -> B -> ShowS # show :: B -> String # showList :: [B] -> ShowS #
CoArbitrary B # |
Methods coarbitrary :: B -> Gen b -> Gen b #
Arbitrary B # |
Methods arbitrary :: Gen B # shrink :: B -> [B] #
Function B # |
Methods function :: (B -> b) -> B :-> b #

newtype C #

Constructors

C |
Fields unC :: Integer

Instances

Eq C # |
Methods (==) :: C -> C -> Bool # (/=) :: C -> C -> Bool #
Show C # |
Methods showsPrec :: Int -> C -> ShowS # show :: C -> String # showList :: [C] -> ShowS #
CoArbitrary C # |
Methods coarbitrary :: C -> Gen b -> Gen b #
Arbitrary C # |
Methods arbitrary :: Gen C # shrink :: C -> [C] #
Function C # |
Methods function :: (C -> b) -> C :-> b #

newtype OrdA #

Constructors

OrdA |
Fields unOrdA :: Integer

Instances

Eq OrdA # |
Methods (==) :: OrdA -> OrdA -> Bool # (/=) :: OrdA -> OrdA -> Bool #
Num OrdA # |
Methods (+) :: OrdA -> OrdA -> OrdA # (-) :: OrdA -> OrdA -> OrdA # (*) :: OrdA -> OrdA -> OrdA # negate :: OrdA -> OrdA # abs :: OrdA -> OrdA # signum :: OrdA -> OrdA # fromInteger :: Integer -> OrdA #
Ord OrdA # |
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 # |
Methods showsPrec :: Int -> OrdA -> ShowS # show :: OrdA -> String # showList :: [OrdA] -> ShowS #
CoArbitrary OrdA # |
Methods coarbitrary :: OrdA -> Gen b -> Gen b #
Arbitrary OrdA # |
Methods arbitrary :: Gen OrdA # shrink :: OrdA -> [OrdA] #
Function OrdA # |
Methods function :: (OrdA -> b) -> OrdA :-> b #

newtype OrdB #

Constructors

OrdB |
Fields unOrdB :: Integer

Instances

Eq OrdB # |
Methods (==) :: OrdB -> OrdB -> Bool # (/=) :: OrdB -> OrdB -> Bool #
Num OrdB # |
Methods (+) :: OrdB -> OrdB -> OrdB # (-) :: OrdB -> OrdB -> OrdB # (*) :: OrdB -> OrdB -> OrdB # negate :: OrdB -> OrdB # abs :: OrdB -> OrdB # signum :: OrdB -> OrdB # fromInteger :: Integer -> OrdB #
Ord OrdB # |
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 # |
Methods showsPrec :: Int -> OrdB -> ShowS # show :: OrdB -> String # showList :: [OrdB] -> ShowS #
CoArbitrary OrdB # |
Methods coarbitrary :: OrdB -> Gen b -> Gen b #
Arbitrary OrdB # |
Methods arbitrary :: Gen OrdB # shrink :: OrdB -> [OrdB] #
Function OrdB # |
Methods function :: (OrdB -> b) -> OrdB :-> b #

newtype OrdC #

Constructors

OrdC |
Fields unOrdC :: Integer

Instances

Eq OrdC # |
Methods (==) :: OrdC -> OrdC -> Bool # (/=) :: OrdC -> OrdC -> Bool #
Num OrdC # |
Methods (+) :: OrdC -> OrdC -> OrdC # (-) :: OrdC -> OrdC -> OrdC # (*) :: OrdC -> OrdC -> OrdC # negate :: OrdC -> OrdC # abs :: OrdC -> OrdC # signum :: OrdC -> OrdC # fromInteger :: Integer -> OrdC #
Ord OrdC # |
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 # |
Methods showsPrec :: Int -> OrdC -> ShowS # show :: OrdC -> String # showList :: [OrdC] -> ShowS #
CoArbitrary OrdC # |
Methods coarbitrary :: OrdC -> Gen b -> Gen b #
Arbitrary OrdC # |
Methods arbitrary :: Gen OrdC # shrink :: OrdC -> [OrdC] #
Function OrdC # |
Methods function :: (OrdC -> b) -> OrdC :-> b #