diff options
author | Joey Hess <joey@kitenet.net> | 2011-05-17 03:10:13 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-05-17 03:13:11 -0400 |
commit | c91929f6934fc4e94603d0fa004e824d5e2cfb65 (patch) | |
tree | e958f5b4dc1209afb90c786493164c351dea4b9a /Command/Drop.hs | |
parent | 75a3f5027f74565d909fb940893636d081d9872a (diff) |
add whenM and unlessM
Just more golfing.. I am pretty sure something in a library somewhere can
do this, but I have been unable to find it.
Diffstat (limited to 'Command/Drop.hs')
-rw-r--r-- | Command/Drop.hs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Command/Drop.hs b/Command/Drop.hs index 05c956fdd..07cec1a67 100644 --- a/Command/Drop.hs +++ b/Command/Drop.hs @@ -7,8 +7,6 @@ module Command.Drop where -import Control.Monad (when) - import Command import qualified Backend import LocationLog @@ -46,7 +44,6 @@ perform key backend numcopies = do cleanup :: Key -> CommandCleanup cleanup key = do - inannex <- inAnnex key - when inannex $ removeAnnex key + whenM (inAnnex key) $ removeAnnex key logStatus key ValueMissing return True |