Hoogle Search

Within LTS Haskell 24.51 (ghc-9.10.3)

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

  1. mapMaybe :: (MonadGen m, GenBase m ~ Identity) => (a -> Maybe b) -> m a -> m b

    hedgehog Hedgehog.Internal.Gen

    Generates a value which is the result of the given function returning a Just. The original generator's shrink tree will be retained, with values returning Nothing removed. Subsequent shrinks of those values will be retained. Compared to mapMaybeT, shrinking may be slower but will be optimal. It's possible that the function will never return Just, or will only do so a larger size than we're currently running at. To avoid looping forever, we limit the number of retries, and grow the size with each retry. If we retry too many times then the whole generator is discarded.

  2. mapMaybeT :: MonadGen m => (a -> Maybe b) -> m a -> m b

    hedgehog Hedgehog.Internal.Gen

    Generates a value which is the result of the given function returning a Just. The original generator's shrink tree will be retained, with values returning Nothing removed. Subsequent shrinks of those values will be retained. Compared to mapMaybeT, shrinking may be slower but will be optimal. The type is also more general, because the shrink behavior from mapMaybe would force the entire shrink tree to be evaluated when applied to an impure tree. It's possible that the function will never return Just, or will only do so a larger size than we're currently running at. To avoid looping forever, we limit the number of retries, and grow the size with each retry. If we retry too many times then the whole generator is discarded.

  3. toTreeMaybeT :: MonadGen m => m a -> m (TreeT (MaybeT (GenBase m)) a)

    hedgehog Hedgehog.Internal.Gen

    Lift a predefined shrink tree in to a generator, ignoring the seed and the size.

  4. evalMaybe :: (MonadTest m, HasCallStack) => Maybe a -> m a

    hedgehog Hedgehog.Internal.Property

    Fails the test if the Maybe is Nothing, otherwise returns the value in the Just.

  5. evalMaybeM :: (MonadTest m, MonadCatch m, HasCallStack) => m (Maybe a) -> m a

    hedgehog Hedgehog.Internal.Property

    Fails the test if the action throws an exception, or if the Maybe is Nothing, otherwise returns the value in the Just.

  6. catMaybes :: Tree (Maybe a) -> Maybe (Tree a)

    hedgehog Hedgehog.Internal.Tree

    Takes a tree of Maybes and returns a tree of all the Just values. If the root of the tree is Nothing then Nothing is returned.

  7. filterMaybeT :: (a -> Bool) -> TreeT (MaybeT Identity) a -> TreeT (MaybeT Identity) a

    hedgehog Hedgehog.Internal.Tree

    Returns a tree containing only elements that match the predicate. If the root of the tree does not match the predicate then Nothing is returned.

  8. mapMaybe :: (a -> Maybe b) -> Tree a -> Maybe (Tree b)

    hedgehog Hedgehog.Internal.Tree

    No documentation available.

  9. mapMaybeMaybeT :: (a -> Maybe b) -> TreeT (MaybeT Identity) a -> TreeT (MaybeT Identity) b

    hedgehog Hedgehog.Internal.Tree

    No documentation available.

  10. mapMaybeT :: forall (m :: Type -> Type) a b . (Monad m, Alternative m) => (a -> Maybe b) -> TreeT m a -> TreeT m b

    hedgehog Hedgehog.Internal.Tree

    No documentation available.

Page 116 of many | Previous | Next