diff options
author | Joey Hess <joey@kitenet.net> | 2011-05-15 15:27:49 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-05-15 15:27:49 -0400 |
commit | 6aab88fa251a14fbf31c7a8d80296c78db0ed048 (patch) | |
tree | 34465a5c706ab825ecd34b9261ecc6f35e4dd555 /Annex.hs | |
parent | 1e5beda86a1d0185466547bd1acb61a75ac66992 (diff) |
more monadic operator use
Diffstat (limited to 'Annex.hs')
-rw-r--r-- | Annex.hs | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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 |