From 6aab88fa251a14fbf31c7a8d80296c78db0ed048 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 15 May 2011 15:27:49 -0400 Subject: more monadic operator use --- Annex.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Annex.hs') 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 -- cgit v1.2.3