Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- fromRange :: Random a => (a, a) -> Fake a
- pickAny :: Random a => Fake a
- suchThatMaybe :: Fake a -> (a -> Bool) -> Fake (Maybe a)
- suchThat :: Fake a -> (a -> Bool) -> Fake a
- oneof :: Foldable t => t (Fake a) -> Fake a
- elements :: Foldable t => t a -> Fake a
- listOf :: Int -> Fake a -> Fake [a]
- orderedList :: Ord a => Int -> Fake a -> Fake [a]
- frequency :: [(Int, Fake a)] -> Fake a
Documentation
fromRange :: Random a => (a, a) -> Fake a Source #
Generates a random element in the given inclusive range.
suchThatMaybe :: Fake a -> (a -> Bool) -> Fake (Maybe a) Source #
Tries to generate a value that satisfies a predicate.
oneof :: Foldable t => t (Fake a) -> Fake a Source #
Randomly uses one of the given generators. The input structure must be non-empty.
elements :: Foldable t => t a -> Fake a Source #
Generates one of the given values. The input list must be non-empty.