Module

Test.StrongCheck.Arbitrary

Package
purescript-strongcheckDEPRECATED
Repository
purescript-contrib/purescript-strongcheck

#Arbitrary Source

class Arbitrary t  where

The Arbitrary class represents those types whose values can be randomly-generated.

arbitrary uses the Gen monad to express a random generator for the type t. Combinators in the Test.StrongCheck.Gen module can be used to construct random generators.

Members

Instances

#Coarbitrary Source

class Coarbitrary t  where

The Coarbitrary class represents types which appear on the left of an Arbitrary function arrow.

To construct an Arbitrary instance for the type a -> b, we need to use the input of type a to perturb a random generator for b. This is the role of the coarbitrary function.

Coarbitrary instances can be written using the perturbGen function.

Members

Instances