QuickCheck-2.6: Automatic testing of Haskell programs

Safe Haskell | None

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 Source

Constructors

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

Instances

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

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

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

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

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

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

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

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

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

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

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

monadicIO :: PropertyM IO a -> Property Source

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

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