diff options
author | Joey Hess <joey@kitenet.net> | 2011-01-25 21:02:34 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-01-25 21:02:34 -0400 |
commit | 109a719b03dbeb70eb317be17f7e18567efa9dac (patch) | |
tree | b48e0ef83b2472e3c99bd9c2d0f8cd5f10b215fd /Annex.hs | |
parent | f8e303e1c9a9d976a4dc339295aa0f09eb997b7f (diff) |
parameterize Backend type
This allows the Backend type to not depend on the Annex type, and
so the Annex type can later be moved out of TypeInternals.
Diffstat (limited to 'Annex.hs')
-rw-r--r-- | Annex.hs | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -33,14 +33,15 @@ import Types import qualified TypeInternals as Internals {- Create and returns an Annex state object for the specified git repo. -} -new :: Git.Repo -> [Backend] -> IO AnnexState +new :: Git.Repo -> [Backend Annex] -> IO AnnexState new gitrepo allbackends = do let s = Internals.AnnexState { Internals.repo = gitrepo, Internals.backends = [], Internals.supportedBackends = allbackends, Internals.flags = M.empty, - Internals.repoqueue = GitQueue.empty + Internals.repoqueue = GitQueue.empty, + Internals.quiet = False } (_,s') <- Annex.run s prep return s' @@ -69,19 +70,19 @@ gitRepoChange r = do put state { Internals.repo = r } {- Returns the backends being used. -} -backends :: Annex [Backend] +backends :: Annex [Backend Annex] backends = do state <- get return (Internals.backends state) {- Sets the backends to use. -} -backendsChange :: [Backend] -> Annex () +backendsChange :: [Backend Annex] -> Annex () backendsChange b = do state <- get put state { Internals.backends = b } {- Returns the full list of supported backends. -} -supportedBackends :: Annex [Backend] +supportedBackends :: Annex [Backend Annex] supportedBackends = do state <- get return (Internals.supportedBackends state) |