-
-
Save Gbury/7a02a35cb4906914fa351183490f11b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type var = int | |
type symbol = string | |
type continuation = int | |
type simple = | |
| Var of var | |
| Symbol of symbol | |
type primitive = | |
| Add_int | |
| Add_float | |
type named = | |
| Simple of simple | |
| Primitive of primitive * simple list | |
| Set_of_closures of set_of_closures | |
type expr = | |
| Let_expr of { var : var; defining_expr : named; body : expr; } | |
| Let_cont of { cont : continuation; handler : var list * expr; body : expr; } | |
| Apply_expr of { callee : simple; args : simple list; return_cont : continuation; exn_cont : continuation; } | |
| Apply_cont of apply_cont | |
| Switch of { scrutinee : simple; arms : (int * apply_cont) list; } | |
and apply_cont = { | |
cont: continuation; | |
args : simple list; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment