Hoogle Search

Within LTS Haskell 24.38 (ghc-9.10.3)

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

  1. seq :: MonadGen m => Range Int -> m a -> m (Seq a)

    hedgehog Hedgehog.Internal.Gen

    Generates a seq using a Range to determine the length.

  2. shuffleSeq :: MonadGen m => Seq a -> m (Seq a)

    hedgehog Hedgehog.Internal.Gen

    Generates a random permutation of a sequence. This shrinks towards the order of the sequence being identical to the input sequence.

  3. subsequence :: MonadGen m => [a] -> m [a]

    hedgehog Hedgehog.Internal.Gen

    Generates a random subsequence of a list. For example:

    Gen.print (Gen.subsequence [1..5])
    
    === Outcome ===
    [1,2,4]
    === Shrinks ===
    []
    [2,4]
    [1,4]
    [1,2]
    

  4. seq :: a -> b -> b

    hedgehog Hedgehog.Internal.Prelude

    The value of seq a b is bottom if a is bottom, and otherwise equal to b. In other words, it evaluates the first argument a to weak head normal form (WHNF). seq is usually introduced to improve performance by avoiding unneeded laziness. A note on evaluation order: the expression seq a b does not guarantee that a will be evaluated before b. The only guarantee given by seq is that the both a and b will be evaluated before seq returns a value. In particular, this means that b may be evaluated before a. If you need to guarantee a specific order of evaluation, you must use the function pseq from the "parallel" package.

  5. sequence :: (Traversable t, Monad m) => t (m a) -> m (t a)

    hedgehog Hedgehog.Internal.Prelude

    Evaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see sequence_.

    Examples

    Basic usage: The first two examples are instances where the input and and output of sequence are isomorphic.
    >>> sequence $ Right [1,2,3,4]
    [Right 1,Right 2,Right 3,Right 4]
    
    >>> sequence $ [Right 1,Right 2,Right 3,Right 4]
    Right [1,2,3,4]
    
    The following examples demonstrate short circuit behavior for sequence.
    >>> sequence $ Left [1,2,3,4]
    Left [1,2,3,4]
    
    >>> sequence $ [Left 0, Right 1,Right 2,Right 3,Right 4]
    Left 0
    

  6. sequenceA :: (Traversable t, Applicative f) => t (f a) -> f (t a)

    hedgehog Hedgehog.Internal.Prelude

    Evaluate each action in the structure from left to right, and collect the results. For a version that ignores the results see sequenceA_.

    Examples

    Basic usage: For the first two examples we show sequenceA fully evaluating a a structure and collecting the results.
    >>> sequenceA [Just 1, Just 2, Just 3]
    Just [1,2,3]
    
    >>> sequenceA [Right 1, Right 2, Right 3]
    Right [1,2,3]
    
    The next two example show Nothing and Just will short circuit the resulting structure if present in the input. For more context, check the Traversable instances for Either and Maybe.
    >>> sequenceA [Just 1, Just 2, Just 3, Nothing]
    Nothing
    
    >>> sequenceA [Right 1, Right 2, Right 3, Left 4]
    Left 4
    

  7. sequence_ :: (Foldable t, Monad m) => t (m a) -> m ()

    hedgehog Hedgehog.Internal.Prelude

    Evaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequence. sequence_ is just like sequenceA_, but specialised to monadic actions.

  8. dequeueMVar :: MVar [(TaskIndex, a)] -> (TasksRemaining -> TaskIndex -> a -> IO b) -> IO (Maybe (TaskIndex, b))

    hedgehog Hedgehog.Internal.Queue

    No documentation available.

  9. checkSequential :: MonadIO m => Group -> m Bool

    hedgehog Hedgehog.Internal.Runner

    Check a group of properties sequentially. Using Template Haskell for property discovery:

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

  10. Require :: (state Symbolic -> input Symbolic -> Bool) -> Callback (input :: (Type -> Type) -> Type) output (state :: (Type -> Type) -> Type)

    hedgehog Hedgehog.Internal.State

    A pre-condition for a command that must be verified before the command can be executed. This is mainly used during shrinking to ensure that it is still OK to run a command despite the fact that some previously executed commands may have been removed from the sequence.

Page 168 of many | Previous | Next