From 63fcf1474e5b94cbfcee702edf6a334601329dfe Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Wed, 5 Aug 2009 17:04:06 +0200 Subject: [PATCH] Add catMaybesM and concatM helper functions. --- "c\316\273ash/CLasH/Utils.hs" | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 + -- 2.30.2