added ifM and nuked 11 lines of code
no behavior changes
This commit is contained in:
parent
a4f72c9625
commit
60ab3d84e1
17 changed files with 151 additions and 162 deletions
|
@ -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. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue