diff options
author | Joey Hess <joey@kitenet.net> | 2012-01-24 15:28:13 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-01-24 16:22:07 -0400 |
commit | ce5637498fd4158f98376009dee2d22bec2d1f68 (patch) | |
tree | e529bad846ce43424c9b535206b75f3b53f6cdee /Git/Command.hs | |
parent | ba6088b249902d456177af3c14f20f43b6def1fd (diff) |
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.
Diffstat (limited to 'Git/Command.hs')
-rw-r--r-- | Git/Command.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Git/Command.hs b/Git/Command.hs index 2350bb0ca..61b7728db 100644 --- a/Git/Command.hs +++ b/Git/Command.hs @@ -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. - |