Hoogle Search

Within LTS Haskell 24.18 (ghc-9.10.3)

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

  1. mapM_ :: (MonoFoldable mono, Applicative m) => (Element mono -> m ()) -> mono -> m ()

    classy-prelude-yesod ClassyPrelude.Yesod

    Synonym for omapM_

  2. mapM_C :: Monad m => (a -> m ()) -> ConduitT a o m ()

    classy-prelude-yesod ClassyPrelude.Yesod

    Apply the action to all values in the stream. Note: if you want to pass the values instead of consuming them, use iterM instead.

  3. mapM_CE :: (Monad m, MonoFoldable mono) => (Element mono -> m ()) -> ConduitT mono o m ()

    classy-prelude-yesod ClassyPrelude.Yesod

    Apply the action to all elements in the chunked stream. Note: the same caveat as with mapM_C applies. If you don't want to consume the values, you can use iterM:

    iterM (omapM_ f)
    

  4. mapMaybe :: (a -> Maybe b) -> [a] -> [b]

    classy-prelude-yesod ClassyPrelude.Yesod

    The mapMaybe function is a version of map which can throw out elements. In particular, the functional argument returns something of type Maybe b. If this is Nothing, no element is added on to the result list. If it is Just b, then b is included in the result list.

    Examples

    Using mapMaybe f x is a shortcut for catMaybes $ map f x in most cases:
    >>> import GHC.Internal.Text.Read ( readMaybe )
    
    >>> let readMaybeInt = readMaybe :: String -> Maybe Int
    
    >>> mapMaybe readMaybeInt ["1", "Foo", "3"]
    [1,3]
    
    >>> catMaybes $ map readMaybeInt ["1", "Foo", "3"]
    [1,3]
    
    If we map the Just constructor, the entire list should be returned:
    >>> mapMaybe Just [1,2,3]
    [1,2,3]
    

  5. mapM_ :: forall t k o f a b u . (Foldable t k k, WellPointed k, Monoidal f k k, u ~ UnitObject k, ObjectPair k (f u) (t a), ObjectPair k (f u) a, ObjectPair k u (t a), ObjectPair k (t a) u, ObjectPair k (f u) (f u), ObjectPair k u u, ObjectPair k b u, Object k (f b)) => k a (f b) -> k (t a) (f u)

    constrained-categories Control.Category.Constrained.Prelude

    The distinction between mapM_ and traverse_ doesn't really make sense on grounds of Monoidal / Applicative vs Monad, but it has in fact some benefits to restrict this to endofunctors, to make the constraint list at least somewhat shorter.

  6. mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()

    constrained-categories Control.Category.Hask

    Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM. mapM_ is just like traverse_, but specialised to monadic actions.

  7. mapM_ :: forall t k o f a b u . (Foldable t k k, WellPointed k, Monoidal f k k, u ~ UnitObject k, ObjectPair k (f u) (t a), ObjectPair k (f u) a, ObjectPair k u (t a), ObjectPair k (t a) u, ObjectPair k (f u) (f u), ObjectPair k u u, ObjectPair k b u, Object k (f b)) => k a (f b) -> k (t a) (f u)

    constrained-categories Control.Monad.Constrained

    The distinction between mapM_ and traverse_ doesn't really make sense on grounds of Monoidal / Applicative vs Monad, but it has in fact some benefits to restrict this to endofunctors, to make the constraint list at least somewhat shorter.

  8. mapM_ :: forall t k o f a b u . (Foldable t k k, WellPointed k, Monoidal f k k, u ~ UnitObject k, ObjectPair k (f u) (t a), ObjectPair k (f u) a, ObjectPair k u (t a), ObjectPair k (t a) u, ObjectPair k (f u) (f u), ObjectPair k u u, ObjectPair k b u, Object k (f b)) => k a (f b) -> k (t a) (f u)

    constrained-categories Data.Foldable.Constrained

    The distinction between mapM_ and traverse_ doesn't really make sense on grounds of Monoidal / Applicative vs Monad, but it has in fact some benefits to restrict this to endofunctors, to make the constraint list at least somewhat shorter.

  9. mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()

    copilot-language Copilot.Language.Prelude

    Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM. mapM_ is just like traverse_, but specialised to monadic actions.

  10. mapMG :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph

    ghc-lib GHC

    Map a function f over all the ModSummaries. To preserve invariants f can't change the isBoot status.

Page 60 of many | Previous | Next