Hoogle Search
Within LTS Haskell 24.9 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
GenericArbitrary :: a -> GenericArbitrary (weights :: k) ageneric-random Generic.Random No documentation available.
newtype
GenericArbitraryG (genList :: k) (weights :: k1) ageneric-random Generic.Random GenericArbitrary with explicit generators.
Example
data X = ... deriving Arbitrary via (GenericArbitraryG CustomGens '[2, 3, 5] X)
where, for example, custom generators to override String and Int fields might look as follows:type CustomGens = CustomString :+ CustomInt
Note on multiple matches
Multiple generators may match a given field: the first will be chosen. This newtype does no shrinking. To add generic shrinking, use AndShrinking. Uses genericArbitraryG.GenericArbitraryG :: a -> GenericArbitraryG (genList :: k) (weights :: k1) ageneric-random Generic.Random No documentation available.
newtype
GenericArbitraryRec (weights :: k) ageneric-random Generic.Random Decrease size at every recursive call, but don't do anything different at size 0.
data X = ... deriving Arbitrary via (GenericArbitraryRec '[2, 3, 5] X)
N.B.: This replaces the generator for fields of type [t] with listOf' arbitrary instead of listOf arbitrary (i.e., arbitrary for lists). This newtype does no shrinking. To add generic shrinking, use AndShrinking. Uses genericArbitraryRec.GenericArbitraryRec :: a -> GenericArbitraryRec (weights :: k) ageneric-random Generic.Random No documentation available.
newtype
GenericArbitraryRecG (genList :: k) (weights :: k1) ageneric-random Generic.Random genericArbitraryRec with explicit generators. See also genericArbitraryG. This newtype does no shrinking. To add generic shrinking, use AndShrinking. Uses genericArbitraryRecG.
GenericArbitraryRecG :: a -> GenericArbitraryRecG (genList :: k) (weights :: k1) ageneric-random Generic.Random No documentation available.
newtype
GenericArbitrarySingle ageneric-random Generic.Random arbitrary for types with one constructor. Equivalent to GenericArbitraryU, with a stricter type. This newtype does no shrinking. To add generic shrinking, use AndShrinking. Uses genericArbitrarySingle.
GenericArbitrarySingle :: a -> GenericArbitrarySingle ageneric-random Generic.Random No documentation available.
newtype
GenericArbitrarySingleG (genList :: k) ageneric-random Generic.Random genericArbitrarySingle with explicit generators. See also GenericArbitraryG. This newtype does no shrinking. To add generic shrinking, use AndShrinking. Uses genericArbitrarySingleG.