Hoogle Search

Within LTS Haskell 24.10 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. unGenericArbitraryRec :: GenericArbitraryRec (weights :: k) a -> a

    generic-random Generic.Random

    No documentation available.

  2. unGenericArbitraryRecG :: GenericArbitraryRecG (genList :: k) (weights :: k1) a -> a

    generic-random Generic.Random

    No documentation available.

  3. unGenericArbitrarySingle :: GenericArbitrarySingle a -> a

    generic-random Generic.Random

    No documentation available.

  4. unGenericArbitrarySingleG :: GenericArbitrarySingleG (genList :: k) a -> a

    generic-random Generic.Random

    No documentation available.

  5. unGenericArbitraryU :: GenericArbitraryU a -> a

    generic-random Generic.Random

    No documentation available.

  6. unGenericArbitraryUG :: GenericArbitraryUG (genList :: k) a -> a

    generic-random Generic.Random

    No documentation available.

  7. unGenericArbitraryWith :: GenericArbitraryWith (opts :: k) (weights :: k1) a -> a

    generic-random Generic.Random

    No documentation available.

  8. newtype GenericArbitrary (weights :: k) a

    generic-random Generic.Random.DerivingVia

    Pick a constructor with a given distribution, and fill its fields with recursive calls to arbitrary.

    Example

    data X = ...
    deriving Arbitrary via (GenericArbitrary '[2, 3, 5] X)
    
    Picks the first constructor with probability 2/10, the second with probability 3/10, the third with probability 5/10. This newtype does no shrinking. To add generic shrinking, use AndShrinking. Uses genericArbitrary.

  9. GenericArbitrary :: a -> GenericArbitrary (weights :: k) a

    generic-random Generic.Random.DerivingVia

    No documentation available.

  10. newtype GenericArbitraryG (genList :: k) (weights :: k1) a

    generic-random Generic.Random.DerivingVia

    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.

Page 56 of many | Previous | Next