@@ -26,12 +26,10 @@ putM : y -> EffM m [STATE x] [STATE y] ()
26putM val = Put val
26putM val = Put val
28update : (x -> x) -> Eff m [STATE x] ()
28update : (x -> x) -> Eff m [STATE x] ()
29−update f = do val <- get
29+update f = put (f !get)
32updateM : (x -> y) -> EffM m [STATE x] [STATE y] ()
31updateM : (x -> y) -> EffM m [STATE x] [STATE y] ()
33−updateM f = do val <- get
32+updateM f = putM (f !get)
36locally : x -> Eff m [STATE x] t -> Eff m [STATE y] t
34locally : x -> Eff m [STATE x] t -> Eff m [STATE y] t
37locally newst prog = do st <- get
35locally newst prog = do st <- get