quickcheck-higherorder-0.1.0.0: QuickCheck extension for higher-order properties

Safe HaskellNone
LanguageHaskell2010

Test.QuickCheck.HigherOrder.Internal.Testable

Contents

Description

An alternative to Testable

Synopsis

Syntax for properties

data Equation a Source #

Equation: an equals sign between two values.

Constructors

(:=:) a a infix 5 
Instances
Eq a => Eq (Equation a) Source # 
Instance details

Defined in Test.QuickCheck.HigherOrder.Internal.Testable

Methods

(==) :: Equation a -> Equation a -> Bool #

(/=) :: Equation a -> Equation a -> Bool #

Ord a => Ord (Equation a) Source # 
Instance details

Defined in Test.QuickCheck.HigherOrder.Internal.Testable

Methods

compare :: Equation a -> Equation a -> Ordering #

(<) :: Equation a -> Equation a -> Bool #

(<=) :: Equation a -> Equation a -> Bool #

(>) :: Equation a -> Equation a -> Bool #

(>=) :: Equation a -> Equation a -> Bool #

max :: Equation a -> Equation a -> Equation a #

min :: Equation a -> Equation a -> Equation a #

Show a => Show (Equation a) Source # 
Instance details

Defined in Test.QuickCheck.HigherOrder.Internal.Testable

Methods

showsPrec :: Int -> Equation a -> ShowS #

show :: Equation a -> String #

showList :: [Equation a] -> ShowS #

TestEq a => Testable (Equation a) Source # 
Instance details

Defined in Test.QuickCheck.HigherOrder.Internal.Testable

Methods

property :: Equation a -> Property #

propertyForAllShrinkShow :: Gen a0 -> (a0 -> [a0]) -> (a0 -> [String]) -> (a0 -> Equation a) -> Property #

TestEq a => Testable' (Equation a) Source # 
Instance details

Defined in Test.QuickCheck.HigherOrder.Internal.Testable

Eq a => Decidable (Equation a) Source # 
Instance details

Defined in Test.QuickCheck.HigherOrder.Internal.Testable

Methods

decide :: Equation a -> Bool Source #

data Implication a b Source #

Expressions denoting a logical implication.

Constructors

(:==>) a b infixr 2 
Instances
(Decidable a, Testable b) => Testable (Implication a b) Source #

Just use (==>).

Instance details

Defined in Test.QuickCheck.HigherOrder.Internal.Testable

Methods

property :: Implication a b -> Property #

propertyForAllShrinkShow :: Gen a0 -> (a0 -> [a0]) -> (a0 -> [String]) -> (a0 -> Implication a b) -> Property #

(Decidable a, Testable' b) => Testable' (Implication a b) Source #

Just use (==>).

Instance details

Defined in Test.QuickCheck.HigherOrder.Internal.Testable

type EqImpl a b = Implication (Equation a) (Equation b) Source #

Implication between two equations.

class Decidable a where Source #

Decidable property.

Methods

decide :: a -> Bool Source #

The definition of decidability: we can compute whether a property is true.

Instances
Decidable Bool Source # 
Instance details

Defined in Test.QuickCheck.HigherOrder.Internal.Testable

Methods

decide :: Bool -> Bool Source #

Eq a => Decidable (Equation a) Source # 
Instance details

Defined in Test.QuickCheck.HigherOrder.Internal.Testable

Methods

decide :: Equation a -> Bool Source #

Auxiliary functions

quickCheck' :: Testable' prop => prop -> IO () Source #

Variant of quickCheck using the alternative Testable'.

quickCheckWith' :: Testable' prop => Args -> prop -> IO () Source #

Variant of quickCheckWith using the alternative Testable'.

ok :: Testable' prop => String -> prop -> (String, Property) Source #

A named property that should pass.

Use ok and ko to construct lists of named properties [(String, Property)], which can be run using quickChecks, or testProperties from tasty-quickcheck.

ko :: Testable' prop => String -> prop -> (String, Property) Source #

A named property that should fail.

See also ok.

quickChecks :: [(String, Property)] -> IO Bool Source #

Execute a list of named properties.