From 8e4bd621b9e8ecafc65e029f015a4c460ec95abc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 28 Sep 2011 17:38:41 -0400 Subject: [PATCH] enable short-circuiting optimisatons --- Command/Unused.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Command/Unused.hs b/Command/Unused.hs index b15aa001ad..e65f0790ba 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -161,7 +161,7 @@ unusedKeys = do {- Finds keys in the list that are not referenced in the git repository. -} excludeReferenced :: [Key] -> Annex [Key] --- excludeReferenced [] = return [] -- optimisation +excludeReferenced [] = return [] -- optimisation excludeReferenced l = do g <- Annex.gitRepo c <- liftIO $ Git.pipeRead g [Param "show-ref"] @@ -180,7 +180,7 @@ excludeReferenced l = do excludeReferenced' :: ([Annex [Key]]) -> S.Set Key -> Annex [Key] excludeReferenced' [] s = return $ S.toList s excludeReferenced' (a:as) s - -- | s == S.empty = return [] -- optimisation + | s == S.empty = return [] -- optimisation | otherwise = do referenced <- a let !s' = remove referenced