summaryrefslogtreecommitdiff
path: root/Annex.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-05-15 15:27:49 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-05-15 15:27:49 -0400
commit6aab88fa251a14fbf31c7a8d80296c78db0ed048 (patch)
tree34465a5c706ab825ecd34b9261ecc6f35e4dd555 /Annex.hs
parent1e5beda86a1d0185466547bd1acb61a75ac66992 (diff)
more monadic operator use
Diffstat (limited to 'Annex.hs')
-rw-r--r--Annex.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/Annex.hs b/Annex.hs
index 9915112a5..b2257281f 100644
--- a/Annex.hs
+++ b/Annex.hs
@@ -86,9 +86,7 @@ getState c = liftM c get
- Example: changeState (\s -> s { quiet = True })
-}
changeState :: (AnnexState -> AnnexState) -> Annex ()
-changeState a = do
- state <- get
- put (a state)
+changeState a = put . a =<< get
{- Returns the git repository being acted on -}
gitRepo :: Annex Git.Repo