Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add StateT Monad Transformer #952

Open
wants to merge 6 commits into
base: coq-8.16
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Rename run_drop_state to evalStateT to match with ExtLib
  • Loading branch information
JasonGross committed Apr 24, 2023
commit bb7f52f20bae12df88488e8f956cef1f14d84fc8
2 changes: 1 addition & 1 deletion utils/theories/monad_utils.v
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Module State.
:= update (fun _ => s).
Definition lift {S T} {TM : Monad T} {A} (m : T A) : StateT S T A
:= fun s => v <- m;; ret (v, s).
Definition run_drop_state {S T A} {TM : Monad T} (p : StateT S T A) (st : S) : T A
Definition evalStateT {S T A} {TM : Monad T} (p : StateT S T A) (st : S) : T A
:= '(v, st) <- p st;;
ret v.
End State.
Expand Down