diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2015-03-21 22:13:02 +0900 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2015-03-21 22:13:10 +0900 |
commit | 52897fa7f92c6c956a24a73202559d6a886e6411 (patch) | |
tree | 9592b7e55e469ef695e9acb2e97ad7fe6eafe16a | |
parent | 142777bec6952ff80be57710255be028cc97a0f2 (diff) | |
download | sariulclocks-52897fa7f92c6c956a24a73202559d6a886e6411.tar.gz |
fix monad modifyScores action
-rw-r--r-- | src/Control/Monad/SariulClocks.hs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/Control/Monad/SariulClocks.hs b/src/Control/Monad/SariulClocks.hs index d84bec3..3146d87 100644 --- a/src/Control/Monad/SariulClocks.hs +++ b/src/Control/Monad/SariulClocks.hs @@ -28,11 +28,7 @@ class ( Monad a putScores :: ScoresList -> a () getScores :: a ScoresList modifyScores :: (ScoresList -> ScoresList) -> a () - modifyScores f = do - scores <- getScores - let scores' = f scores - putScores scores - return () + modifyScores f = liftM f getScores >>= putScores newtype SariulClocksCGI a = SCC { getSCC :: StateT (Session, ScoresList) (CGIT IO) a } |