Commit e1b25421 authored by Ryan Scott's avatar Ryan Scott

Use the implemention of modify' from transformers

parent 8209ee55
2.2.2
-----
* `Control.Monad.Identity` now re-exports `Control.Monad.Trans.Identity`
* Fix a bug in which `Control.Monad.State.Class.modify'` was not as strict in
the new state as its counterparts in `transformers`
2.2.1
-------
......
......@@ -91,8 +91,8 @@ modify f = state (\s -> ((), f s))
-- new state.
modify' :: MonadState s m => (s -> s) -> m ()
modify' f = do
s' <- liftM f get
s' `seq` put s'
s' <- get
put $! f s'
-- | Gets specific component of the state, using a projection function
-- supplied.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment