summaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Annex.hs b/Annex.hs
index 07316bd37..287aed875 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -20,6 +20,7 @@ module Annex (
import Control.Monad.State
import Control.Monad.IO.Control
+import Control.Applicative hiding (empty)
import qualified Git
import Git.Queue
@@ -36,7 +37,9 @@ newtype Annex a = Annex { runAnnex :: StateT AnnexState IO a }
Monad,
MonadIO,
MonadControlIO,
- MonadState AnnexState
+ MonadState AnnexState,
+ Functor,
+ Applicative
)
-- internal state storage
@@ -83,7 +86,7 @@ newState gitrepo = AnnexState
{- Create and returns an Annex state object for the specified git repo. -}
new :: Git.Repo -> IO AnnexState
-new gitrepo = newState `liftM` Git.configRead gitrepo
+new gitrepo = newState <$> Git.configRead gitrepo
{- performs an action in the Annex monad -}
run :: AnnexState -> Annex a -> IO (a, AnnexState)