Hoogle Search

Within LTS Haskell 24.25 (ghc-9.10.3)

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

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

    generic-random Generic.Random

    No documentation available.

  2. unGenericArbitraryU :: GenericArbitraryU a -> a

    generic-random Generic.Random

    No documentation available.

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

    generic-random Generic.Random

    No documentation available.

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

    generic-random Generic.Random

    No documentation available.

  5. 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.

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

    generic-random Generic.Random.DerivingVia

    No documentation available.

  7. 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.

  8. GenericArbitraryG :: a -> GenericArbitraryG (genList :: k) (weights :: k1) a

    generic-random Generic.Random.DerivingVia

    No documentation available.

  9. newtype GenericArbitraryRec (weights :: k) a

    generic-random Generic.Random.DerivingVia

    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.

  10. GenericArbitraryRec :: a -> GenericArbitraryRec (weights :: k) a

    generic-random Generic.Random.DerivingVia

    No documentation available.

Page 55 of many | Previous | Next