diff options
author | Joey Hess <joey@kitenet.net> | 2013-04-03 03:52:41 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-04-03 03:52:41 -0400 |
commit | 6543d5406c64bb00a58e74305ec9ca09a49faf0b (patch) | |
tree | 5e33ceb3ea5b5bf5ad4f2cbb7d08b19cb1026897 /Annex/FileMatcher.hs | |
parent | f0dd3c6c1624cb5441eab175c6f5a683d3806885 (diff) |
hlint
Diffstat (limited to 'Annex/FileMatcher.hs')
-rw-r--r-- | Annex/FileMatcher.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Annex/FileMatcher.hs b/Annex/FileMatcher.hs index c32402baf..220fea286 100644 --- a/Annex/FileMatcher.hs +++ b/Annex/FileMatcher.hs @@ -47,7 +47,7 @@ parsedToMatcher parsed = case partitionEithers parsed of parseToken :: MkLimit -> GroupMap -> String -> Either String (Token MatchFiles) parseToken checkpresent groupmap t - | any (== t) Utility.Matcher.tokens = Right $ Utility.Matcher.token t + | t `elem` tokens = Right $ token t | t == "present" = use checkpresent | otherwise = maybe (Left $ "near " ++ show t) use $ M.lookup k $ M.fromList @@ -61,7 +61,7 @@ parseToken checkpresent groupmap t ] where (k, v) = separate (== '=') t - use a = Utility.Matcher.Operation <$> a v + use a = Operation <$> a v {- This is really dumb tokenization; there's no support for quoted values. - Open and close parens are always treated as standalone tokens; @@ -76,7 +76,7 @@ tokenizeMatcher = filter (not . null ) . concatMap splitparens . words largeFilesMatcher :: Annex FileMatcher largeFilesMatcher = go =<< annexLargeFiles <$> Annex.getGitConfig where - go Nothing = return $ matchAll + go Nothing = return matchAll go (Just expr) = do m <- groupMap u <- getUUID |