Portability | non-portable |
---|---|

Stability | experimental |

Maintainer | generics@haskell.org |

Summary: Generic Test.QuickCheck instances.

- type FrequencyTable = [(String, Int)]
- class Arbitrary f where
- harbitrary :: (Int -> Gen a) -> FrequencyTable -> Int -> Int -> Maybe (Gen (f a))

- arbitraryWith :: (Regular a, Arbitrary (PF a)) => FrequencyTable -> Int -> Gen a
- arbitrary :: (Regular a, Arbitrary (PF a)) => Gen a
- class CoArbitrary f where
- corbitrary :: (Regular b, CoArbitrary (PF b)) => b -> Gen a -> Gen a

# Generic arbitrary functionality

type FrequencyTable = [(String, Int)]Source

Generic Arbitrary class

harbitrary :: (Int -> Gen a) -> FrequencyTable -> Int -> Int -> Maybe (Gen (f a))Source

arbitraryWith :: (Regular a, Arbitrary (PF a)) => FrequencyTable -> Int -> Gen aSource

Generic arbitrary function, sized and with custom constructor frequencies.

arbitrary :: (Regular a, Arbitrary (PF a)) => Gen aSource

Generic arbitrary function with default sizes and constructor frequencies.

# Generic coarbitrary functionality

class CoArbitrary f whereSource

Generic CoArbitrary class

CoArbitrary I | |

CoArbitrary U | |

CoArbitrary a => CoArbitrary (K a) | |

(CoArbitrary f, CoArbitrary g, ConNames g) => CoArbitrary (:+: f g) | |

(CoArbitrary f, CoArbitrary g) => CoArbitrary (:*: f g) | |

(CoArbitrary f, Constructor c) => CoArbitrary (C c f) |

corbitrary :: (Regular b, CoArbitrary (PF b)) => b -> Gen a -> Gen aSource

Generic coarbitrary function.