aboutsummaryrefslogtreecommitdiff
path: root/Command.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-03-14 17:43:34 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-03-14 17:43:34 -0400
commit60ab3d84e188b8dd3a284d962df25bbee41ff1cb (patch)
tree768d4f632bab0152dbc1ca72f81fc3b9c7915c0a /Command.hs
parenta4f72c9625486786a4549cf4db1b542ea89da7c7 (diff)
added ifM and nuked 11 lines of code
no behavior changes
Diffstat (limited to 'Command.hs')
-rw-r--r--Command.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/Command.hs b/Command.hs
index 13ea167bb..0dff0c862 100644
--- a/Command.hs
+++ b/Command.hs
@@ -65,9 +65,7 @@ stop = return Nothing
{- Stops unless a condition is met. -}
stopUnless :: Annex Bool -> Annex (Maybe a) -> Annex (Maybe a)
-stopUnless c a = do
- ok <- c
- if ok then a else stop
+stopUnless c a = ifM c ( a , stop )
{- Prepares to run a command via the check and seek stages, returning a
- list of actions to perform to run the command. -}