diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-14 02:36:41 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-14 02:36:41 -0400 |
commit | 48643b68b3ff05399b72f44b8b02ff34d6de046c (patch) | |
tree | 530364b80bada325413dfa86f7b5e68ee007ee27 /Types.hs | |
parent | eda80e44c5fb399fa4e5625388d6e0f993b0f779 (diff) |
convert GitRepo to qualified import
Diffstat (limited to 'Types.hs')
-rw-r--r-- | Types.hs | 24 |
1 files changed, 6 insertions, 18 deletions
@@ -1,26 +1,14 @@ {- git-annex core data types -} -module Types ( - Annex, - AnnexState, - makeAnnexState, - runAnnexState, - gitAnnex, - gitAnnexChange, - backendsAnnex, - backendsAnnexChange, - - Key(..), - Backend(..) -) where +module Types where import Control.Monad.State import Data.String.Utils -import GitRepo +import qualified GitRepo as Git -- git-annex's runtime state data AnnexState = AnnexState { - repo :: GitRepo, + repo :: Git.Repo, backends :: [Backend] } deriving (Show) @@ -28,18 +16,18 @@ data AnnexState = AnnexState { type Annex = StateT AnnexState IO -- constructor -makeAnnexState :: GitRepo -> AnnexState +makeAnnexState :: Git.Repo -> AnnexState makeAnnexState g = AnnexState { repo = g, backends = [] } -- performs an action in the Annex monad runAnnexState state action = runStateT (action) state -- Annex monad state accessors -gitAnnex :: Annex GitRepo +gitAnnex :: Annex Git.Repo gitAnnex = do state <- get return (repo state) -gitAnnexChange :: GitRepo -> Annex () +gitAnnexChange :: Git.Repo -> Annex () gitAnnexChange r = do state <- get put state { repo = r } |