add concatMapM to base in control.monad

Carter Schonwald carter.schonwald at gmail.com
Fri Feb 8 17:13:24 UTC 2019


it should be noted that this can be viewed as a special case of the
witherable packages lovely interfaces

http://hackage.haskell.org/package/witherable-0.3 , which has related
things like
witherM :: Monad
<http://hackage.haskell.org/package/base-4.12.0.0/docs/Control-Monad.html#t:Monad>
m
=> (a -> m (Maybe
<http://hackage.haskell.org/package/base-4.12.0.0/docs/GHC-Maybe.html#t:Maybe>
b))
-> t a -> m (t b)

On Fri, Feb 8, 2019 at 12:04 PM Carter Schonwald <carter.schonwald at gmail.com>
wrote:

> friend asked me to raise this
>
> previously https://ghc.haskell.org/trac/ghc/ticket/2042
> seems like it iddn't happen last time because base lived outside of ghc?
>
> -- | The 'concatMapM' function generalizes 'concatMap' to arbitrary monads.
> concatMapM        :: (Monad m) => (a -> m [b]) -> [a] -> m [b]
> concatMapM f xs   =  liftM concat (mapM f xs)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20190208/7bd8cc68/attachment.html>


More information about the Libraries mailing list