diff options
author | Max Bolingbroke <batterseapower@hotmail.com> | 2008-08-07 22:48:53 +0000 |
---|---|---|
committer | Max Bolingbroke <batterseapower@hotmail.com> | 2008-08-07 22:48:53 +0000 |
commit | e07185eda0f37bd56ad876a2dfe73c956e432ffc (patch) | |
tree | d3db2576b973eaea488e1e66ed807cae95e12c3b /compiler/utils/Digraph.lhs | |
parent | 393f26621b762225b204b3dc78b05a3ecf08871e (diff) | |
download | haskell-e07185eda0f37bd56ad876a2dfe73c956e432ffc.tar.gz |
Move allM to MonadUtils
Diffstat (limited to 'compiler/utils/Digraph.lhs')
-rw-r--r-- | compiler/utils/Digraph.lhs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/utils/Digraph.lhs b/compiler/utils/Digraph.lhs index eadabdae7d..a2bb21572d 100644 --- a/compiler/utils/Digraph.lhs +++ b/compiler/utils/Digraph.lhs @@ -40,6 +40,7 @@ module Digraph( import Util ( sortLe ) import Outputable import Maybes ( expectJust ) +import MonadUtils ( allM ) -- Extensions import Control.Monad ( filterM, liftM, liftM2 ) @@ -588,8 +589,4 @@ vertexGroupsS provided g to_provide vertexReady :: Set s -> IntGraph -> Vertex -> ST s Bool vertexReady provided g v = liftM2 (&&) (liftM not $ provided `contains` v) (allM (provided `contains`) (g!v)) - -allM :: Monad m => (a -> m Bool) -> [a] -> m Bool -allM _ [] = return True -allM f (b:bs) = (f b) >>= (\bv -> if bv then allM f bs else return False) \end{code} |