Hoogle Search

Within LTS Haskell 24.40 (ghc-9.10.3)

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

  1. class GGenValid (f :: Type -> Type)

    genvalidity Data.GenValidity

    No documentation available.

  2. class GValidRecursivelyShrink (f :: Type -> Type)

    genvalidity Data.GenValidity

    No documentation available.

  3. class GValidSubterms (f :: Type -> Type) a

    genvalidity Data.GenValidity

    No documentation available.

  4. class GValidSubtermsIncl (f :: Type -> Type) a

    genvalidity Data.GenValidity

    No documentation available.

  5. class Validity a => GenValid a

    genvalidity Data.GenValidity

    A class of types for which valid values can be generated to be valid.

    How to instantiate GenValid

    Step 1: Try to instantiate GenValid without overriding any functions. It is possible that, if few values are valid or if validity checking is expensive, the resulting generator is too slow. In that case, go to Step 2. Step 2: Consider using genValidStructurallyWithoutExtraChecking and shrinkValidStructurallyWithoutExtraFiltering to speed up generation. This only works if your type has a derived or trivial Validity instance. Step 3: If that still is not fast enough, consider writing your own generator and shrinking function. Make sure to generate any possible valid value, but only valid values.

    A note about Arbitrary

    If you also write Arbitrary instances for GenValid types, it may be best to simply use
    instance Arbitrary A where
    arbitrary = genValid
    shrink = shrinkValid
    

  6. gGenValid :: GGenValid f => Gen (f a)

    genvalidity Data.GenValidity

    No documentation available.

  7. gValidRecursivelyShrink :: GValidRecursivelyShrink f => f a -> [f a]

    genvalidity Data.GenValidity

    No documentation available.

  8. gValidSubterms :: GValidSubterms f a => f a -> [a]

    genvalidity Data.GenValidity

    No documentation available.

  9. gValidSubtermsIncl :: GValidSubtermsIncl f a => f a -> [a]

    genvalidity Data.GenValidity

    No documentation available.

  10. genValid :: GenValid a => Gen a

    genvalidity Data.GenValidity

    Generate a valid datum, this should cover all possible valid values in the type The default implementation is as follows:

    genValid = genValidStructurally
    
    To speed up testing, it may be a good idea to implement this yourself. If you do, make sure that it is possible to generate all possible valid data, otherwise your testing may not cover all cases.

Page 425 of many | Previous | Next