aboutsummaryrefslogtreecommitdiff
path: root/Limit.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-02-11 01:35:11 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-02-11 10:48:52 -0400
commitf4dee5a48229d6e17c87b7346509bf37811367d5 (patch)
tree44ec976fed590223c00cf0725bb5d5e28305e592 /Limit.hs
parent82feaf7305d2e40155ffd8e80c5f3bf6c9a71bd6 (diff)
more hlint
Diffstat (limited to 'Limit.hs')
-rw-r--r--Limit.hs17
1 files changed, 6 insertions, 11 deletions
diff --git a/Limit.hs b/Limit.hs
index 6f4101633..eae608e41 100644
--- a/Limit.hs
+++ b/Limit.hs
@@ -9,11 +9,6 @@
module Limit where
-import Data.Time.Clock.POSIX
-import qualified Data.Set as S
-import qualified Data.Map as M
-import System.Path.WildMatch
-
import Common.Annex
import qualified Annex
import qualified Utility.Matcher
@@ -35,14 +30,14 @@ import Git.Types (RefDate(..))
import Utility.HumanTime
import Utility.DataUnits
+import Data.Time.Clock.POSIX
+import qualified Data.Set as S
+import qualified Data.Map as M
+import System.Path.WildMatch
+
#ifdef WITH_TDFA
import Text.Regex.TDFA
import Text.Regex.TDFA.String
-#else
-#ifndef mingw32_HOST_OS
-import System.Path.WildMatch
-import Types.FileMatcher
-#endif
#endif
{- Checks if there are user-specified limits. -}
@@ -156,7 +151,7 @@ limitPresent u _ = Right $ const $ checkKey $ \key -> do
limitInDir :: FilePath -> MkLimit
limitInDir dir = const $ Right $ const go
where
- go (MatchingFile fi) = return $ any (== dir) $ splitPath $ takeDirectory $ matchFile fi
+ go (MatchingFile fi) = return $ elem dir $ splitPath $ takeDirectory $ matchFile fi
go (MatchingKey _) = return False
{- Adds a limit to skip files not believed to have the specified number