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.
This commit is contained in:
parent
75a3f5027f
commit
c91929f693
16 changed files with 60 additions and 63 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue