Gen
Monad #
This monad is used to formulate randomized computations with a parameter to specify the desired size of the result. This is a port of the Haskell QuickCheck library.
Main definitions #
Gen
monad
Tags #
random testing
References #
- https://hackage.haskell.org/package/QuickCheck
Monad to generate random examples to test properties with.
It has a Nat
parameter so that the caller can decide on the
size of the examples.
Instances For
Lift Random.random
to the Gen
monad.
Instances For
Lift BoundedRandom.randomR
to the Gen
monad.
Instances For
Generate a Nat
example between x
and y
(exclusively).
Instances For
Get access to the size parameter of the Gen
monad.
Instances For
Apply a function to the size parameter.
Instances For
Given a list of example generators, choose one to create an example.
Instances For
Given a list of examples, choose one to create an example.
Instances For
Generate a random permutation of a given list.
Equations
- One or more equations did not get rendered due to their size.
- SlimCheck.Gen.permutationOf [] = pure { val := [], property := (_ : [] ~ []) }
Instances For
Given two generators produces a tuple consisting out of the result of both