aboutsummaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-03-29 14:43:34 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-03-29 14:43:34 -0400
commit9d7ce6bff0c9dcf66983eb100927fc7776c447f9 (patch)
treeb3cf2fe44d25b092b16f08ba3680bf5719dc3a6c /Annex.hs
parentbce30628d5e6df5b64c482bc5fe161576efaaa79 (diff)
reorg matcher types; no non-type code changes
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs13
1 files changed, 5 insertions, 8 deletions
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