more monadic operator use
This commit is contained in:
parent
1e5beda86a
commit
6aab88fa25
5 changed files with 11 additions and 20 deletions
4
Annex.hs
4
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue