summaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs15
1 files changed, 2 insertions, 13 deletions
diff --git a/Annex.hs b/Annex.hs
index 3b79ea270..de36c816d 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -26,7 +26,7 @@ module Annex (
fromRepo,
) where
-import Control.Monad.State
+import Control.Monad.State.Strict
import Control.Monad.Trans.Control (StM, MonadBaseControl, liftBaseWith, restoreM)
import Control.Monad.Base (liftBase, MonadBase)
import System.Posix.Types (Fd)
@@ -41,6 +41,7 @@ import qualified Types.Remote
import Types.Crypto
import Types.BranchState
import Types.TrustLevel
+import Utility.State
import qualified Utility.Matcher
import qualified Data.Map as M
@@ -125,18 +126,6 @@ run s a = runStateT (runAnnex a) s
eval :: AnnexState -> Annex a -> IO a
eval s a = evalStateT (runAnnex a) s
-{- Gets a value from the internal state, selected by the passed value
- - constructor. -}
-getState :: (AnnexState -> a) -> Annex a
-getState = gets
-
-{- Applies a state mutation function to change the internal state.
- -
- - Example: changeState $ \s -> s { output = QuietOutput }
- -}
-changeState :: (AnnexState -> AnnexState) -> Annex ()
-changeState = modify
-
{- Sets a flag to True -}
setFlag :: String -> Annex ()
setFlag flag = changeState $ \s ->