Hoogle Search

Within LTS Haskell 24.67 (ghc-9.10.3)

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

  1. checkParallel :: MonadIO m => Group -> m Bool

    hedgehog Hedgehog

    Check a group of properties in parallel. Warning: although this check function runs tests faster than checkSequential, it should be noted that it may cause problems with properties that are not self-contained. For example, if you have a group of tests which all use the same database table, you may find that they interfere with each other when being run in parallel. Using Template Haskell for property discovery:

    tests :: IO Bool
    tests =
    checkParallel $$(discover)
    
    With manually specified properties:
    tests :: IO Bool
    tests =
    checkParallel $ Group "Test.Example" [
    ("prop_reverse", prop_reverse)
    ]
    

  2. commandCallbacks :: Command (gen :: Type -> Type) (m :: Type -> Type) (state :: (Type -> Type) -> Type) -> [Callback input output state]

    hedgehog Hedgehog

    A set of callbacks which provide optional command configuration such as pre-condtions, post-conditions and state updates.

  3. executeParallel :: (MonadTest m, MonadCatch m, MonadBaseControl IO m, HasCallStack) => (forall (v :: Type -> Type) . () => state v) -> Parallel m state -> m ()

    hedgehog Hedgehog

    Executes the prefix actions sequentially, then executes the two branches in parallel, verifying that no exceptions are thrown and that there is at least one sequential interleaving where all the post-conditions are met. To generate parallel actions to execute, see the parallel combinator in the Hedgehog.Gen module.

  4. forAll :: forall (m :: Type -> Type) a . (Monad m, Show a, HasCallStack) => Gen a -> PropertyT m a

    hedgehog Hedgehog

    Generates a random input for the test by running the provided generator.

  5. forAllWith :: forall (m :: Type -> Type) a . (Monad m, HasCallStack) => (a -> String) -> Gen a -> PropertyT m a

    hedgehog Hedgehog

    Generates a random input for the test by running the provided generator. This is a the same as forAll but allows the user to provide a custom rendering function. This is useful for values which don't have a Show instance.

  6. parallelBranch1 :: Parallel (m :: Type -> Type) (state :: (Type -> Type) -> Type) -> [Action m state]

    hedgehog Hedgehog

    The first branch.

  7. parallelBranch2 :: Parallel (m :: Type -> Type) (state :: (Type -> Type) -> Type) -> [Action m state]

    hedgehog Hedgehog

    The second branch.

  8. parallelPrefix :: Parallel (m :: Type -> Type) (state :: (Type -> Type) -> Type) -> [Action m state]

    hedgehog Hedgehog

    The sequential prefix.

  9. parallel :: forall gen (m :: Type -> Type) state . (MonadGen gen, MonadTest m) => Range Int -> Range Int -> (forall (v :: Type -> Type) . () => state v) -> [Command gen m state] -> gen (Parallel m state)

    hedgehog Hedgehog.Gen

    Given the initial model state and set of commands, generates prefix actions to be run sequentially, followed by two branches to be run in parallel.

  10. small :: MonadGen m => m a -> m a

    hedgehog Hedgehog.Gen

    Make a generator smaller by scaling its size parameter.

Page 221 of many | Previous | Next