Module

Jack.Gen

Package
purescript-jack
Repository
jystic/purescript-jack

#Gen Source

newtype Gen a

A generator for random values of type @a@ that includes all the possible shrink scenarios for @a@.

Constructors

Instances

#runGen Source

runGen :: forall a. Gen a -> Random (Tree a)

#mkGen Source

mkGen :: forall a. (a -> List a) -> Random a -> Gen a

Create a 'Gen' from a shrink function and a 'Random'.

#mkGen_ Source

mkGen_ :: forall a. Random a -> Gen a

Create a non-shrinking 'Gen' from a 'Random'.

#mapRandom Source

mapRandom :: forall b a. (Random (Tree a) -> Random (Tree b)) -> Gen a -> Gen b

Map over the 'Random' inside of 'Gen'.

#mapTree Source

mapTree :: forall b a. (Tree a -> Tree b) -> Gen a -> Gen b

Map over the 'Tree' inside a 'Gen'.

#reshrink Source

reshrink :: forall a. (a -> Array a) -> Gen a -> Gen a

Apply an additional shrinker to all generated trees.

#reshrinkLazy Source

reshrinkLazy :: forall a. (a -> List a) -> Gen a -> Gen a

Apply an additional shrinker to all generated trees.