Skip to content

Instantly share code, notes, and snippets.

@kik
Created June 25, 2011 06:18
Show Gist options
  • Save kik/1046226 to your computer and use it in GitHub Desktop.
Save kik/1046226 to your computer and use it in GitHub Desktop.
ST and runST interface in Coq (WIP)
Class fmonad (M : (Type -> Type) -> Type) := {
fmreturn : forall {A : Type -> Type} {B}, (B -> A B) -> M A;
fmbind : forall {A B : Type -> Type} {C}, M A -> ((C -> A C) -> M B) -> M B
}.
Class ST (T : (Type -> Type) -> Type) := {
monadOfST :> fmonad T;
runST : forall {A}, T (fun _ => A) -> A
}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment