Test.QuickCheck.Monadic

QuickCheck-2.7.3: Automatic testing of Haskell programs

Safe Haskell | None
Language | Haskell98

Test.QuickCheck.Monadic

Description

Allows testing of monadic values. See the paper "Testing Monadic Code with QuickCheck": http://www.cse.chalmers.se/~rjmh/Papers/QuickCheckST.ps.

# Documentation

newtype PropertyM m a

Constructors

MkPropertyM |
Fields unPropertyM :: (a -> Gen (m Property)) -> Gen (m Property)

Instances

Monad m => Monad (PropertyM m) |
Functor (PropertyM m) |
Monad m => Applicative (PropertyM m) |

stop :: (Testable prop, Monad m) => prop -> PropertyM m a

assert :: Monad m => Bool -> PropertyM m ()

pre :: Monad m => Bool -> PropertyM m ()

run :: Monad m => m a -> PropertyM m a

pick :: (Monad m, Show a) => Gen a -> PropertyM m a

wp :: Monad m => m a -> (a -> PropertyM m b) -> PropertyM m b

forAllM :: (Monad m, Show a) => Gen a -> (a -> PropertyM m b) -> PropertyM m b

monitor :: Monad m => (Property -> Property) -> PropertyM m ()

monadic :: Monad m => (m Property -> Property) -> PropertyM m a -> Property

monadic' :: Monad m => PropertyM m a -> Gen (m Property)

monadicIO :: PropertyM IO a -> Property

monadicST :: (forall s. PropertyM (ST s) a) -> Property

runSTGen :: (forall s. Gen (ST s a)) -> Gen a