This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
<!DOCTYPE html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>InferBase__PolyFields (InferBase.InferBase__PolyFields)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc %%VERSION%%"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../index.html">InferBase</a>» InferBase__PolyFields</nav><h1>Module <code>InferBase__PolyFields</code></h1></header><dl><dtclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><code><spanclass="keyword">type</span><span>'r t</span></code></dt><dd><p>Datastructure for polymorphic getters of record fields</p></dd></dl><dl><dtclass="spec type"id="type-sub"><ahref="#type-sub"class="anchor"></a><code><spanclass="keyword">type</span><span>'r sub</span></code><code> = </code><tableclass="variant"><trid="type-sub.S"class="anchored"><tdclass="def constructor"><ahref="#type-sub.S"class="anchor"></a><code>| </code><code><spanclass="constructor">S</span> : <span><span>(<spanclass="type-var">'r</span>,<spanclass="type-var">'f</span>)</span><ahref="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Field.t</span> * <span><spanclass="type-var">'f</span><ahref="index.html#type-t">t</a></span><span>-></span><span><spanclass="type-var">'r</span><ahref="index.html#type-sub">sub</a></span></code></td></tr></table></dt><dtclass="spec type"id="type-user"><ahref="#type-user"class="anchor"></a><code><spanclass="keyword">type</span><span>('r, 'a) user</span></code><code> = </code><code>{</code><tableclass="record"><trid="type-user.f"class="anchored"><tdclass="def field"><ahref="#type-user.f"class="anchor"></a><code>f : f. string <span>-></span><span>(<spanclass="type-var">'r</span><span>-></span><spanclass="type-var">'f</span>)</span><span>-></span><spanclass="type-var">'a</span>;</code></td></tr></table><code>}</code></dt></dl><dl><dtclass="spec value"id="val-make"><ahref="#val-make"class="anchor"></a><code><spanclass="keyword">val</span> make : <span>?⁠subfields:<span><span><spanclass="type-var">'r</span><ahref="index.html#type-sub">sub</a></span> list</span></span><span>-></span><span>(<span><span>(<spanclass="type-var">_</span>,<spanclass="type-var">'r</span>,<span><spanclass="type-var">'r</span><ahref="index.html#type-t">t</a></span>)</span><ahref="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Field.user</span><span>-></span><span><span><spanclass="type-var">'r</span><ahref="index.html#type-t">t</a></span> list</span>)</span><span>-></span><span><spanclass="type-var">'r</span><ahref="index.html#type-t">t</a></span></code></dt><dd><p>Pass <code>Fields.map_poly</code> generated by <code>@@deriving fields</code> for the record <code>'r</code> you are interested in to get the polymorphic getters of the fields of <code>'r</code>. A dummy field "ALL" is added too.</p><p>Subfields appearing in <code>subfields</code> will be added too. Each subfield is specified by <code>S (field, poly_fields)</code> where <code>field</code> is the corresponding <code>Field.t</code> value (generated by <code>@@deriving fields</code>) and <code>poly_fields</code> is the result of this function for the field record type.</p></dd></dl><dl><dtclass="spec value"id="val-map"><ahref="#val-map"class="anchor"></a><code><spanclass="keyword">val</span> map : <span><spanclass="type-var">'r</span><ahref="index.html#type-t">t</a></span><span>-></span><span><span>(<spanclass="type-var">'r</span>,<spanclass="type-var">'a</span>)</span><ahref="index.html#type-user">user</a></span><span>-></span><span><spanclass="type-var">'a</span> list</span></code></dt><dd><p><code>map r f</code> maps each field of <code>r</code> with the function <code>f</code>. <code>f</code> is called with two arguments: the name and the getter of the field.</p></dd></dl></div></body></html>