aboutsummaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-06-01 19:10:38 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-06-01 19:11:27 -0400
commit971ab27e7820a3228f71dd42f3e870c0fc2f4345 (patch)
treef54a3fed5d3a161c5e6caff8954002f830ec8eed /Annex.hs
parent80efafe4960e0fb33d1e6783bd34eaf459febea1 (diff)
better types allowed breaking module dep loop
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs27
1 files changed, 14 insertions, 13 deletions
diff --git a/Annex.hs b/Annex.hs
index 13505de46..92a4911ea 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -20,11 +20,12 @@ import Control.Monad.State
(liftIO, StateT, runStateT, evalStateT, liftM, get, put)
import qualified GitRepo as Git
-import qualified GitQueue
-import qualified BackendClass
-import qualified RemoteClass
-import qualified CryptoTypes
+import GitQueue
+import BackendClass
+import RemoteClass
+import CryptoTypes
import TrustLevel
+import UUIDType
-- git-annex's monad
type Annex = StateT AnnexState IO
@@ -32,10 +33,10 @@ type Annex = StateT AnnexState IO
-- internal state storage
data AnnexState = AnnexState
{ repo :: Git.Repo
- , backends :: [BackendClass.Backend Annex]
- , supportedBackends :: [BackendClass.Backend Annex]
- , remotes :: [RemoteClass.Remote Annex]
- , repoqueue :: GitQueue.Queue
+ , backends :: [Backend Annex]
+ , supportedBackends :: [Backend Annex]
+ , remotes :: [Remote Annex]
+ , repoqueue :: Queue
, quiet :: Bool
, force :: Bool
, fast :: Bool
@@ -45,17 +46,17 @@ data AnnexState = AnnexState
, toremote :: Maybe String
, fromremote :: Maybe String
, exclude :: [String]
- , forcetrust :: [(String, TrustLevel)]
- , cipher :: Maybe CryptoTypes.Cipher
+ , forcetrust :: [(UUID, TrustLevel)]
+ , cipher :: Maybe Cipher
}
-newState :: Git.Repo -> [BackendClass.Backend Annex] -> AnnexState
+newState :: Git.Repo -> [Backend Annex] -> AnnexState
newState gitrepo allbackends = AnnexState
{ repo = gitrepo
, backends = []
, remotes = []
, supportedBackends = allbackends
- , repoqueue = GitQueue.empty
+ , repoqueue = empty
, quiet = False
, force = False
, fast = False
@@ -70,7 +71,7 @@ newState gitrepo allbackends = AnnexState
}
{- Create and returns an Annex state object for the specified git repo. -}
-new :: Git.Repo -> [BackendClass.Backend Annex] -> IO AnnexState
+new :: Git.Repo -> [Backend Annex] -> IO AnnexState
new gitrepo allbackends = do
gitrepo' <- liftIO $ Git.configRead gitrepo
return $ newState gitrepo' allbackends