barecheck- QuickCheck implementations for common types

Safe HaskellSafe-Inferred



tree Source


:: (Int -> Int)

This function is applied to the size parameter. It determines the length of the list in child forests, to prevent this function from generating trees that are infinitely large. Here, supply a function that reduces the size parameter by some amount; using (`div` 2) is typical, though if you want to restrict the size of trees produced even more you might try something like (`div` 5).

-> Gen a

Generates a root label.

-> Gen (Tree a)