module Expressions:sig..end
val bind_data_type_group_in_toplevel_items : TypeCore.env ->
TypeCore.data_type_group ->
ExpressionsCore.toplevel_item list ->
TypeCore.env * ExpressionsCore.toplevel_item list * TypeCore.var list *
(TypeCore.var * Datacon.name * SurfaceSyntax.datacon_info) listdata_type_group, and opens the corresponding
binders in the toplevel_items that follow. The resulting toplevel_items
are returned, as well as the list of vars that have been bound.val bind_data_type_group_in_expr : TypeCore.env ->
TypeCore.data_type_group ->
ExpressionsCore.expression ->
TypeCore.env * ExpressionsCore.expression * TypeCore.var list *
(TypeCore.var * Datacon.name * SurfaceSyntax.datacon_info) listval resolve_branch : TypeCore.var -> TypeCore.branch -> TypeCore.branchtype_def into something that's
suitable for manipulation as a type.tsubst_X substitutes a type for an index in an Xesubst_X substitutes an expression for an index in an Xtpsubst_X substitutes a var for a type in an Xval e_unit : ExpressionsCore.expression() (unit) expression.val p_unit : ExpressionsCore.pattern() (unit) pattern.val eunloc : ExpressionsCore.expression -> ExpressionsCore.expressionELocated node in front of an expression.val tsubst_expr : TypeCore.typ ->
int -> ExpressionsCore.expression -> ExpressionsCore.expressiontype substitution_kit = {
|
subst_type : |
|
subst_expr : |
|
subst_def : |
|
subst_toplevel : |
|
subst_pat : |
|
vars : |
|
names : |
val bind_evars : TypeCore.env ->
TypeCore.type_binding list -> TypeCore.env * substitution_kitval bind_vars : TypeCore.env ->
SurfaceSyntax.type_binding list ->
TypeCore.env * substitution_kitval bind_patexprs : TypeCore.env ->
ExpressionsCore.rec_flag ->
(ExpressionsCore.pattern * ExpressionsCore.expression) list ->
TypeCore.env * (ExpressionsCore.pattern * ExpressionsCore.expression) list *
substitution_kitand keyword). The bindings may be
mutually recursive. There is also a set of expressions on the right-hand-side
of each = sign. The variables will also be opened there, and this function
takes care of doing it properly depending on whether these are recursive
bindings or not.
It is then up to the client code to open these variables in the body of the
multiple bindings. Consider for instance "let rec x = e1 and y = e2 in e"; this
function will correctly open "x" and "y" in "e1" and "e2" but you must use the
substitution kit to open "x" and "y" in "e".
module ExprPrinter:sig..end