diff options
author | Joey Hess <joey@kitenet.net> | 2012-02-14 01:11:02 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-02-14 01:11:02 -0400 |
commit | afd33b0236b4875897c01a07a753584df8c5a2cb (patch) | |
tree | 167d9f1f1d83772632bd49a5d0ae47c45e0bb4df | |
parent | 2b28c70f5fd9c03cadd39615a4abd4d12f4a9c35 (diff) |
simplify
-rw-r--r-- | Seek.hs | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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 |