summaryrefslogtreecommitdiff
path: root/Types/FileMatcher.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2019-05-21 14:38:00 -0400
committerJoey Hess <joeyh@joeyh.name>2019-05-21 14:38:06 -0400
commite06feb7316af35b1277b7159a74c216c8f2e7422 (patch)
tree61754f4025d2cbb3d0f4e8bd7562b866e9a24c9a /Types/FileMatcher.hs
parentec11575d1764e1aee301e8d01d3e9eb09d79a9ea (diff)
honor preferred content when importing
Importing from a special remote honors its preferred content too; unwanted files are not imported. But, some preferred content expressions can't be checked before files are imported, and trying to import with such an expression will fail. Tested this with scenarios including changing the preferred content expression and making sure merging the import didn't delete files that were no longer wanted. There was one minor inefficiency mentioned in the todo that I punted on.
Diffstat (limited to 'Types/FileMatcher.hs')
-rw-r--r--Types/FileMatcher.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Types/FileMatcher.hs b/Types/FileMatcher.hs
index d7ad96d066..d0e24ba37d 100644
--- a/Types/FileMatcher.hs
+++ b/Types/FileMatcher.hs
@@ -31,7 +31,7 @@ data FileInfo = FileInfo
}
-- This is used when testing a matcher, with values to match against
--- provided by the user, rather than queried from files.
+-- provided in some way, rather than queried from files on disk.
data ProvidedInfo = ProvidedInfo
{ providedFilePath :: OptInfo FilePath
, providedKey :: OptInfo Key
@@ -48,7 +48,7 @@ getInfo :: MonadIO m => OptInfo a -> m a
getInfo (Right i) = return i
getInfo (Left e) = liftIO e
-type FileMatcherMap a = M.Map UUID (Utility.Matcher.Matcher (S.Set UUID -> MatchInfo -> a Bool))
+type FileMatcherMap a = M.Map UUID (FileMatcher a)
type MkLimit a = String -> Either String (MatchFiles a)