hello, liftM

This commit is contained in:
Joey Hess 2011-02-19 17:00:40 -04:00
parent 208fb142d4
commit dd0f662849
3 changed files with 12 additions and 26 deletions

View file

@ -75,9 +75,7 @@ eval state action = evalStateT action state
{- Gets a value from the internal state, selected by the passed value
- constructor. -}
getState :: (AnnexState -> a) -> Annex a
getState c = do
state <- get
return (c state)
getState c = liftM c get
{- Applies a state mutation function to change the internal state.
-