Hoogle Search

Within LTS Haskell 24.19 (ghc-9.10.3)

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

  1. concatMapM :: (Monad m, Traversable f) => (a -> m [b]) -> f a -> m [b]

    ghc GHC.Utils.Monad

    Monadic version of concatMap

  2. comapM :: (Distributive g, Monad m) => (m a -> b) -> m (g a) -> g b

    distributive Data.Distributive

    The dual of mapM

    comapM f = fmap f . distributeM
    

  3. imapM_ :: (FoldableWithIndex i t, Monad m) => (i -> a -> m b) -> t a -> m ()

    indexed-traversable Data.Foldable.WithIndex

    Run monadic actions for each target of an IndexedFold or IndexedTraversal with access to the index, discarding the results. When you don't need access to the index then mapMOf_ is more flexible in what it accepts.

    mapM_imapM . const
    

  4. imapM :: (TraversableWithIndex i t, Monad m) => (i -> a -> m b) -> t a -> m (t b)

    indexed-traversable Data.Traversable.WithIndex

    Map each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results, with access the index. When you don't need access to the index mapM is more liberal in what it can accept.

    mapMimapM . const
    

  5. postmapM :: Monad m => (a -> m r) -> FoldM m x a -> FoldM m x r

    foldl Control.Foldl

    (postmapM f folder) returns a new FoldM where f is applied to the final value.

    postmapM pure = id
    
    postmapM (f >=> g) = postmapM g . postmapM f
    
    postmapM k (pure r) = lifts (k r)
    

  6. premapM :: Monad m => (a -> m b) -> FoldM m b r -> FoldM m a r

    foldl Control.Foldl

    (premapM f folder) returns a new FoldM where f is applied to each input element

    premapM return = id
    
    premapM (f <=< g) = premap g . premap f
    
    premapM k (pure r) = pure r
    
    premapM k (f <*> x) = premapM k f <*> premapM k x
    

  7. premapM :: Monad m => (a -> m b) -> ScanM m b r -> ScanM m a r

    foldl Control.Scanl

    (premapM f scaner) returns a new ScanM where f is applied to each input element

    premapM return = id
    
    premapM (f <=< g) = premap g . premap f
    
    premapM k (pure r) = pure r
    
    premapM k (f <*> x) = premapM k f <*> premapM k x
    

  8. intMapMaybe :: Int -> T (IntMap elem) (Maybe elem)

    data-accessor Data.Accessor.Container

    No documentation available.

  9. gmapM :: (GTraversable t, Monad m) => (a -> m b) -> t a -> m (t b)

    generic-deriving Generics.Deriving.Traversable

    No documentation available.

  10. contramapM :: (a -> IO b) -> OutputStream b -> IO (OutputStream a)

    io-streams System.IO.Streams.Combinators

    Contravariant counterpart to mapM. contramapM f s passes all input to s through the IO action f Satisfies the following laws:

    Streams.contramapM (f >=> g) = Streams.contramapM g >=> Streams.contramapM f
    Streams.contramapM return = return
    

Page 70 of many | Previous | Next