moonpool/dev/ocaml/Freshening/Project_var/index.html
2023-08-28 17:11:38 +00:00

9 lines
No EOL
4.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Project_var (ocaml.Freshening.Project_var)</title><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../index.html">ocaml</a> &#x00BB; <a href="../index.html">Freshening</a> &#x00BB; Project_var</nav><header class="odoc-preamble"><h1>Module <code><span>Freshening.Project_var</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div><div class="spec-doc"><p>A table used for freshening of identifiers in <code>Project_closure</code> and <code>Move_within_set_of_closures</code> (&quot;ids of closures&quot;); and <code>Project_var</code> (&quot;bound vars of closures&quot;) expressions.</p><p>This information is propagated bottom up and populated when inlining a function containing a closure declaration.</p><p>For instance, <code>let f x =
let g y = ... x ... in
... g.x ... (Project_var x)
... g 1 ... (Apply (Project_closure g ...))
</code></p><p>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.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-empty"><a href="#val-empty" class="anchor"></a><code><span><span class="keyword">val</span> empty : <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-compose"><a href="#val-compose" class="anchor"></a><code><span><span class="keyword">val</span> compose : <span>earlier:<a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>later:<a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Composition of two freshenings.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-apply_closure_id"><a href="#val-apply_closure_id" class="anchor"></a><code><span><span class="keyword">val</span> apply_closure_id : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../Closure_id/index.html#type-t">Closure_id.t</a> <span class="arrow">&#45;&gt;</span></span> <a href="../../Closure_id/index.html#type-t">Closure_id.t</a></span></code></div><div class="spec-doc"><p>Freshen 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 <code>Simple_value_approx.freshen_and_check_closure_id</code> instead of this function.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-apply_var_within_closure"><a href="#val-apply_var_within_closure" class="anchor"></a><code><span><span class="keyword">val</span> apply_var_within_closure :
<span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../Var_within_closure/index.html#type-t">Var_within_closure.t</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../Var_within_closure/index.html#type-t">Var_within_closure.t</a></span></code></div><div class="spec-doc"><p>Like <code>apply_closure_id</code>, but for variables within closures.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-print"><a href="#val-print" class="anchor"></a><code><span><span class="keyword">val</span> print : <span><a href="../../Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div></div></body></html>