Browse files

Merge pull request #1 from meteficha/master

Fix a terrible bug in MonadState's state
  • Loading branch information...
2 parents fce5986 + e7a1eac commit fba7ecb30e855c3b31e57822c3bf1e4843f0c164 @ekmett committed Apr 23, 2012
Showing with 4 additions and 3 deletions.
  1. +1 −1 Control/Monad/RWS/Class.hs
  2. +2 −2 Control/Monad/State/Class.hs
  3. +1 −0 mtl.cabal
View
2 Control/Monad/RWS/Class.hs
@@ -21,7 +21,7 @@
-----------------------------------------------------------------------------
module Control.Monad.RWS.Class (
- MonadRWS(..),
+ MonadRWS,
module Control.Monad.Reader.Class,
module Control.Monad.State.Class,
module Control.Monad.Writer.Class,
View
4 Control/Monad/State/Class.hs
@@ -60,8 +60,8 @@ class Monad m => MonadState s m | m -> s where
state :: (s -> (a, s)) -> m a
state f = do
s <- get
- let ~(a, s) = f s
- put s
+ let ~(a, s') = f s
+ put s'
return a
-- | Monadic state transformer.
View
1 mtl.cabal
@@ -47,3 +47,4 @@ Library
MultiParamTypeClasses
FunctionalDependencies
FlexibleInstances
+ ghc-options: -Wall -fno-warn-unused-imports

0 comments on commit fba7ecb

Please sign in to comment.