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) list
data_type_group
, and opens the corresponding
binders in the toplevel_item
s that follow. The resulting toplevel_item
s
are returned, as well as the list of var
s 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) list
val resolve_branch : TypeCore.var -> TypeCore.branch -> TypeCore.branch
type_def
into something that's
suitable for manipulation as a type.tsubst_X
substitutes a type for an index in an X
esubst_X
substitutes an expression for an index in an X
tpsubst_X
substitutes a var for a type in an X
val e_unit : ExpressionsCore.expression
()
(unit) expression.val p_unit : ExpressionsCore.pattern
()
(unit) pattern.val eunloc : ExpressionsCore.expression -> ExpressionsCore.expression
ELocated
node in front of an expression.val tsubst_expr : TypeCore.typ ->
int -> ExpressionsCore.expression -> ExpressionsCore.expression
type
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_kit
val bind_vars : TypeCore.env ->
SurfaceSyntax.type_binding list ->
TypeCore.env * substitution_kit
val bind_patexprs : TypeCore.env ->
ExpressionsCore.rec_flag ->
(ExpressionsCore.pattern * ExpressionsCore.expression) list ->
TypeCore.env * (ExpressionsCore.pattern * ExpressionsCore.expression) list *
substitution_kit
and
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