summaryrefslogtreecommitdiff
path: root/AbstractTypes.hs
diff options
context:
space:
mode:
Diffstat (limited to 'AbstractTypes.hs')
-rw-r--r--AbstractTypes.hs47
1 files changed, 0 insertions, 47 deletions
diff --git a/AbstractTypes.hs b/AbstractTypes.hs
deleted file mode 100644
index 935d1de2f..000000000
--- a/AbstractTypes.hs
+++ /dev/null
@@ -1,47 +0,0 @@
-{- git-annex data types, abstract only -}
-
-module AbstractTypes (
- Annex,
- AnnexState,
- makeAnnexState,
- runAnnexState,
- gitAnnex,
- gitAnnexChange,
- backendsAnnex,
- backendsAnnexChange,
-
- Key,
- Backend
-) where
-
-import Control.Monad.State
-import qualified GitRepo as Git
-import BackendTypes
-
--- constructor
-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 Git.Repo
-gitAnnex = do
- state <- get
- return (repo state)
-gitAnnexChange :: Git.Repo -> Annex ()
-gitAnnexChange r = do
- state <- get
- put state { repo = r }
- return ()
-backendsAnnex :: Annex [Backend]
-backendsAnnex = do
- state <- get
- return (backends state)
-backendsAnnexChange :: [Backend] -> Annex ()
-backendsAnnexChange b = do
- state <- get
- put state { backends = b }
- return ()
-