summaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-01-25 21:02:34 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-01-25 21:02:34 -0400
commit109a719b03dbeb70eb317be17f7e18567efa9dac (patch)
treeb48e0ef83b2472e3c99bd9c2d0f8cd5f10b215fd /Annex.hs
parentf8e303e1c9a9d976a4dc339295aa0f09eb997b7f (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.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/Annex.hs b/Annex.hs
index 765c9191f..a0de63087 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -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)