remove Utility.Conditional and use IfElse

This drops the >>! and >>? with the nice low fixity. IfElse does have
undocumented >>=>>! and >>=>>? operators, but I deem that too fishy.
Anyway, using whenM and unlessM is easier; I sometimes mixed the operators
up.
This commit is contained in:
Joey Hess 2012-01-24 15:28:13 -04:00
parent ba6088b249
commit ce5637498f
12 changed files with 23 additions and 40 deletions

View file

@ -30,8 +30,8 @@ runBool subcommand params repo = assertLocal repo $
{- Runs git in the specified repo, throwing an error if it fails. -}
run :: String -> [CommandParam] -> Repo -> IO ()
run subcommand params repo = assertLocal repo $
runBool subcommand params repo
>>! error $ "git " ++ show params ++ " failed"
unlessM (runBool subcommand params repo) $
error $ "git " ++ show params ++ " failed"
{- Runs a git subcommand and returns its output, lazily.
-