From: Matthijs Kooijman Date: Wed, 5 Aug 2009 15:04:06 +0000 (+0200) Subject: Add catMaybesM and concatM helper functions. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;ds=sidebyside;h=63fcf1474e5b94cbfcee702edf6a334601329dfe;p=matthijs%2Fmaster-project%2Fc%CE%BBash.git Add catMaybesM and concatM helper functions. --- diff --git "a/c\316\273ash/CLasH/Utils.hs" "b/c\316\273ash/CLasH/Utils.hs" index 3ce4b9e..731de27 100644 --- "a/c\316\273ash/CLasH/Utils.hs" +++ "b/c\316\273ash/CLasH/Utils.hs" @@ -71,3 +71,14 @@ unzipM :: (Monad m) => m [(a, b)] -> m ([a], [b]) unzipM = Monad.liftM unzip + +catMaybesM :: (Monad m) => + m [Maybe a] + -> m [a] +catMaybesM = Monad.liftM Maybe.catMaybes + +concatM :: (Monad m) => + m [[a]] + -> m [a] +concatM = Monad.liftM concat +