From 842ca9c4b684ec21b9e5a99b3742db5f36a1440f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 18 Jan 2014 14:51:55 -0400 Subject: improve matcher data type to allow matching Keys, instead of just files (no behavior changes) --- Types/FileMatcher.hs | 6 ++++++ Types/Limit.hs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'Types') diff --git a/Types/FileMatcher.hs b/Types/FileMatcher.hs index fc442b604..e2d4eadc1 100644 --- a/Types/FileMatcher.hs +++ b/Types/FileMatcher.hs @@ -7,6 +7,12 @@ module Types.FileMatcher where +import Types.Key (Key) + +data MatchInfo + = MatchingFile FileInfo + | MatchingKey Key + data FileInfo = FileInfo { relFile :: FilePath -- may be relative to cwd , matchFile :: FilePath -- filepath to match on; may be relative to top diff --git a/Types/Limit.hs b/Types/Limit.hs index 4436f6953..2b009a758 100644 --- a/Types/Limit.hs +++ b/Types/Limit.hs @@ -17,4 +17,4 @@ import qualified Data.Set as S type MkLimit = String -> Either String MatchFiles type AssumeNotPresent = S.Set UUID -type MatchFiles = AssumeNotPresent -> FileInfo -> Annex Bool +type MatchFiles = AssumeNotPresent -> MatchInfo -> Annex Bool -- cgit v1.2.3