Copyright | (C) 2017 ATS Advanced Telematic Systems GmbH |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Stevan Andjelkovic <stevan@advancedtelematic.com> |
Stability | provisional |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe |
Language | Haskell2010 |
This module exports some QuickCheck utility functions. Some of these should perhaps be upstreamed.
- type Shrinker a = a -> [a]
- genFromMaybe :: StateT s (StateT t Gen) (Maybe a) -> StateT s (StateT t Gen) a
- anyP :: (a -> Property) -> [a] -> Property
- liftProperty :: Monad m => Property -> PropertyM m ()
- shrinkPropertyHelper :: Property -> (String -> Bool) -> Property
- shrinkPropertyHelper' :: Property -> (String -> Property) -> Property
- shrinkPair :: Shrinker a -> Shrinker b -> Shrinker (a, b)
Documentation
genFromMaybe :: StateT s (StateT t Gen) (Maybe a) -> StateT s (StateT t Gen) a Source #
Keep generating until we actually get a value.
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.