packages feed

extra 1.4.6 → 1.4.7

raw patch · 4 files changed

+11/−4 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Control.Monad.Extra: concatForM :: Monad m => [a] -> (a -> m [b]) -> m [b]
+ Extra: concatForM :: Monad m => [a] -> (a -> m [b]) -> m [b]

Files

CHANGES.txt view
@@ -1,5 +1,7 @@ Changelog for Extra +1.4.7+    #21, add concatForM 1.4.6     #11, add maybeM and eitherM 1.4.5
extra.cabal view
@@ -1,7 +1,7 @@ cabal-version:      >= 1.10 build-type:         Simple name:               extra-version:            1.4.6+version:            1.4.7 license:            BSD3 license-file:       LICENSE category:           Development
src/Control/Monad/Extra.hs view
@@ -12,7 +12,7 @@     -- * Loops     loopM, whileM,     -- * Lists-    partitionM, concatMapM, mconcatMapM, mapMaybeM, findM, firstJustM,+    partitionM, concatMapM, concatForM, mconcatMapM, mapMaybeM, findM, firstJustM,     -- * Booleans     whenM, unlessM, ifM, notM, (||^), (&&^), orM, andM, anyM, allM     ) where@@ -73,7 +73,12 @@ concatMapM op = foldr f (return [])     where f x xs = do x <- op x; if null x then xs else do xs <- xs; return $ x++xs --- | A version of 'mconcatMapM' that works with a monadic predicate.+-- | Like 'concatMapM', but has its arguments flipped, so can be used+--   instead of the common @fmap concat $ forM@ pattern.+concatForM :: Monad m => [a] -> (a -> m [b]) -> m [b]+concatForM = flip concatMapM++-- | A version of 'mconcatMap' that works with a monadic predicate. mconcatMapM :: (Monad m, Monoid b) => (a -> m b) -> [a] -> m b mconcatMapM f = liftM mconcat . mapM f 
src/Extra.hs view
@@ -14,7 +14,7 @@     retry, retryBool, showException, stringException, errorIO, ignore, catch_, handle_, try_, catchJust_, handleJust_, tryJust_, catchBool, handleBool, tryBool,     -- * Control.Monad.Extra     -- | Extra functions available in @"Control.Monad.Extra"@.-    whenJust, whenJustM, unit, maybeM, eitherM, loopM, whileM, partitionM, concatMapM, mconcatMapM, mapMaybeM, findM, firstJustM, whenM, unlessM, ifM, notM, (||^), (&&^), orM, andM, anyM, allM,+    whenJust, whenJustM, unit, maybeM, eitherM, loopM, whileM, partitionM, concatMapM, concatForM, mconcatMapM, mapMaybeM, findM, firstJustM, whenM, unlessM, ifM, notM, (||^), (&&^), orM, andM, anyM, allM,     -- * Data.Either.Extra     -- | Extra functions available in @"Data.Either.Extra"@.     isLeft, isRight, fromLeft, fromRight, fromEither,