From 9d7ce6bff0c9dcf66983eb100927fc7776c447f9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 29 Mar 2014 14:43:34 -0400 Subject: reorg matcher types; no non-type code changes --- Annex.hs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'Annex.hs') diff --git a/Annex.hs b/Annex.hs index 78329b5df..f00276e2f 100644 --- a/Annex.hs +++ b/Annex.hs @@ -10,7 +10,6 @@ module Annex ( Annex, AnnexState(..), - PreferredContentMap, new, run, eval, @@ -62,7 +61,6 @@ import Types.LockPool import Types.MetaData import Types.DesktopNotify import Types.CleanupActions -import qualified Utility.Matcher import qualified Data.Map as M import qualified Data.Set as S import Utility.Quvi (QuviVersion) @@ -81,9 +79,6 @@ newtype Annex a = Annex { runAnnex :: ReaderT (MVar AnnexState) IO a } Applicative ) -type Matcher a = Either [Utility.Matcher.Token a] (Utility.Matcher.Matcher a) -type PreferredContentMap = M.Map UUID (Utility.Matcher.Matcher (S.Set UUID -> MatchInfo -> Annex Bool)) - -- internal state storage data AnnexState = AnnexState { repo :: Git.Repo @@ -104,9 +99,10 @@ data AnnexState = AnnexState , forcebackend :: Maybe String , globalnumcopies :: Maybe NumCopies , forcenumcopies :: Maybe NumCopies - , limit :: Matcher (MatchInfo -> Annex Bool) + , limit :: ExpandableMatcher Annex , uuidmap :: Maybe UUIDMap - , preferredcontentmap :: Maybe PreferredContentMap + , preferredcontentmap :: Maybe (FileMatcherMap Annex) + , requiredcontentmap :: Maybe (FileMatcherMap Annex) , shared :: Maybe SharedRepository , forcetrust :: TrustMap , trustmap :: Maybe TrustMap @@ -146,9 +142,10 @@ newState c r = AnnexState , forcebackend = Nothing , globalnumcopies = Nothing , forcenumcopies = Nothing - , limit = Left [] + , limit = BuildingMatcher [] , uuidmap = Nothing , preferredcontentmap = Nothing + , requiredcontentmap = Nothing , shared = Nothing , forcetrust = M.empty , trustmap = Nothing -- cgit v1.2.3