optimize monadic ||
(||) used applicative style runs both conditions rather than short circuiting. Add an orM that properly short-circuits.
This commit is contained in:
parent
b06336fa3a
commit
771052a85e
4 changed files with 15 additions and 9 deletions
|
@ -42,7 +42,7 @@ start :: Maybe Utility.Format.Format -> FilePath -> (Key, Backend) -> CommandSta
|
|||
start format file (key, _) = do
|
||||
-- only files inAnnex are shown, unless the user has requested
|
||||
-- others via a limit
|
||||
whenM (liftM2 (||) limited (inAnnex key)) $
|
||||
whenM (orM limited (inAnnex key)) $
|
||||
unlessM (showFullJSON vars) $
|
||||
case format of
|
||||
Nothing -> liftIO $ putStrLn file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue