Skip to content

Commit 548c861

Browse files
committed
fixing a bug in the state monad.
1 parent a9c1389 commit 548c861

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

theories/Data/Monads/StateMonad.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Section StateType.
7878
(fun x => let '(a,s,t) := x in
7979
ret (a,t,s)))
8080
; pass := fun _ c => mkStateT (fun s => bind (runStateT c s) (fun x =>
81-
let '(a,t,s) := x in ret (a, s)))
81+
let '(a,t,s) := x in pass (ret ((a,s),t))))
8282
}.
8383

8484
Global Instance Exc_stateT T (MR : MonadExc T m) : MonadExc T stateT :=

0 commit comments

Comments
 (0)