summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-03-16 12:28:17 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-03-16 12:28:17 -0400
commit771052a85e3a000911e8a438012e61b3caf9c1a8 (patch)
tree068b19c71758dca9ec76a1d07c8c291806419765 /Command
parentb06336fa3a146e9a0ef1a1307b1fc219570795c6 (diff)
optimize monadic ||
(||) used applicative style runs both conditions rather than short circuiting. Add an orM that properly short-circuits.
Diffstat (limited to 'Command')
-rw-r--r--Command/Find.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Command/Find.hs b/Command/Find.hs
index 33f512e39..f5bd2734b 100644
--- a/Command/Find.hs
+++ b/Command/Find.hs
@@ -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