quickcheck-state-machine-0.0.0: Test monadic programs using state machine based models

Copyright(C) 2017 ATS Advanced Telematic Systems GmbH
LicenseBSD-style (see the file LICENSE)
MaintainerStevan Andjelkovic <stevan@advancedtelematic.com>
Stabilityprovisional
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe
LanguageHaskell2010

Test.StateMachine.Internal.Utils

Description

This module exports some QuickCheck utility functions. Some of these should perhaps be upstreamed.

Synopsis

Documentation

type Shrinker a = a -> [a] Source #

The type of a shrinker function.

genFromMaybe :: StateT s (StateT t Gen) (Maybe a) -> StateT s (StateT t Gen) a Source #

Keep generating until we actually get a value.

anyP :: (a -> Property) -> [a] -> Property Source #

Lifts any to properties.

liftProperty :: Monad m => Property -> PropertyM m () Source #

Lifts a plain property into a monadic property.

shrinkPropertyHelper :: Property -> (String -> Bool) -> Property Source #

Write a metaproperty on the output of QuickChecking a property using a boolean predicate on the output.

shrinkPropertyHelper' :: Property -> (String -> Property) -> Property Source #

Same as above, but using a property predicate.

shrinkPair :: Shrinker a -> Shrinker b -> Shrinker (a, b) Source #

Given shrinkers for the components of a pair we can shrink the pair.