tiny_httpd/ocaml/Shape_reduce/Make/index.html
2025-03-21 12:40:14 +00:00

2 lines
3.2 KiB
HTML
Raw Permalink 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>Make (ocaml.Shape_reduce.Make)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.0.0"/><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">Index</a> &#x00BB; <a href="../../index.html">ocaml</a> &#x00BB; <a href="../index.html">Shape_reduce</a> &#x00BB; Make</nav><header class="odoc-preamble"><h1>Module <code><span>Shape_reduce.Make</span></code></h1><p>The <code>Make</code> functor is used to generate a reduction function for shapes.</p><p>It is parametrized by:</p><ul><li>a function to load the shape of an external compilation unit</li><li>some fuel, which is used to bound recursion when dealing with recursive shapes introduced by recursive modules. (FTR: merlin currently uses a fuel of 10, which seems to be enough for most practical examples)</li></ul><p>Usage warning: To ensure good performances, every reduction made with the same instance of that functor share the same ident-based memoization tables. Such an instance should only be used to perform reduction inside a unique compilation unit to prevent conflicting entries in these memoization tables.</p></header><div class="odoc-tocs"><nav class="odoc-toc odoc-local-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav></div><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><div class="odoc-spec"><div class="spec parameter anchored" id="argument-1-_"><a href="#argument-1-_" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-_/index.html">_</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-spec"><div class="spec value anchored" id="val-reduce"><a href="#val-reduce" class="anchor"></a><code><span><span class="keyword">val</span> reduce : <span><a href="../../Env/index.html#type-t">Env.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../Shape/index.html#type-t">Shape.t</a> <span class="arrow">&#45;&gt;</span></span> <a href="../../Shape/index.html#type-t">Shape.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-reduce_for_uid"><a href="#val-reduce_for_uid" class="anchor"></a><code><span><span class="keyword">val</span> reduce_for_uid : <span><a href="../../Env/index.html#type-t">Env.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../Shape/index.html#type-t">Shape.t</a> <span class="arrow">&#45;&gt;</span></span> <a href="../index.html#type-result">result</a></span></code></div><div class="spec-doc"><p>Perform weak reduction and return the head's uid if any. If reduction was incomplete the partially reduced shape is returned.</p></div></div></div></body></html>