summaryrefslogtreecommitdiff
path: root/Seek.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-02-14 01:11:02 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-02-14 01:11:02 -0400
commitafd33b0236b4875897c01a07a753584df8c5a2cb (patch)
tree167d9f1f1d83772632bd49a5d0ae47c45e0bb4df /Seek.hs
parent2b28c70f5fd9c03cadd39615a4abd4d12f4a9c35 (diff)
simplify
Diffstat (limited to 'Seek.hs')
-rw-r--r--Seek.hs10
1 files changed, 3 insertions, 7 deletions
diff --git a/Seek.hs b/Seek.hs
index 7f5506316..6f56f30f4 100644
--- a/Seek.hs
+++ b/Seek.hs
@@ -89,17 +89,13 @@ withNothing _ _ = error "This command takes no parameters."
prepFiltered :: (FilePath -> CommandStart) -> Annex [FilePath] -> Annex [CommandStart]
-prepFiltered a = prepFilteredGen a id
-
-prepFilteredGen :: (b -> CommandStart) -> (b -> FilePath) -> Annex [b] -> Annex [CommandStart]
-prepFilteredGen a d fs = do
+prepFiltered a fs = do
matcher <- Limit.getMatcher
map (proc matcher) <$> fs
where
- proc matcher v = do
- let f = d v
+ proc matcher f = do
ok <- matcher f
- if ok then a v else return Nothing
+ if ok then a f else return Nothing
notSymlink :: FilePath -> IO Bool
notSymlink f = liftIO $ not . isSymbolicLink <$> getSymbolicLinkStatus f