Add andM and orM utility functions.
[matthijs/master-project/cλash.git] / cλash / CLasH / Utils.hs
index 484fe15ae2e33d43e3dd4b9bfee6fa4ee30117b1..822bd55dae5c7bb286552f08178dce7600ab5009 100644 (file)
@@ -44,3 +44,9 @@ concatM :: (Monad m) =>
   -> m [a]
 concatM = Monad.liftM concat
 
+isJustM :: (Monad m) => m (Maybe a) -> m Bool
+isJustM = Monad.liftM Maybe.isJust
+
+andM, orM :: (Monad m) => m [Bool] -> m Bool
+andM = Monad.liftM and
+orM = Monad.liftM or