package ocaml-solo5-cross-aarch64
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=186c4e0b2e2602b8a5cefbc731bcc6ba
sha512=b64b9f6b7371468b415c30eb7d13a06ae9c81eaf77f73494635919fc0134d9c3bb0aa177b78ab35d23bfa7fc045602a15f163e446c8fa67afe6e85f0ccbe0031
doc/compiler-libs.optcomp/Freshening/Project_var/index.html
Module Freshening.Project_var
A table used for freshening of identifiers in Project_closure and Move_within_set_of_closures ("ids of closures"); and Project_var ("bound vars of closures") expressions.
This information is propagated bottom up and populated when inlining a function containing a closure declaration.
For instance, let f x = let g y = ... x ... in ... g.x ... (Project_var x) ... g 1 ... (Apply (Project_closure g ...))
If f is inlined, g is renamed. The approximation of g will carry this table such that later the access to the field x of g and selection of g in the closure can be substituted.
val empty : tval apply_closure_id : t -> Closure_id.t -> Closure_id.tFreshen a closure ID based on the given renaming. The same ID is returned if the renaming does not affect it. If dealing with approximations, you probably want to use Simple_value_approx.freshen_and_check_closure_id instead of this function.
val apply_var_within_closure :
t ->
Var_within_closure.t ->
Var_within_closure.tLike apply_closure_id, but for variables within closures.
val print : Format.formatter -> t -> unit