ocaml-trace/ppxlib/Ppxlib/Ast_builder/Make/index.html
2025-01-13 18:31:05 +00:00

533 lines
No EOL
198 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>Make (ppxlib.Ppxlib.Ast_builder.Make)</title><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.2"/><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">ppxlib</a> &#x00BB; <a href="../../index.html">Ppxlib</a> &#x00BB; <a href="../index.html">Ast_builder</a> &#x00BB; Make</nav><header class="odoc-preamble"><h1>Module <code><span>Ast_builder.Make</span></code></h1><p>Build Ast helpers with the location argument factorized.</p></header><nav class="odoc-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a><ul><li><a href="#value-description">Value description</a></li><li><a href="#value-binding">Value binding</a></li><li><a href="#type-extension">Type extension</a></li><li><a href="#type-exception">Type exception</a></li><li><a href="#type-declaration">Type declaration</a></li><li><a href="#toplevel-directive">Toplevel directive</a></li><li><a href="#structure-item">Structure item</a></li><li><a href="#signature-item">Signature item</a></li><li><a href="#row-field">Row field</a></li><li><a href="#position">Position</a></li><li><a href="#pattern">Pattern</a></li><li><a href="#object-field">Object field</a></li><li><a href="#module-type-declaration">Module type declaration</a></li><li><a href="#module-type">Module type</a></li><li><a href="#module-substitution">Module substitution</a></li><li><a href="#module-expr">Module expr</a></li><li><a href="#module-declaration">Module declaration</a></li><li><a href="#module-binding">Module binding</a></li><li><a href="#location">Location</a></li><li><a href="#letop">Letop</a></li><li><a href="#label-declaration">Label declaration</a></li><li><a href="#extension-constructor">Extension constructor</a></li><li><a href="#expression">Expression</a></li><li><a href="#directive-argument">Directive argument</a></li><li><a href="#core-type">Core type</a></li><li><a href="#constructor-declaration">Constructor declaration</a></li><li><a href="#class-type-field">Class type field</a></li><li><a href="#class-type">Class type</a></li><li><a href="#class-structure">Class structure</a></li><li><a href="#class-signature">Class signature</a></li><li><a href="#class-field">Class field</a></li><li><a href="#class-expr">Class expr</a></li><li><a href="#case">Case</a></li><li><a href="#binding-op">Binding op</a></li><li><a href="#attribute">Attribute</a></li><li><a href="#'a-open-infos">'a open infos</a></li><li><a href="#'a-include-infos">'a include infos</a></li><li><a href="#'a-class-infos">'a class infos</a></li></ul></li></ul></nav><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-Loc"><a href="#argument-1-Loc" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-Loc/index.html">Loc</a></span><span> : <a href="../module-type-Loc/index.html">Loc</a></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-spec"><div class="spec module anchored" id="module-Located"><a href="#module-Located" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Located/index.html">Located</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-loc"><a href="#val-loc" class="anchor"></a><code><span><span class="keyword">val</span> loc : <a href="../../Location/index.html#type-t">Location.t</a></span></code></div></div><h4 id="value-description"><a href="#value-description" class="anchor"></a>Value description</h4><div class="odoc-spec"><div class="spec value anchored" id="val-value_description"><a href="#val-value_description" class="anchor"></a><code><span><span class="keyword">val</span> value_description :
<span>name:<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>type_:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <span class="arrow">&#45;&gt;</span></span>
<span>prim:<span>string list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-value_description">Astlib.Ast_500.Parsetree.value_description</a></span></code></div><div class="spec-doc"><p><code>value_description</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-value_description"><code>Ast.value_description</code></a></p><p><b>Example OCaml</b></p><p>Values of type <a href="#val-value_description"><code>value_description</code></a> represents:</p><ul><li><code>val x: T</code>, when <a href="../../index.html#type-value_description.pval_prim"><code>pval_prim</code></a> is <code>[]</code></li><li><code>external x: T = &quot;s1&quot; ... &quot;sn&quot;</code> when <a href="../../index.html#type-value_description.pval_prim"><code>pval_prim</code></a> is <code>[&quot;s1&quot;;...&quot;sn&quot;]</code></li></ul></div></div><h4 id="value-binding"><a href="#value-binding" class="anchor"></a>Value binding</h4><div class="odoc-spec"><div class="spec value anchored" id="val-value_binding"><a href="#val-value_binding" class="anchor"></a><code><span><span class="keyword">val</span> value_binding :
<span>pat:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <span class="arrow">&#45;&gt;</span></span>
<span>expr:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-value_binding">Astlib.Ast_500.Parsetree.value_binding</a></span></code></div><div class="spec-doc"><p><code>value_binding</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-value_binding"><code>Ast.value_binding</code></a></p></div></div><h4 id="type-extension"><a href="#type-extension" class="anchor"></a>Type extension</h4><div class="odoc-spec"><div class="spec value anchored" id="val-type_extension"><a href="#val-type_extension" class="anchor"></a><code><span><span class="keyword">val</span> type_extension :
<span>path:<span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>params:
<span><span>(<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a>
* <span>(<a href="../../../Astlib/Ast_500/Asttypes/index.html#type-variance">Astlib.Ast_500.Asttypes.variance</a> * <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-injectivity">Astlib.Ast_500.Asttypes.injectivity</a>)</span>)</span>
list</span> <span class="arrow">&#45;&gt;</span></span>
<span>constructors:<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-extension_constructor">Astlib.Ast_500.Parsetree.extension_constructor</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>private_:<a href="../../../Astlib/Ast_500/Asttypes/index.html#type-private_flag">Astlib.Ast_500.Asttypes.private_flag</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-type_extension">Astlib.Ast_500.Parsetree.type_extension</a></span></code></div><div class="spec-doc"><p><code>type_extension</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-type_extension"><code>Ast.type_extension</code></a></p><p><b>Example OCaml</b></p><p>Definition of new extensions constructors for the extensive sum type <code>t</code> (<code>type t += ...</code>).</p></div></div><h4 id="type-exception"><a href="#type-exception" class="anchor"></a>Type exception</h4><div class="odoc-spec"><div class="spec value anchored" id="val-type_exception"><a href="#val-type_exception" class="anchor"></a><code><span><span class="keyword">val</span> type_exception :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-extension_constructor">Astlib.Ast_500.Parsetree.extension_constructor</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-type_exception">Astlib.Ast_500.Parsetree.type_exception</a></span></code></div><div class="spec-doc"><p><code>type_exception</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-type_exception"><code>Ast.type_exception</code></a></p><p><b>Example OCaml</b></p><p>Definition of a new exception (<code>exception E</code>).</p></div></div><h4 id="type-declaration"><a href="#type-declaration" class="anchor"></a>Type declaration</h4><div class="odoc-spec"><div class="spec value anchored" id="val-type_declaration"><a href="#val-type_declaration" class="anchor"></a><code><span><span class="keyword">val</span> type_declaration :
<span>name:<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>params:
<span><span>(<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a>
* <span>(<a href="../../../Astlib/Ast_500/Asttypes/index.html#type-variance">Astlib.Ast_500.Asttypes.variance</a> * <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-injectivity">Astlib.Ast_500.Asttypes.injectivity</a>)</span>)</span>
list</span> <span class="arrow">&#45;&gt;</span></span>
<span>cstrs:
<span><span>(<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a>
* <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a>
* <a href="../../../Astlib/Location/index.html#type-t">Astlib.Location.t</a>)</span>
list</span> <span class="arrow">&#45;&gt;</span></span>
<span>kind:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-type_kind">Astlib.Ast_500.Parsetree.type_kind</a> <span class="arrow">&#45;&gt;</span></span>
<span>private_:<a href="../../../Astlib/Ast_500/Asttypes/index.html#type-private_flag">Astlib.Ast_500.Asttypes.private_flag</a> <span class="arrow">&#45;&gt;</span></span>
<span>manifest:<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-type_declaration">Astlib.Ast_500.Parsetree.type_declaration</a></span></code></div><div class="spec-doc"><p><code>type_declaration</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-type_declaration"><code>Ast.type_declaration</code></a></p><p><b>Example OCaml</b></p><p>Here are type declarations and their representation, for various <a href="../../index.html#type-type_declaration.ptype_kind"><code>ptype_kind</code></a> and <a href="../../index.html#type-type_declaration.ptype_manifest"><code>ptype_manifest</code></a> values:</p><ul><li><code>type t</code> when <code>type_kind</code> is <a href="../../index.html#type-type_kind.Ptype_abstract"><code>Ptype_abstract</code></a>, and <code>manifest</code> is <code>None</code>,</li><li><code>type t = T0</code> when <code>type_kind</code> is <a href="../../index.html#type-type_kind.Ptype_abstract"><code>Ptype_abstract</code></a>, and <code>manifest</code> is <code>Some T0</code>,</li><li><code>type t = C of T | ...</code> when <code>type_kind</code> is <a href="../../index.html#type-type_kind.Ptype_variant"><code>Ptype_variant</code></a>, and <code>manifest</code> is <code>None</code>,</li><li><code>type t = T0 = C of T | ...</code> when <code>type_kind</code> is <a href="../../index.html#type-type_kind.Ptype_variant"><code>Ptype_variant</code></a>, and <code>manifest</code> is <code>Some T0</code>,</li><li><code>type t = {l: T; ...}</code> when <code>type_kind</code> is <a href="../../index.html#type-type_kind.Ptype_record"><code>Ptype_record</code></a>, and <code>manifest</code> is <code>None</code>,</li><li><code>type t = T0 = {l : T; ...}</code> when <code>type_kind</code> is <a href="../../index.html#type-type_kind.Ptype_record"><code>Ptype_record</code></a>, and <code>manifest</code> is <code>Some T0</code>,</li><li><code>type t = ..</code> when <code>type_kind</code> is <a href="../../index.html#type-type_kind.Ptype_open"><code>Ptype_open</code></a>, and <code>manifest</code> is <code>None</code>.</li></ul></div></div><h4 id="toplevel-directive"><a href="#toplevel-directive" class="anchor"></a>Toplevel directive</h4><div class="odoc-spec"><div class="spec value anchored" id="val-toplevel_directive"><a href="#val-toplevel_directive" class="anchor"></a><code><span><span class="keyword">val</span> toplevel_directive :
<span>name:<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>arg:<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-directive_argument">Astlib.Ast_500.Parsetree.directive_argument</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-toplevel_directive">Astlib.Ast_500.Parsetree.toplevel_directive</a></span></code></div><div class="spec-doc"><p><code>toplevel_directive</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-toplevel_directive"><code>Ast.toplevel_directive</code></a></p></div></div><h4 id="structure-item"><a href="#structure-item" class="anchor"></a>Structure item</h4><div class="odoc-spec"><div class="spec value anchored" id="val-pstr_extension"><a href="#val-pstr_extension" class="anchor"></a><code><span><span class="keyword">val</span> pstr_extension :
<span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-payload">Astlib.Ast_500.Parsetree.payload</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-attribute">Astlib.Ast_500.Parsetree.attribute</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a></span></code></div><div class="spec-doc"><p><code>pstr_extension</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-structure_item_desc.Pstr_extension"><code>Ast.structure_item_desc.Pstr_extension</code></a></p><p><b>Example OCaml</b></p><p><code>[%%id]</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pstr_attribute"><a href="#val-pstr_attribute" class="anchor"></a><code><span><span class="keyword">val</span> pstr_attribute :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-attribute">Astlib.Ast_500.Parsetree.attribute</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a></span></code></div><div class="spec-doc"><p><code>pstr_attribute</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-structure_item_desc.Pstr_attribute"><code>Ast.structure_item_desc.Pstr_attribute</code></a></p><p><b>Example OCaml</b></p><p><code>[@@@id]</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pstr_include"><a href="#val-pstr_include" class="anchor"></a><code><span><span class="keyword">val</span> pstr_include :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-include_infos">Astlib.Ast_500.Parsetree.include_infos</a></span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a></span></code></div><div class="spec-doc"><p><code>pstr_include</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-structure_item_desc.Pstr_include"><code>Ast.structure_item_desc.Pstr_include</code></a></p><p><b>Example OCaml</b></p><p><code>include ME</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pstr_class_type"><a href="#val-pstr_class_type" class="anchor"></a><code><span><span class="keyword">val</span> pstr_class_type :
<span><span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type">Astlib.Ast_500.Parsetree.class_type</a> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_infos">Astlib.Ast_500.Parsetree.class_infos</a></span> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a></span></code></div><div class="spec-doc"><p><code>pstr_class_type</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-structure_item_desc.Pstr_class_type"><code>Ast.structure_item_desc.Pstr_class_type</code></a></p><p><b>Example OCaml</b></p><p><code>class type ct1 = ... and ... and ctn = ...</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pstr_class"><a href="#val-pstr_class" class="anchor"></a><code><span><span class="keyword">val</span> pstr_class :
<span><span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_expr">Astlib.Ast_500.Parsetree.class_expr</a> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_infos">Astlib.Ast_500.Parsetree.class_infos</a></span> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a></span></code></div><div class="spec-doc"><p><code>pstr_class</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-structure_item_desc.Pstr_class"><code>Ast.structure_item_desc.Pstr_class</code></a></p><p><b>Example OCaml</b></p><p><code>class c1 = ... and ... and cn = ...</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pstr_open"><a href="#val-pstr_open" class="anchor"></a><code><span><span class="keyword">val</span> pstr_open :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-open_infos">Astlib.Ast_500.Parsetree.open_infos</a></span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a></span></code></div><div class="spec-doc"><p><code>pstr_open</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-structure_item_desc.Pstr_open"><code>Ast.structure_item_desc.Pstr_open</code></a></p><p><b>Example OCaml</b></p><p><code>open X</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pstr_modtype"><a href="#val-pstr_modtype" class="anchor"></a><code><span><span class="keyword">val</span> pstr_modtype :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_type_declaration">Astlib.Ast_500.Parsetree.module_type_declaration</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a></span></code></div><div class="spec-doc"><p><code>pstr_modtype</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-structure_item_desc.Pstr_modtype"><code>Ast.structure_item_desc.Pstr_modtype</code></a></p><p><b>Example OCaml</b></p><p><code>module type S = MT</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pstr_recmodule"><a href="#val-pstr_recmodule" class="anchor"></a><code><span><span class="keyword">val</span> pstr_recmodule :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_binding">Astlib.Ast_500.Parsetree.module_binding</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a></span></code></div><div class="spec-doc"><p><code>pstr_recmodule</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-structure_item_desc.Pstr_recmodule"><code>Ast.structure_item_desc.Pstr_recmodule</code></a></p><p><b>Example OCaml</b></p><p><code>module rec X1 = ME1 and ... and Xn = MEn</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pstr_module"><a href="#val-pstr_module" class="anchor"></a><code><span><span class="keyword">val</span> pstr_module :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_binding">Astlib.Ast_500.Parsetree.module_binding</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a></span></code></div><div class="spec-doc"><p><code>pstr_module</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-structure_item_desc.Pstr_module"><code>Ast.structure_item_desc.Pstr_module</code></a></p><p><b>Example OCaml</b></p><p><code>module X = ME</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pstr_exception"><a href="#val-pstr_exception" class="anchor"></a><code><span><span class="keyword">val</span> pstr_exception :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-type_exception">Astlib.Ast_500.Parsetree.type_exception</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a></span></code></div><div class="spec-doc"><p><code>pstr_exception</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-structure_item_desc.Pstr_exception"><code>Ast.structure_item_desc.Pstr_exception</code></a></p><p><b>Example OCaml</b></p><ul><li><code>exception C of T</code></li><li><code>exception C = M.X</code></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pstr_typext"><a href="#val-pstr_typext" class="anchor"></a><code><span><span class="keyword">val</span> pstr_typext :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-type_extension">Astlib.Ast_500.Parsetree.type_extension</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a></span></code></div><div class="spec-doc"><p><code>pstr_typext</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-structure_item_desc.Pstr_typext"><code>Ast.structure_item_desc.Pstr_typext</code></a></p><p><b>Example OCaml</b></p><p><code>type t1 += ...</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pstr_type"><a href="#val-pstr_type" class="anchor"></a><code><span><span class="keyword">val</span> pstr_type :
<span><a href="../../../Astlib/Ast_500/Asttypes/index.html#type-rec_flag">Astlib.Ast_500.Asttypes.rec_flag</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-type_declaration">Astlib.Ast_500.Parsetree.type_declaration</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a></span></code></div><div class="spec-doc"><p><code>pstr_type</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-structure_item_desc.Pstr_type"><code>Ast.structure_item_desc.Pstr_type</code></a></p><p><b>Example OCaml</b></p><p><code>type t1 = ... and ... and tn = ...</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pstr_primitive"><a href="#val-pstr_primitive" class="anchor"></a><code><span><span class="keyword">val</span> pstr_primitive :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-value_description">Astlib.Ast_500.Parsetree.value_description</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a></span></code></div><div class="spec-doc"><p><code>pstr_primitive</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-structure_item_desc.Pstr_primitive"><code>Ast.structure_item_desc.Pstr_primitive</code></a></p><p><b>Example OCaml</b></p><ul><li><code>val x: T</code></li><li><code>external x: T = &quot;s1&quot; ... &quot;sn&quot; </code></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pstr_value"><a href="#val-pstr_value" class="anchor"></a><code><span><span class="keyword">val</span> pstr_value :
<span><a href="../../../Astlib/Ast_500/Asttypes/index.html#type-rec_flag">Astlib.Ast_500.Asttypes.rec_flag</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-value_binding">Astlib.Ast_500.Parsetree.value_binding</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a></span></code></div><div class="spec-doc"><p><code>pstr_value</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-structure_item_desc.Pstr_value"><code>Ast.structure_item_desc.Pstr_value</code></a></p><p><b>Example OCaml</b></p><p><code>Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))])</code> represents:</p><ul><li><code>let P1 = E1 and ... and Pn = EN</code> when <code>rec</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-rec_flag.Nonrecursive"><code>Nonrecursive</code></a>,</li><li><code>let rec P1 = E1 and ... and Pn = EN </code> when <code>rec</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-rec_flag.Recursive"><code>Recursive</code></a>.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pstr_eval"><a href="#val-pstr_eval" class="anchor"></a><code><span><span class="keyword">val</span> pstr_eval :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-attribute">Astlib.Ast_500.Parsetree.attribute</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a></span></code></div><div class="spec-doc"><p><code>pstr_eval</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-structure_item_desc.Pstr_eval"><code>Ast.structure_item_desc.Pstr_eval</code></a></p><p><b>Example OCaml</b></p><p><code>E</code></p></div></div><h4 id="signature-item"><a href="#signature-item" class="anchor"></a>Signature item</h4><div class="odoc-spec"><div class="spec value anchored" id="val-psig_extension"><a href="#val-psig_extension" class="anchor"></a><code><span><span class="keyword">val</span> psig_extension :
<span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-payload">Astlib.Ast_500.Parsetree.payload</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-attribute">Astlib.Ast_500.Parsetree.attribute</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a></span></code></div><div class="spec-doc"><p><code>psig_extension</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-signature_item_desc.Psig_extension"><code>Ast.signature_item_desc.Psig_extension</code></a></p><p><b>Example OCaml</b></p><p><code>[%%id]</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-psig_attribute"><a href="#val-psig_attribute" class="anchor"></a><code><span><span class="keyword">val</span> psig_attribute :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-attribute">Astlib.Ast_500.Parsetree.attribute</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a></span></code></div><div class="spec-doc"><p><code>psig_attribute</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-signature_item_desc.Psig_attribute"><code>Ast.signature_item_desc.Psig_attribute</code></a></p><p><b>Example OCaml</b></p><p><code>[@@@id]</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-psig_class_type"><a href="#val-psig_class_type" class="anchor"></a><code><span><span class="keyword">val</span> psig_class_type :
<span><span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type">Astlib.Ast_500.Parsetree.class_type</a> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_infos">Astlib.Ast_500.Parsetree.class_infos</a></span> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a></span></code></div><div class="spec-doc"><p><code>psig_class_type</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-signature_item_desc.Psig_class_type"><code>Ast.signature_item_desc.Psig_class_type</code></a></p><p><b>Example OCaml</b></p><p><code>class type ct1 = ... and ... and ctn = ...</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-psig_class"><a href="#val-psig_class" class="anchor"></a><code><span><span class="keyword">val</span> psig_class :
<span><span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type">Astlib.Ast_500.Parsetree.class_type</a> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_infos">Astlib.Ast_500.Parsetree.class_infos</a></span> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a></span></code></div><div class="spec-doc"><p><code>psig_class</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-signature_item_desc.Psig_class"><code>Ast.signature_item_desc.Psig_class</code></a></p><p><b>Example OCaml</b></p><p><code>class c1 : ... and ... and cn : ...</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-psig_include"><a href="#val-psig_include" class="anchor"></a><code><span><span class="keyword">val</span> psig_include :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_type">Astlib.Ast_500.Parsetree.module_type</a> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-include_infos">Astlib.Ast_500.Parsetree.include_infos</a></span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a></span></code></div><div class="spec-doc"><p><code>psig_include</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-signature_item_desc.Psig_include"><code>Ast.signature_item_desc.Psig_include</code></a></p><p><b>Example OCaml</b></p><p><code>include MT</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-psig_open"><a href="#val-psig_open" class="anchor"></a><code><span><span class="keyword">val</span> psig_open :
<span><span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-open_infos">Astlib.Ast_500.Parsetree.open_infos</a></span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a></span></code></div><div class="spec-doc"><p><code>psig_open</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-signature_item_desc.Psig_open"><code>Ast.signature_item_desc.Psig_open</code></a></p><p><b>Example OCaml</b></p><p><code>open X</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-psig_modtypesubst"><a href="#val-psig_modtypesubst" class="anchor"></a><code><span><span class="keyword">val</span> psig_modtypesubst :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_type_declaration">Astlib.Ast_500.Parsetree.module_type_declaration</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a></span></code></div><div class="spec-doc"><p><code>psig_modtypesubst</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-signature_item_desc.Psig_modtypesubst"><code>Ast.signature_item_desc.Psig_modtypesubst</code></a></p><p><b>Example OCaml</b></p><p><code>module type S := ...</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-psig_modtype"><a href="#val-psig_modtype" class="anchor"></a><code><span><span class="keyword">val</span> psig_modtype :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_type_declaration">Astlib.Ast_500.Parsetree.module_type_declaration</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a></span></code></div><div class="spec-doc"><p><code>psig_modtype</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-signature_item_desc.Psig_modtype"><code>Ast.signature_item_desc.Psig_modtype</code></a></p><p><b>Example OCaml</b></p><p><code>module type S = MT</code> and <code>module type S</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-psig_recmodule"><a href="#val-psig_recmodule" class="anchor"></a><code><span><span class="keyword">val</span> psig_recmodule :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_declaration">Astlib.Ast_500.Parsetree.module_declaration</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a></span></code></div><div class="spec-doc"><p><code>psig_recmodule</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-signature_item_desc.Psig_recmodule"><code>Ast.signature_item_desc.Psig_recmodule</code></a></p><p><b>Example OCaml</b></p><p><code>module rec X1 : MT1 and ... and Xn : MTn</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-psig_modsubst"><a href="#val-psig_modsubst" class="anchor"></a><code><span><span class="keyword">val</span> psig_modsubst :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_substitution">Astlib.Ast_500.Parsetree.module_substitution</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a></span></code></div><div class="spec-doc"><p><code>psig_modsubst</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-signature_item_desc.Psig_modsubst"><code>Ast.signature_item_desc.Psig_modsubst</code></a></p><p><b>Example OCaml</b></p><p><code>module X := M</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-psig_module"><a href="#val-psig_module" class="anchor"></a><code><span><span class="keyword">val</span> psig_module :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_declaration">Astlib.Ast_500.Parsetree.module_declaration</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a></span></code></div><div class="spec-doc"><p><code>psig_module</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-signature_item_desc.Psig_module"><code>Ast.signature_item_desc.Psig_module</code></a></p><p><b>Example OCaml</b></p><p><code>module X = M</code> and <code>module X : MT</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-psig_exception"><a href="#val-psig_exception" class="anchor"></a><code><span><span class="keyword">val</span> psig_exception :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-type_exception">Astlib.Ast_500.Parsetree.type_exception</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a></span></code></div><div class="spec-doc"><p><code>psig_exception</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-signature_item_desc.Psig_exception"><code>Ast.signature_item_desc.Psig_exception</code></a></p><p><b>Example OCaml</b></p><p><code>exception C of T</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-psig_typext"><a href="#val-psig_typext" class="anchor"></a><code><span><span class="keyword">val</span> psig_typext :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-type_extension">Astlib.Ast_500.Parsetree.type_extension</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a></span></code></div><div class="spec-doc"><p><code>psig_typext</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-signature_item_desc.Psig_typext"><code>Ast.signature_item_desc.Psig_typext</code></a></p><p><b>Example OCaml</b></p><p><code>type t1 += ...</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-psig_typesubst"><a href="#val-psig_typesubst" class="anchor"></a><code><span><span class="keyword">val</span> psig_typesubst :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-type_declaration">Astlib.Ast_500.Parsetree.type_declaration</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a></span></code></div><div class="spec-doc"><p><code>psig_typesubst</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-signature_item_desc.Psig_typesubst"><code>Ast.signature_item_desc.Psig_typesubst</code></a></p><p><b>Example OCaml</b></p><p><code>type t1 := ... and ... and tn := ...</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-psig_type"><a href="#val-psig_type" class="anchor"></a><code><span><span class="keyword">val</span> psig_type :
<span><a href="../../../Astlib/Ast_500/Asttypes/index.html#type-rec_flag">Astlib.Ast_500.Asttypes.rec_flag</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-type_declaration">Astlib.Ast_500.Parsetree.type_declaration</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a></span></code></div><div class="spec-doc"><p><code>psig_type</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-signature_item_desc.Psig_type"><code>Ast.signature_item_desc.Psig_type</code></a></p><p><b>Example OCaml</b></p><p><code>type t1 = ... and ... and tn = ...</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-psig_value"><a href="#val-psig_value" class="anchor"></a><code><span><span class="keyword">val</span> psig_value :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-value_description">Astlib.Ast_500.Parsetree.value_description</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a></span></code></div><div class="spec-doc"><p><code>psig_value</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-signature_item_desc.Psig_value"><code>Ast.signature_item_desc.Psig_value</code></a></p><p><b>Example OCaml</b></p><ul><li><code>val x: T</code></li><li><code>external x: T = &quot;s1&quot; ... &quot;sn&quot;</code></li></ul></div></div><h4 id="row-field"><a href="#row-field" class="anchor"></a>Row field</h4><div class="odoc-spec"><div class="spec value anchored" id="val-rinherit"><a href="#val-rinherit" class="anchor"></a><code><span><span class="keyword">val</span> rinherit :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-row_field">Astlib.Ast_500.Parsetree.row_field</a></span></code></div><div class="spec-doc"><p><code>rinherit</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-row_field_desc.Rinherit"><code>Ast.row_field_desc.Rinherit</code></a></p><p><b>Example OCaml</b></p><p><code>[ | t ]</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-rtag"><a href="#val-rtag" class="anchor"></a><code><span><span class="keyword">val</span> rtag :
<span><span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>bool <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-row_field">Astlib.Ast_500.Parsetree.row_field</a></span></code></div><div class="spec-doc"><p><code>rtag</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-row_field_desc.Rtag"><code>Ast.row_field_desc.Rtag</code></a></p><p><b>Example OCaml</b></p><p><code>Rtag(`A, b, l)</code> represents:</p><ul><li><code>`A</code> when <code>b</code> is <code>true</code> and <code>l</code> is <code>[]</code>,</li><li><code>`A of T</code> when <code>b</code> is <code>false</code> and <code>l</code> is <code>[T]</code>,</li><li><code>`A of T1 &amp; .. &amp; Tn</code> when <code>b</code> is <code>false</code> and <code>l</code> is <code>[T1;...Tn]</code>,</li><li><code>`A of &amp; T1 &amp; .. &amp; Tn</code> when <code>b</code> is <code>true</code> and <code>l</code> is <code>[T1;...Tn]</code>.</li></ul><ul><li>The <code>bool</code> field is true if the tag contains a constant (empty) constructor.</li><li><code>&amp;</code> occurs when several types are used for the same constructor (see 4.2 in the manual)</li></ul></div></div><h4 id="position"><a href="#position" class="anchor"></a>Position</h4><div class="odoc-spec"><div class="spec value anchored" id="val-position"><a href="#val-position" class="anchor"></a><code><span><span class="keyword">val</span> position :
<span>fname:string <span class="arrow">&#45;&gt;</span></span>
<span>lnum:int <span class="arrow">&#45;&gt;</span></span>
<span>bol:int <span class="arrow">&#45;&gt;</span></span>
<span>cnum:int <span class="arrow">&#45;&gt;</span></span>
<a href="../../../../ocaml/Stdlib/Lexing/index.html#type-position">Stdlib.Lexing.position</a></span></code></div><div class="spec-doc"><p><code>position</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-position"><code>Ast.position</code></a></p></div></div><h4 id="pattern"><a href="#pattern" class="anchor"></a>Pattern</h4><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_open"><a href="#val-ppat_open" class="anchor"></a><code><span><span class="keyword">val</span> ppat_open :
<span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>ppat_open</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-pattern_desc.Ppat_open"><code>Ast.pattern_desc.Ppat_open</code></a></p><p><b>Example OCaml</b></p><p>Pattern <code>M.(P)</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_extension"><a href="#val-ppat_extension" class="anchor"></a><code><span><span class="keyword">val</span> ppat_extension :
<span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-payload">Astlib.Ast_500.Parsetree.payload</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>ppat_extension</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-pattern_desc.Ppat_extension"><code>Ast.pattern_desc.Ppat_extension</code></a></p><p><b>Example OCaml</b></p><p>Pattern <code>[%id]</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_exception"><a href="#val-ppat_exception" class="anchor"></a><code><span><span class="keyword">val</span> ppat_exception :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>ppat_exception</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-pattern_desc.Ppat_exception"><code>Ast.pattern_desc.Ppat_exception</code></a></p><p><b>Example OCaml</b></p><p>Pattern <code>exception P</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_unpack"><a href="#val-ppat_unpack" class="anchor"></a><code><span><span class="keyword">val</span> ppat_unpack :
<span><span><span>string option</span> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>ppat_unpack</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-pattern_desc.Ppat_unpack"><code>Ast.pattern_desc.Ppat_unpack</code></a></p><p><b>Example OCaml</b></p><p><code>Ppat_unpack(s)</code> represents:</p><ul><li><code>(module P)</code> when <code>s</code> is <code>Some &quot;P&quot;</code></li><li><code>(module _)</code> when <code>s</code> is <code>None</code></li></ul><p>Note: <code>(module P : S)</code> is represented as <code>Ppat_constraint(Ppat_unpack(Some &quot;P&quot;), Ptyp_package S)</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_lazy"><a href="#val-ppat_lazy" class="anchor"></a><code><span><span class="keyword">val</span> ppat_lazy :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>ppat_lazy</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-pattern_desc.Ppat_lazy"><code>Ast.pattern_desc.Ppat_lazy</code></a></p><p><b>Example OCaml</b></p><p>Pattern <code>lazy P</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_type"><a href="#val-ppat_type" class="anchor"></a><code><span><span class="keyword">val</span> ppat_type :
<span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>ppat_type</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-pattern_desc.Ppat_type"><code>Ast.pattern_desc.Ppat_type</code></a></p><p><b>Example OCaml</b></p><p>Pattern <code>#tconst</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_constraint"><a href="#val-ppat_constraint" class="anchor"></a><code><span><span class="keyword">val</span> ppat_constraint :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>ppat_constraint</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-pattern_desc.Ppat_constraint"><code>Ast.pattern_desc.Ppat_constraint</code></a></p><p><b>Example OCaml</b></p><p>Pattern <code>(P : T)</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_or"><a href="#val-ppat_or" class="anchor"></a><code><span><span class="keyword">val</span> ppat_or :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>ppat_or</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-pattern_desc.Ppat_or"><code>Ast.pattern_desc.Ppat_or</code></a></p><p><b>Example OCaml</b></p><p>Pattern <code>P1 | P2</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_array"><a href="#val-ppat_array" class="anchor"></a><code><span><span class="keyword">val</span> ppat_array :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>ppat_array</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-pattern_desc.Ppat_array"><code>Ast.pattern_desc.Ppat_array</code></a></p><p><b>Example OCaml</b></p><p>Pattern <code>[| P1; ...; Pn |]</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_record"><a href="#val-ppat_record" class="anchor"></a><code><span><span class="keyword">val</span> ppat_record :
<span><span><span>(<span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a>)</span>
list</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Asttypes/index.html#type-closed_flag">Astlib.Ast_500.Asttypes.closed_flag</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>ppat_record</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-pattern_desc.Ppat_record"><code>Ast.pattern_desc.Ppat_record</code></a></p><p><b>Example OCaml</b></p><p><code>Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag)</code> represents:</p><ul><li><code>{ l1=P1; ...; ln=Pn }</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-closed_flag.Closed"><code>Closed</code></a></li><li><code>{ l1=P1; ...; ln=Pn; _}</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-closed_flag.Open"><code>Open</code></a></li></ul><p>Invariant: <code>n &gt; 0</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_variant"><a href="#val-ppat_variant" class="anchor"></a><code><span><span class="keyword">val</span> ppat_variant :
<span>string <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>ppat_variant</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-pattern_desc.Ppat_variant"><code>Ast.pattern_desc.Ppat_variant</code></a></p><p><b>Example OCaml</b></p><p><code>Ppat_variant(`A, pat)</code> represents:</p><ul><li><code>`A</code> when <code>pat</code> is <code>None</code>,</li><li><code>`A P</code> when <code>pat</code> is <code>Some P</code></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_tuple"><a href="#val-ppat_tuple" class="anchor"></a><code><span><span class="keyword">val</span> ppat_tuple :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>ppat_tuple</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-pattern_desc.Ppat_tuple"><code>Ast.pattern_desc.Ppat_tuple</code></a></p><p><b>Example OCaml</b></p><p>Patterns <code>(P1, ..., Pn)</code>.</p><p>Invariant: <code>n &gt;= 2</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_interval"><a href="#val-ppat_interval" class="anchor"></a><code><span><span class="keyword">val</span> ppat_interval :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-constant">Astlib.Ast_500.Parsetree.constant</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-constant">Astlib.Ast_500.Parsetree.constant</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>ppat_interval</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-pattern_desc.Ppat_interval"><code>Ast.pattern_desc.Ppat_interval</code></a></p><p><b>Example OCaml</b></p><p>Patterns such as <code>'a'..'z'</code>.</p><p>Other forms of interval are recognized by the parser but rejected by the type-checker.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_constant"><a href="#val-ppat_constant" class="anchor"></a><code><span><span class="keyword">val</span> ppat_constant :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-constant">Astlib.Ast_500.Parsetree.constant</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>ppat_constant</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-pattern_desc.Ppat_constant"><code>Ast.pattern_desc.Ppat_constant</code></a></p><p><b>Example OCaml</b></p><p>Patterns such as <code>1</code>, <code>'a'</code>, <code>&quot;true&quot;</code>, <code>1.0</code>, <code>1l</code>, <code>1L</code>, <code>1n</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_alias"><a href="#val-ppat_alias" class="anchor"></a><code><span><span class="keyword">val</span> ppat_alias :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <span class="arrow">&#45;&gt;</span></span>
<span><span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>ppat_alias</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-pattern_desc.Ppat_alias"><code>Ast.pattern_desc.Ppat_alias</code></a></p><p><b>Example OCaml</b></p><p>An alias pattern such as <code>P as 'a</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_var"><a href="#val-ppat_var" class="anchor"></a><code><span><span class="keyword">val</span> ppat_var : <span><span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>ppat_var</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-pattern_desc.Ppat_var"><code>Ast.pattern_desc.Ppat_var</code></a></p><p><b>Example OCaml</b></p><p>A variable pattern such as <code>x</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_any"><a href="#val-ppat_any" class="anchor"></a><code><span><span class="keyword">val</span> ppat_any : <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>ppat_any</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-pattern_desc.Ppat_any"><code>Ast.pattern_desc.Ppat_any</code></a></p><p><b>Example OCaml</b></p><p>The pattern <code>_</code>.</p></div></div><h4 id="object-field"><a href="#object-field" class="anchor"></a>Object field</h4><div class="odoc-spec"><div class="spec value anchored" id="val-oinherit"><a href="#val-oinherit" class="anchor"></a><code><span><span class="keyword">val</span> oinherit :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-object_field">Astlib.Ast_500.Parsetree.object_field</a></span></code></div><div class="spec-doc"><p><code>oinherit</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-object_field_desc.Oinherit"><code>Ast.object_field_desc.Oinherit</code></a></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-otag"><a href="#val-otag" class="anchor"></a><code><span><span class="keyword">val</span> otag :
<span><span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-object_field">Astlib.Ast_500.Parsetree.object_field</a></span></code></div><div class="spec-doc"><p><code>otag</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-object_field_desc.Otag"><code>Ast.object_field_desc.Otag</code></a></p></div></div><h4 id="module-type-declaration"><a href="#module-type-declaration" class="anchor"></a>Module type declaration</h4><div class="odoc-spec"><div class="spec value anchored" id="val-module_type_declaration"><a href="#val-module_type_declaration" class="anchor"></a><code><span><span class="keyword">val</span> module_type_declaration :
<span>name:<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>type_:<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_type">Astlib.Ast_500.Parsetree.module_type</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_type_declaration">Astlib.Ast_500.Parsetree.module_type_declaration</a></span></code></div><div class="spec-doc"><p><code>module_type_declaration</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_type_declaration"><code>Ast.module_type_declaration</code></a></p><p><b>Example OCaml</b></p><p>Values of type <code>module_type_declaration</code> represents:</p><ul><li><code>S = MT</code>,</li><li><code>S</code> for abstract module type declaration, when <a href="../../index.html#type-module_type_declaration.pmtd_type"><code>pmtd_type</code></a> is <code>None</code>.</li></ul></div></div><h4 id="module-type"><a href="#module-type" class="anchor"></a>Module type</h4><div class="odoc-spec"><div class="spec value anchored" id="val-pmty_alias"><a href="#val-pmty_alias" class="anchor"></a><code><span><span class="keyword">val</span> pmty_alias :
<span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_type">Astlib.Ast_500.Parsetree.module_type</a></span></code></div><div class="spec-doc"><p><code>pmty_alias</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_type_desc.Pmty_alias"><code>Ast.module_type_desc.Pmty_alias</code></a></p><p><b>Example OCaml</b></p><p><code>(module M)</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pmty_extension"><a href="#val-pmty_extension" class="anchor"></a><code><span><span class="keyword">val</span> pmty_extension :
<span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-payload">Astlib.Ast_500.Parsetree.payload</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_type">Astlib.Ast_500.Parsetree.module_type</a></span></code></div><div class="spec-doc"><p><code>pmty_extension</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_type_desc.Pmty_extension"><code>Ast.module_type_desc.Pmty_extension</code></a></p><p><b>Example OCaml</b></p><p><code>[%id]</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pmty_typeof"><a href="#val-pmty_typeof" class="anchor"></a><code><span><span class="keyword">val</span> pmty_typeof :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_type">Astlib.Ast_500.Parsetree.module_type</a></span></code></div><div class="spec-doc"><p><code>pmty_typeof</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_type_desc.Pmty_typeof"><code>Ast.module_type_desc.Pmty_typeof</code></a></p><p><b>Example OCaml</b></p><p><code>module type of ME</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pmty_with"><a href="#val-pmty_with" class="anchor"></a><code><span><span class="keyword">val</span> pmty_with :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_type">Astlib.Ast_500.Parsetree.module_type</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-with_constraint">Astlib.Ast_500.Parsetree.with_constraint</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_type">Astlib.Ast_500.Parsetree.module_type</a></span></code></div><div class="spec-doc"><p><code>pmty_with</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_type_desc.Pmty_with"><code>Ast.module_type_desc.Pmty_with</code></a></p><p><b>Example OCaml</b></p><p><code>MT with ...</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pmty_functor"><a href="#val-pmty_functor" class="anchor"></a><code><span><span class="keyword">val</span> pmty_functor :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-functor_parameter">Astlib.Ast_500.Parsetree.functor_parameter</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_type">Astlib.Ast_500.Parsetree.module_type</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_type">Astlib.Ast_500.Parsetree.module_type</a></span></code></div><div class="spec-doc"><p><code>pmty_functor</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_type_desc.Pmty_functor"><code>Ast.module_type_desc.Pmty_functor</code></a></p><p><b>Example OCaml</b></p><p><code>functor(X : MT1) -&gt; MT2</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pmty_signature"><a href="#val-pmty_signature" class="anchor"></a><code><span><span class="keyword">val</span> pmty_signature :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_type">Astlib.Ast_500.Parsetree.module_type</a></span></code></div><div class="spec-doc"><p><code>pmty_signature</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_type_desc.Pmty_signature"><code>Ast.module_type_desc.Pmty_signature</code></a></p><p><b>Example OCaml</b></p><p><code>sig ... end</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pmty_ident"><a href="#val-pmty_ident" class="anchor"></a><code><span><span class="keyword">val</span> pmty_ident :
<span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_type">Astlib.Ast_500.Parsetree.module_type</a></span></code></div><div class="spec-doc"><p><code>pmty_ident</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_type_desc.Pmty_ident"><code>Ast.module_type_desc.Pmty_ident</code></a></p><p><b>Example OCaml</b></p><p><code>Pmty_ident(S)</code> represents <code>S</code></p></div></div><h4 id="module-substitution"><a href="#module-substitution" class="anchor"></a>Module substitution</h4><div class="odoc-spec"><div class="spec value anchored" id="val-module_substitution"><a href="#val-module_substitution" class="anchor"></a><code><span><span class="keyword">val</span> module_substitution :
<span>name:<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>manifest:<span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_substitution">Astlib.Ast_500.Parsetree.module_substitution</a></span></code></div><div class="spec-doc"><p><code>module_substitution</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_substitution"><code>Ast.module_substitution</code></a></p><p><b>Example OCaml</b></p><p>Values of type <code>module_substitution</code> represents <code>S := M</code></p></div></div><h4 id="module-expr"><a href="#module-expr" class="anchor"></a>Module expr</h4><div class="odoc-spec"><div class="spec value anchored" id="val-pmod_extension"><a href="#val-pmod_extension" class="anchor"></a><code><span><span class="keyword">val</span> pmod_extension :
<span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-payload">Astlib.Ast_500.Parsetree.payload</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a></span></code></div><div class="spec-doc"><p><code>pmod_extension</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_expr_desc.Pmod_extension"><code>Ast.module_expr_desc.Pmod_extension</code></a></p><p><b>Example OCaml</b></p><p><code>[%id]</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pmod_unpack"><a href="#val-pmod_unpack" class="anchor"></a><code><span><span class="keyword">val</span> pmod_unpack :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a></span></code></div><div class="spec-doc"><p><code>pmod_unpack</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_expr_desc.Pmod_unpack"><code>Ast.module_expr_desc.Pmod_unpack</code></a></p><p><b>Example OCaml</b></p><p><code>(val E)</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pmod_constraint"><a href="#val-pmod_constraint" class="anchor"></a><code><span><span class="keyword">val</span> pmod_constraint :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_type">Astlib.Ast_500.Parsetree.module_type</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a></span></code></div><div class="spec-doc"><p><code>pmod_constraint</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_expr_desc.Pmod_constraint"><code>Ast.module_expr_desc.Pmod_constraint</code></a></p><p><b>Example OCaml</b></p><p><code>(ME : MT)</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pmod_apply"><a href="#val-pmod_apply" class="anchor"></a><code><span><span class="keyword">val</span> pmod_apply :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a></span></code></div><div class="spec-doc"><p><code>pmod_apply</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_expr_desc.Pmod_apply"><code>Ast.module_expr_desc.Pmod_apply</code></a></p><p><b>Example OCaml</b></p><p><code>ME1(ME2)</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pmod_functor"><a href="#val-pmod_functor" class="anchor"></a><code><span><span class="keyword">val</span> pmod_functor :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-functor_parameter">Astlib.Ast_500.Parsetree.functor_parameter</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a></span></code></div><div class="spec-doc"><p><code>pmod_functor</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_expr_desc.Pmod_functor"><code>Ast.module_expr_desc.Pmod_functor</code></a></p><p><b>Example OCaml</b></p><p><code>functor(X : MT1) -&gt; ME</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pmod_structure"><a href="#val-pmod_structure" class="anchor"></a><code><span><span class="keyword">val</span> pmod_structure :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a></span></code></div><div class="spec-doc"><p><code>pmod_structure</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_expr_desc.Pmod_structure"><code>Ast.module_expr_desc.Pmod_structure</code></a></p><p><b>Example OCaml</b></p><p><code>struct ... end</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pmod_ident"><a href="#val-pmod_ident" class="anchor"></a><code><span><span class="keyword">val</span> pmod_ident :
<span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a></span></code></div><div class="spec-doc"><p><code>pmod_ident</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_expr_desc.Pmod_ident"><code>Ast.module_expr_desc.Pmod_ident</code></a></p><p><b>Example OCaml</b></p><p><code>X</code></p></div></div><h4 id="module-declaration"><a href="#module-declaration" class="anchor"></a>Module declaration</h4><div class="odoc-spec"><div class="spec value anchored" id="val-module_declaration"><a href="#val-module_declaration" class="anchor"></a><code><span><span class="keyword">val</span> module_declaration :
<span>name:<span><span>string option</span> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>type_:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_type">Astlib.Ast_500.Parsetree.module_type</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_declaration">Astlib.Ast_500.Parsetree.module_declaration</a></span></code></div><div class="spec-doc"><p><code>module_declaration</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_declaration"><code>Ast.module_declaration</code></a></p><p><b>Example OCaml</b></p><p>Values of type <code>module_declaration</code> represents <code>S : MT</code></p></div></div><h4 id="module-binding"><a href="#module-binding" class="anchor"></a>Module binding</h4><div class="odoc-spec"><div class="spec value anchored" id="val-module_binding"><a href="#val-module_binding" class="anchor"></a><code><span><span class="keyword">val</span> module_binding :
<span>name:<span><span>string option</span> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>expr:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_binding">Astlib.Ast_500.Parsetree.module_binding</a></span></code></div><div class="spec-doc"><p><code>module_binding</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-module_binding"><code>Ast.module_binding</code></a></p><p><b>Example OCaml</b></p><p>Values of type <code>module_binding</code> represents <code>module X = ME</code></p></div></div><h4 id="location"><a href="#location" class="anchor"></a>Location</h4><div class="odoc-spec"><div class="spec value anchored" id="val-location"><a href="#val-location" class="anchor"></a><code><span><span class="keyword">val</span> location :
<span>start:<a href="../../../../ocaml/Stdlib/Lexing/index.html#type-position">Stdlib.Lexing.position</a> <span class="arrow">&#45;&gt;</span></span>
<span>end_:<a href="../../../../ocaml/Stdlib/Lexing/index.html#type-position">Stdlib.Lexing.position</a> <span class="arrow">&#45;&gt;</span></span>
<span>ghost:bool <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Location/index.html#type-t">Astlib.Location.t</a></span></code></div><div class="spec-doc"><p><code>location</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-location"><code>Ast.location</code></a></p></div></div><h4 id="letop"><a href="#letop" class="anchor"></a>Letop</h4><div class="odoc-spec"><div class="spec value anchored" id="val-letop"><a href="#val-letop" class="anchor"></a><code><span><span class="keyword">val</span> letop :
<span>let_:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-binding_op">Astlib.Ast_500.Parsetree.binding_op</a> <span class="arrow">&#45;&gt;</span></span>
<span>ands:<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-binding_op">Astlib.Ast_500.Parsetree.binding_op</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>body:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-letop">Astlib.Ast_500.Parsetree.letop</a></span></code></div><div class="spec-doc"><p><code>letop</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-letop"><code>Ast.letop</code></a></p></div></div><h4 id="label-declaration"><a href="#label-declaration" class="anchor"></a>Label declaration</h4><div class="odoc-spec"><div class="spec value anchored" id="val-label_declaration"><a href="#val-label_declaration" class="anchor"></a><code><span><span class="keyword">val</span> label_declaration :
<span>name:<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>mutable_:<a href="../../../Astlib/Ast_500/Asttypes/index.html#type-mutable_flag">Astlib.Ast_500.Asttypes.mutable_flag</a> <span class="arrow">&#45;&gt;</span></span>
<span>type_:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-label_declaration">Astlib.Ast_500.Parsetree.label_declaration</a></span></code></div><div class="spec-doc"><p><code>label_declaration</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-label_declaration"><code>Ast.label_declaration</code></a></p><p><b>Example OCaml</b></p><ul><li><code>{ ...; l: T; ... }</code> when <a href="../../index.html#type-label_declaration.pld_mutable"><code>pld_mutable</code></a> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-mutable_flag.Immutable"><code>Immutable</code></a>,</li><li><code>{ ...; mutable l: T; ... }</code> when <a href="../../index.html#type-label_declaration.pld_mutable"><code>pld_mutable</code></a> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-mutable_flag.Mutable"><code>Mutable</code></a>.</li></ul><p>Note: <code>T</code> can be a <a href="../../index.html#type-core_type_desc.Ptyp_poly"><code>Ptyp_poly</code></a>.</p></div></div><h4 id="extension-constructor"><a href="#extension-constructor" class="anchor"></a>Extension constructor</h4><div class="odoc-spec"><div class="spec value anchored" id="val-extension_constructor"><a href="#val-extension_constructor" class="anchor"></a><code><span><span class="keyword">val</span> extension_constructor :
<span>name:<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>kind:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-extension_constructor_kind">Astlib.Ast_500.Parsetree.extension_constructor_kind</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-extension_constructor">Astlib.Ast_500.Parsetree.extension_constructor</a></span></code></div><div class="spec-doc"><p><code>extension_constructor</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-extension_constructor"><code>Ast.extension_constructor</code></a></p></div></div><h4 id="expression"><a href="#expression" class="anchor"></a>Expression</h4><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_unreachable"><a href="#val-pexp_unreachable" class="anchor"></a><code><span><span class="keyword">val</span> pexp_unreachable : <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_unreachable</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_unreachable"><code>Ast.expression_desc.Pexp_unreachable</code></a></p><p><b>Example OCaml</b></p><p><code>.</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_extension"><a href="#val-pexp_extension" class="anchor"></a><code><span><span class="keyword">val</span> pexp_extension :
<span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-payload">Astlib.Ast_500.Parsetree.payload</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_extension</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_extension"><code>Ast.expression_desc.Pexp_extension</code></a></p><p><b>Example OCaml</b></p><p><code>[%id]</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_letop"><a href="#val-pexp_letop" class="anchor"></a><code><span><span class="keyword">val</span> pexp_letop :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-letop">Astlib.Ast_500.Parsetree.letop</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_letop</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_letop"><code>Ast.expression_desc.Pexp_letop</code></a></p><p><b>Example OCaml</b></p><ul><li><code>let* P = E0 in E1</code></li><li><code>let* P0 = E00 and* P1 = E01 in E1</code></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_open"><a href="#val-pexp_open" class="anchor"></a><code><span><span class="keyword">val</span> pexp_open :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-open_infos">Astlib.Ast_500.Parsetree.open_infos</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_open</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_open"><code>Ast.expression_desc.Pexp_open</code></a></p><p><b>Example OCaml</b></p><ul><li><code>M.(E)</code></li><li><code>let open M in E</code></li><li><code>let open! M in E</code></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_pack"><a href="#val-pexp_pack" class="anchor"></a><code><span><span class="keyword">val</span> pexp_pack :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_pack</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_pack"><code>Ast.expression_desc.Pexp_pack</code></a></p><p><b>Example OCaml</b></p><p><code>(module ME)</code>.</p><p><code>(module ME : S)</code> is represented as <code>Pexp_constraint(Pexp_pack ME, Ptyp_package S)</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_newtype"><a href="#val-pexp_newtype" class="anchor"></a><code><span><span class="keyword">val</span> pexp_newtype :
<span><span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_newtype</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_newtype"><code>Ast.expression_desc.Pexp_newtype</code></a></p><p><b>Example OCaml</b></p><p><code>fun (type t) -&gt; E</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_object"><a href="#val-pexp_object" class="anchor"></a><code><span><span class="keyword">val</span> pexp_object :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_structure">Astlib.Ast_500.Parsetree.class_structure</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_object</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_object"><code>Ast.expression_desc.Pexp_object</code></a></p><p><b>Example OCaml</b></p><p><code>object ... end</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_poly"><a href="#val-pexp_poly" class="anchor"></a><code><span><span class="keyword">val</span> pexp_poly :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_poly</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_poly"><code>Ast.expression_desc.Pexp_poly</code></a></p><p><b>Example OCaml</b></p><p>Used for method bodies.</p><p>Can only be used as the expression under <a href="../../index.html#type-class_field_kind.Cfk_concrete"><code>Cfk_concrete</code></a> for methods (not values).</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_lazy"><a href="#val-pexp_lazy" class="anchor"></a><code><span><span class="keyword">val</span> pexp_lazy :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_lazy</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_lazy"><code>Ast.expression_desc.Pexp_lazy</code></a></p><p><b>Example OCaml</b></p><p><code>lazy E</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_assert"><a href="#val-pexp_assert" class="anchor"></a><code><span><span class="keyword">val</span> pexp_assert :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_assert</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_assert"><code>Ast.expression_desc.Pexp_assert</code></a></p><p><b>Example OCaml</b></p><p><code>assert E</code>.</p><p>Note: <code>assert false</code> is treated in a special way by the type-checker.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_letexception"><a href="#val-pexp_letexception" class="anchor"></a><code><span><span class="keyword">val</span> pexp_letexception :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-extension_constructor">Astlib.Ast_500.Parsetree.extension_constructor</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_letexception</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_letexception"><code>Ast.expression_desc.Pexp_letexception</code></a></p><p><b>Example OCaml</b></p><p><code>let exception C in E</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_letmodule"><a href="#val-pexp_letmodule" class="anchor"></a><code><span><span class="keyword">val</span> pexp_letmodule :
<span><span><span>string option</span> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-module_expr">Astlib.Ast_500.Parsetree.module_expr</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_letmodule</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_letmodule"><code>Ast.expression_desc.Pexp_letmodule</code></a></p><p><b>Example OCaml</b></p><p><code>let module M = ME in E</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_override"><a href="#val-pexp_override" class="anchor"></a><code><span><span class="keyword">val</span> pexp_override :
<span><span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a>)</span> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_override</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_override"><code>Ast.expression_desc.Pexp_override</code></a></p><p><b>Example OCaml</b></p><p><code>{&lt; x1 = E1; ...; xn = En &gt;}</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_setinstvar"><a href="#val-pexp_setinstvar" class="anchor"></a><code><span><span class="keyword">val</span> pexp_setinstvar :
<span><span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_setinstvar</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_setinstvar"><code>Ast.expression_desc.Pexp_setinstvar</code></a></p><p><b>Example OCaml</b></p><p><code>x &lt;- 2</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_new"><a href="#val-pexp_new" class="anchor"></a><code><span><span class="keyword">val</span> pexp_new :
<span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_new</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_new"><code>Ast.expression_desc.Pexp_new</code></a></p><p><b>Example OCaml</b></p><p><code>new M.c</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_send"><a href="#val-pexp_send" class="anchor"></a><code><span><span class="keyword">val</span> pexp_send :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_send</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_send"><code>Ast.expression_desc.Pexp_send</code></a></p><p><b>Example OCaml</b></p><p><code>E # m</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_coerce"><a href="#val-pexp_coerce" class="anchor"></a><code><span><span class="keyword">val</span> pexp_coerce :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_coerce</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_coerce"><code>Ast.expression_desc.Pexp_coerce</code></a></p><p><b>Example OCaml</b></p><p><code>Pexp_coerce(E, from, T)</code> represents</p><ul><li><code>(E :&gt; T)</code> when <code>from</code> is <code>None</code>,</li><li><code>(E : T0 :&gt; T)</code> when <code>from</code> is <code>Some T0</code>.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_constraint"><a href="#val-pexp_constraint" class="anchor"></a><code><span><span class="keyword">val</span> pexp_constraint :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_constraint</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_constraint"><code>Ast.expression_desc.Pexp_constraint</code></a></p><p><b>Example OCaml</b></p><p><code>(E : T)</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_for"><a href="#val-pexp_for" class="anchor"></a><code><span><span class="keyword">val</span> pexp_for :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Asttypes/index.html#type-direction_flag">Astlib.Ast_500.Asttypes.direction_flag</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_for</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_for"><code>Ast.expression_desc.Pexp_for</code></a></p><p><b>Example OCaml</b></p><p><code>Pexp_for(i, E1, E2, direction, E3)</code> represents:</p><ul><li><code>for i = E1 to E2 do E3 done</code> when <code>direction</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-direction_flag.Upto"><code>Upto</code></a></li><li><code>for i = E1 downto E2 do E3 done</code> when <code>direction</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-direction_flag.Downto"><code>Downto</code></a></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_while"><a href="#val-pexp_while" class="anchor"></a><code><span><span class="keyword">val</span> pexp_while :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_while</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_while"><code>Ast.expression_desc.Pexp_while</code></a></p><p><b>Example OCaml</b></p><p><code>while E1 do E2 done</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_sequence"><a href="#val-pexp_sequence" class="anchor"></a><code><span><span class="keyword">val</span> pexp_sequence :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_sequence</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_sequence"><code>Ast.expression_desc.Pexp_sequence</code></a></p><p><b>Example OCaml</b></p><p><code>E1; E2</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_ifthenelse"><a href="#val-pexp_ifthenelse" class="anchor"></a><code><span><span class="keyword">val</span> pexp_ifthenelse :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_ifthenelse</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_ifthenelse"><code>Ast.expression_desc.Pexp_ifthenelse</code></a></p><p><b>Example OCaml</b></p><p><code>if E1 then E2 else E3</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_array"><a href="#val-pexp_array" class="anchor"></a><code><span><span class="keyword">val</span> pexp_array :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_array</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_array"><code>Ast.expression_desc.Pexp_array</code></a></p><p><b>Example OCaml</b></p><p><code>[| E1; ...; En |]</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_setfield"><a href="#val-pexp_setfield" class="anchor"></a><code><span><span class="keyword">val</span> pexp_setfield :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_setfield</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_setfield"><code>Ast.expression_desc.Pexp_setfield</code></a></p><p><b>Example OCaml</b></p><p><code>E1.l &lt;- E2</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_field"><a href="#val-pexp_field" class="anchor"></a><code><span><span class="keyword">val</span> pexp_field :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_field</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_field"><code>Ast.expression_desc.Pexp_field</code></a></p><p><b>Example OCaml</b></p><p><code>E.l</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_record"><a href="#val-pexp_record" class="anchor"></a><code><span><span class="keyword">val</span> pexp_record :
<span><span><span>(<span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a>)</span>
list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_record</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_record"><code>Ast.expression_desc.Pexp_record</code></a></p><p><b>Example OCaml</b></p><p><code>Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0)</code> represents</p><ul><li><code>{ l1=P1; ...; ln=Pn }</code> when <code>exp0</code> is <code>None</code></li><li><code>{ E0 with l1=P1; ...; ln=Pn }</code> when <code>exp0</code> is <code>Some E0</code></li></ul><p>Invariant: <code>n &gt; 0</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_variant"><a href="#val-pexp_variant" class="anchor"></a><code><span><span class="keyword">val</span> pexp_variant :
<span>string <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_variant</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_variant"><code>Ast.expression_desc.Pexp_variant</code></a></p><p><b>Example OCaml</b></p><p><code>Pexp_variant(`A, exp)</code> represents</p><ul><li><code>`A</code> when <code>exp</code> is <code>None</code></li><li><code>`A E</code> when <code>exp</code> is <code>Some E</code></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_construct"><a href="#val-pexp_construct" class="anchor"></a><code><span><span class="keyword">val</span> pexp_construct :
<span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_construct</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_construct"><code>Ast.expression_desc.Pexp_construct</code></a></p><p><b>Example OCaml</b></p><p><code>Pexp_construct(C, exp)</code> represents:</p><ul><li><code>C</code> when <code>exp</code> is <code>None</code>,</li><li><code>C E</code> when <code>exp</code> is <code>Some E</code>,</li><li><code>C (E1, ..., En)</code> when <code>exp</code> is <code>Some (Pexp_tuple[E1;...;En])</code></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_tuple"><a href="#val-pexp_tuple" class="anchor"></a><code><span><span class="keyword">val</span> pexp_tuple :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_tuple</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_tuple"><code>Ast.expression_desc.Pexp_tuple</code></a></p><p><b>Example OCaml</b></p><p>Expressions <code>(E1, ..., En)</code></p><p>Invariant: <code>n &gt;= 2</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_try"><a href="#val-pexp_try" class="anchor"></a><code><span><span class="keyword">val</span> pexp_try :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-case">Astlib.Ast_500.Parsetree.case</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_try</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_try"><code>Ast.expression_desc.Pexp_try</code></a></p><p><b>Example OCaml</b></p><p><code>try E0 with P1 -&gt; E1 | ... | Pn -&gt; En</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_match"><a href="#val-pexp_match" class="anchor"></a><code><span><span class="keyword">val</span> pexp_match :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-case">Astlib.Ast_500.Parsetree.case</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_match</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_match"><code>Ast.expression_desc.Pexp_match</code></a></p><p><b>Example OCaml</b></p><p><code>match E0 with P1 -&gt; E1 | ... | Pn -&gt; En</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_apply"><a href="#val-pexp_apply" class="anchor"></a><code><span><span class="keyword">val</span> pexp_apply :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><span>(<a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label">Astlib.Ast_500.Asttypes.arg_label</a> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a>)</span>
list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_apply</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_apply"><code>Ast.expression_desc.Pexp_apply</code></a></p><p><b>Example OCaml</b></p><p><code>Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)])</code> represents <code>E0 ~l1:E1 ... ~ln:En</code></p><p><code>li</code> can be <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Nolabel"><code>Nolabel</code></a> (non labeled argument), <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Labelled"><code>Labelled</code></a> (labelled arguments) or <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Optional"><code>Optional</code></a> (optional argument).</p><p>Invariant: <code>n &gt; 0</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_fun"><a href="#val-pexp_fun" class="anchor"></a><code><span><span class="keyword">val</span> pexp_fun :
<span><a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label">Astlib.Ast_500.Asttypes.arg_label</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_fun</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_fun"><code>Ast.expression_desc.Pexp_fun</code></a></p><p><b>Example OCaml</b></p><p><code>Pexp_fun(lbl, exp0, P, E1)</code> represents:</p><ul><li><code>fun P -&gt; E1</code> when <code>lbl</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Nolabel"><code>Nolabel</code></a> and <code>exp0</code> is <code>None</code></li><li><code>fun ~l:P -&gt; E1</code> when <code>lbl</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Labelled"><code>Labelled l</code></a> and <code>exp0</code> is <code>None</code></li><li><code>fun ?l:P -&gt; E1</code> when <code>lbl</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Optional"><code>Optional l</code></a> and <code>exp0</code> is <code>None</code></li><li><code>fun ?l:(P = E0) -&gt; E1</code> when <code>lbl</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Optional"><code>Optional l</code></a> and <code>exp0</code> is <code>Some E0</code></li></ul><p>Notes:</p><ul><li>If <code>E0</code> is provided, only <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Optional"><code>Optional</code></a> is allowed.</li><li><code>fun P1 P2 .. Pn -&gt; E1</code> is represented as nested <a href="../../index.html#type-expression_desc.Pexp_fun"><code>Pexp_fun</code></a>.</li><li><code>let f P = E</code> is represented using <a href="../../index.html#type-expression_desc.Pexp_fun"><code>Pexp_fun</code></a>.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_function"><a href="#val-pexp_function" class="anchor"></a><code><span><span class="keyword">val</span> pexp_function :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-case">Astlib.Ast_500.Parsetree.case</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_function</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_function"><code>Ast.expression_desc.Pexp_function</code></a></p><p><b>Example OCaml</b></p><p><code>function P1 -&gt; E1 | ... | Pn -&gt; En</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_let"><a href="#val-pexp_let" class="anchor"></a><code><span><span class="keyword">val</span> pexp_let :
<span><a href="../../../Astlib/Ast_500/Asttypes/index.html#type-rec_flag">Astlib.Ast_500.Asttypes.rec_flag</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-value_binding">Astlib.Ast_500.Parsetree.value_binding</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_let</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_let"><code>Ast.expression_desc.Pexp_let</code></a></p><p><b>Example OCaml</b></p><p><code>Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E)</code> represents:</p><ul><li><code>let P1 = E1 and ... and Pn = EN in E</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-rec_flag.Nonrecursive"><code>Nonrecursive</code></a>,</li><li><code>let rec P1 = E1 and ... and Pn = EN in E</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-rec_flag.Recursive"><code>Recursive</code></a>.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_constant"><a href="#val-pexp_constant" class="anchor"></a><code><span><span class="keyword">val</span> pexp_constant :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-constant">Astlib.Ast_500.Parsetree.constant</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_constant</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_constant"><code>Ast.expression_desc.Pexp_constant</code></a></p><p><b>Example OCaml</b></p><p>Expressions constant such as <code>1</code>, <code>'a'</code>, <code>&quot;true&quot;</code>, <code>1.0</code>, <code>1l</code>, <code>1L</code>, <code>1n</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_ident"><a href="#val-pexp_ident" class="anchor"></a><code><span><span class="keyword">val</span> pexp_ident :
<span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>pexp_ident</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-expression_desc.Pexp_ident"><code>Ast.expression_desc.Pexp_ident</code></a></p><p><b>Example OCaml</b></p><p>Identifiers such as <code>x</code> and <code>M.x</code></p></div></div><h4 id="directive-argument"><a href="#directive-argument" class="anchor"></a>Directive argument</h4><div class="odoc-spec"><div class="spec value anchored" id="val-pdir_bool"><a href="#val-pdir_bool" class="anchor"></a><code><span><span class="keyword">val</span> pdir_bool : <span>bool <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-directive_argument">Astlib.Ast_500.Parsetree.directive_argument</a></span></code></div><div class="spec-doc"><p><code>pdir_bool</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-directive_argument_desc.Pdir_bool"><code>Ast.directive_argument_desc.Pdir_bool</code></a></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pdir_ident"><a href="#val-pdir_ident" class="anchor"></a><code><span><span class="keyword">val</span> pdir_ident :
<span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-directive_argument">Astlib.Ast_500.Parsetree.directive_argument</a></span></code></div><div class="spec-doc"><p><code>pdir_ident</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-directive_argument_desc.Pdir_ident"><code>Ast.directive_argument_desc.Pdir_ident</code></a></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pdir_int"><a href="#val-pdir_int" class="anchor"></a><code><span><span class="keyword">val</span> pdir_int :
<span>string <span class="arrow">&#45;&gt;</span></span>
<span><span>char option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-directive_argument">Astlib.Ast_500.Parsetree.directive_argument</a></span></code></div><div class="spec-doc"><p><code>pdir_int</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-directive_argument_desc.Pdir_int"><code>Ast.directive_argument_desc.Pdir_int</code></a></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pdir_string"><a href="#val-pdir_string" class="anchor"></a><code><span><span class="keyword">val</span> pdir_string : <span>string <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-directive_argument">Astlib.Ast_500.Parsetree.directive_argument</a></span></code></div><div class="spec-doc"><p><code>pdir_string</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-directive_argument_desc.Pdir_string"><code>Ast.directive_argument_desc.Pdir_string</code></a></p></div></div><h4 id="core-type"><a href="#core-type" class="anchor"></a>Core type</h4><div class="odoc-spec"><div class="spec value anchored" id="val-ptyp_extension"><a href="#val-ptyp_extension" class="anchor"></a><code><span><span class="keyword">val</span> ptyp_extension :
<span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-payload">Astlib.Ast_500.Parsetree.payload</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a></span></code></div><div class="spec-doc"><p><code>ptyp_extension</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-core_type_desc.Ptyp_extension"><code>Ast.core_type_desc.Ptyp_extension</code></a></p><p><b>Example OCaml</b></p><p><code>[%id]</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ptyp_package"><a href="#val-ptyp_package" class="anchor"></a><code><span><span class="keyword">val</span> ptyp_package :
<span><span>(<span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span>
* <span><span>(<span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span>
* <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a>)</span>
list</span>)</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a></span></code></div><div class="spec-doc"><p><code>ptyp_package</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-core_type_desc.Ptyp_package"><code>Ast.core_type_desc.Ptyp_package</code></a></p><p><b>Example OCaml</b></p><p><code>(module S)</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ptyp_poly"><a href="#val-ptyp_poly" class="anchor"></a><code><span><span class="keyword">val</span> ptyp_poly :
<span><span><span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a></span></code></div><div class="spec-doc"><p><code>ptyp_poly</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-core_type_desc.Ptyp_poly"><code>Ast.core_type_desc.Ptyp_poly</code></a></p><p><b>Example OCaml</b></p><p><code>'a1 ... 'an. T</code></p><p>Can only appear in the following context:</p><ul><li>As the <a href="../../index.html#type-core_type"><code>core_type</code></a> of a <a href="../../index.html#type-pattern_desc.Ppat_constraint"><code>Ppat_constraint</code></a> node corresponding to a constraint on a let-binding:</li></ul><pre class="language-ocaml"><code>let x : 'a1 ... 'an. T = e ...</code></pre><ul><li>Under <a href="../../index.html#type-class_field_kind.Cfk_virtual"><code>Cfk_virtual</code></a> for methods (not values).</li></ul><ul><li>As the <a href="../../index.html#type-core_type"><code>core_type</code></a> of a <a href="../../index.html#type-class_type_field_desc.Pctf_method"><code>Pctf_method</code></a> node.</li></ul><ul><li>As the <a href="../../index.html#type-core_type"><code>core_type</code></a> of a <a href="../../index.html#type-expression_desc.Pexp_poly"><code>Pexp_poly</code></a> node.</li></ul><ul><li>As the <a href="../../index.html#type-label_declaration.pld_type"><code>pld_type</code></a> field of a <a href="#val-label_declaration"><code>label_declaration</code></a>.</li></ul><ul><li>As a <a href="../../index.html#type-core_type"><code>core_type</code></a> of a <a href="../../index.html#type-core_type_desc.Ptyp_object"><code>Ptyp_object</code></a> node.</li></ul><ul><li>As the <a href="../../index.html#type-value_description.pval_type"><code>pval_type</code></a> field of a <a href="#val-value_description"><code>value_description</code></a>.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ptyp_variant"><a href="#val-ptyp_variant" class="anchor"></a><code><span><span class="keyword">val</span> ptyp_variant :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-row_field">Astlib.Ast_500.Parsetree.row_field</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Asttypes/index.html#type-closed_flag">Astlib.Ast_500.Asttypes.closed_flag</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><span>string list</span> option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a></span></code></div><div class="spec-doc"><p><code>ptyp_variant</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-core_type_desc.Ptyp_variant"><code>Ast.core_type_desc.Ptyp_variant</code></a></p><p><b>Example OCaml</b></p><p><code>Ptyp_variant([`A;`B], flag, labels)</code> represents:</p><ul><li><code>[ `A|`B ]</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-closed_flag.Closed"><code>Closed</code></a>, and <code>labels</code> is <code>None</code>,</li><li><code>[&gt; `A|`B ]</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-closed_flag.Open"><code>Open</code></a>, and <code>labels</code> is <code>None</code>,</li><li><code>[&lt; `A|`B ]</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-closed_flag.Closed"><code>Closed</code></a>, and <code>labels</code> is <code>Some []</code>,</li><li><code>[&lt; `A|`B &gt; `X `Y ]</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-closed_flag.Closed"><code>Closed</code></a>, and <code>labels</code> is <code>Some [&quot;X&quot;;&quot;Y&quot;]</code>.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ptyp_alias"><a href="#val-ptyp_alias" class="anchor"></a><code><span><span class="keyword">val</span> ptyp_alias :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <span class="arrow">&#45;&gt;</span></span>
<span>string <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a></span></code></div><div class="spec-doc"><p><code>ptyp_alias</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-core_type_desc.Ptyp_alias"><code>Ast.core_type_desc.Ptyp_alias</code></a></p><p><b>Example OCaml</b></p><p><code>T as 'a</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ptyp_class"><a href="#val-ptyp_class" class="anchor"></a><code><span><span class="keyword">val</span> ptyp_class :
<span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a></span></code></div><div class="spec-doc"><p><code>ptyp_class</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-core_type_desc.Ptyp_class"><code>Ast.core_type_desc.Ptyp_class</code></a></p><p><b>Example OCaml</b></p><p><code>Ptyp_class(tconstr, l)</code> represents:</p><ul><li><code>#tconstr</code> when <code>l=[]</code>,</li><li><code>T #tconstr</code> when <code>l=[T]</code>,</li><li><code>(T1, ..., Tn) #tconstr</code> when <code>l=[T1 ; ... ; Tn]</code>.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ptyp_object"><a href="#val-ptyp_object" class="anchor"></a><code><span><span class="keyword">val</span> ptyp_object :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-object_field">Astlib.Ast_500.Parsetree.object_field</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Asttypes/index.html#type-closed_flag">Astlib.Ast_500.Asttypes.closed_flag</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a></span></code></div><div class="spec-doc"><p><code>ptyp_object</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-core_type_desc.Ptyp_object"><code>Ast.core_type_desc.Ptyp_object</code></a></p><p><b>Example OCaml</b></p><p><code>Ptyp_object([ l1:T1; ...; ln:Tn ], flag)</code> represents:</p><ul><li><code>&lt; l1:T1; ...; ln:Tn &gt;</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-closed_flag.Closed"><code>Closed</code></a>,</li><li><code>&lt; l1:T1; ...; ln:Tn; .. &gt;</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-closed_flag.Open"><code>Open</code></a>.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ptyp_constr"><a href="#val-ptyp_constr" class="anchor"></a><code><span><span class="keyword">val</span> ptyp_constr :
<span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a></span></code></div><div class="spec-doc"><p><code>ptyp_constr</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-core_type_desc.Ptyp_constr"><code>Ast.core_type_desc.Ptyp_constr</code></a></p><p><b>Example OCaml</b></p><p><code>Ptyp_constr(lident, l)</code> represents:</p><ul><li><code>tconstr</code> when <code>l=[]</code>,</li><li><code>T tconstr</code> when <code>l=[T]</code>,</li><li><code>(T1, ..., Tn) tconstr</code> when <code>l=[T1 ; ... ; Tn]</code>.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ptyp_tuple"><a href="#val-ptyp_tuple" class="anchor"></a><code><span><span class="keyword">val</span> ptyp_tuple :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a></span></code></div><div class="spec-doc"><p><code>ptyp_tuple</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-core_type_desc.Ptyp_tuple"><code>Ast.core_type_desc.Ptyp_tuple</code></a></p><p><b>Example OCaml</b></p><p><code>Ptyp_tuple([T1 ; ... ; Tn])</code> represents a product type <code>T1 * ... * Tn</code>.</p><p>Invariant: <code>n &gt;= 2</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ptyp_arrow"><a href="#val-ptyp_arrow" class="anchor"></a><code><span><span class="keyword">val</span> ptyp_arrow :
<span><a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label">Astlib.Ast_500.Asttypes.arg_label</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a></span></code></div><div class="spec-doc"><p><code>ptyp_arrow</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-core_type_desc.Ptyp_arrow"><code>Ast.core_type_desc.Ptyp_arrow</code></a></p><p><b>Example OCaml</b></p><p><code>Ptyp_arrow(lbl, T1, T2)</code> represents:</p><ul><li><code>T1 -&gt; T2</code> when <code>lbl</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Nolabel"><code>Nolabel</code></a>,</li><li><code>~l:T1 -&gt; T2</code> when <code>lbl</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Labelled"><code>Labelled</code></a>,</li><li><code>?l:T1 -&gt; T2</code> when <code>lbl</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Optional"><code>Optional</code></a>.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ptyp_var"><a href="#val-ptyp_var" class="anchor"></a><code><span><span class="keyword">val</span> ptyp_var : <span>string <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a></span></code></div><div class="spec-doc"><p><code>ptyp_var</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-core_type_desc.Ptyp_var"><code>Ast.core_type_desc.Ptyp_var</code></a></p><p><b>Example OCaml</b></p><p>A type variable such as <code>'a</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ptyp_any"><a href="#val-ptyp_any" class="anchor"></a><code><span><span class="keyword">val</span> ptyp_any : <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a></span></code></div><div class="spec-doc"><p><code>ptyp_any</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-core_type_desc.Ptyp_any"><code>Ast.core_type_desc.Ptyp_any</code></a></p><p><b>Example OCaml</b></p><p><code>_</code></p></div></div><h4 id="constructor-declaration"><a href="#constructor-declaration" class="anchor"></a>Constructor declaration</h4><h4 id="class-type-field"><a href="#class-type-field" class="anchor"></a>Class type field</h4><div class="odoc-spec"><div class="spec value anchored" id="val-pctf_extension"><a href="#val-pctf_extension" class="anchor"></a><code><span><span class="keyword">val</span> pctf_extension :
<span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-payload">Astlib.Ast_500.Parsetree.payload</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type_field">Astlib.Ast_500.Parsetree.class_type_field</a></span></code></div><div class="spec-doc"><p><code>pctf_extension</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_type_field_desc.Pctf_extension"><code>Ast.class_type_field_desc.Pctf_extension</code></a></p><p><b>Example OCaml</b></p><p><code>[%%id]</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pctf_attribute"><a href="#val-pctf_attribute" class="anchor"></a><code><span><span class="keyword">val</span> pctf_attribute :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-attribute">Astlib.Ast_500.Parsetree.attribute</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type_field">Astlib.Ast_500.Parsetree.class_type_field</a></span></code></div><div class="spec-doc"><p><code>pctf_attribute</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_type_field_desc.Pctf_attribute"><code>Ast.class_type_field_desc.Pctf_attribute</code></a></p><p><b>Example OCaml</b></p><p><code>[@@@id]</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pctf_constraint"><a href="#val-pctf_constraint" class="anchor"></a><code><span><span class="keyword">val</span> pctf_constraint :
<span><span>(<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type_field">Astlib.Ast_500.Parsetree.class_type_field</a></span></code></div><div class="spec-doc"><p><code>pctf_constraint</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_type_field_desc.Pctf_constraint"><code>Ast.class_type_field_desc.Pctf_constraint</code></a></p><p><b>Example OCaml</b></p><p><code>constraint T1 = T2</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pctf_method"><a href="#val-pctf_method" class="anchor"></a><code><span><span class="keyword">val</span> pctf_method :
<span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span>
* <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-private_flag">Astlib.Ast_500.Asttypes.private_flag</a>
* <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-virtual_flag">Astlib.Ast_500.Asttypes.virtual_flag</a>
* <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type_field">Astlib.Ast_500.Parsetree.class_type_field</a></span></code></div><div class="spec-doc"><p><code>pctf_method</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_type_field_desc.Pctf_method"><code>Ast.class_type_field_desc.Pctf_method</code></a></p><p><b>Example OCaml</b></p><p><code>method x: T</code></p><p>Note: <code>T</code> can be a <a href="../../index.html#type-core_type_desc.Ptyp_poly"><code>Ptyp_poly</code></a>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pctf_val"><a href="#val-pctf_val" class="anchor"></a><code><span><span class="keyword">val</span> pctf_val :
<span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span>
* <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-mutable_flag">Astlib.Ast_500.Asttypes.mutable_flag</a>
* <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-virtual_flag">Astlib.Ast_500.Asttypes.virtual_flag</a>
* <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type_field">Astlib.Ast_500.Parsetree.class_type_field</a></span></code></div><div class="spec-doc"><p><code>pctf_val</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_type_field_desc.Pctf_val"><code>Ast.class_type_field_desc.Pctf_val</code></a></p><p><b>Example OCaml</b></p><p><code>val x: T</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pctf_inherit"><a href="#val-pctf_inherit" class="anchor"></a><code><span><span class="keyword">val</span> pctf_inherit :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type">Astlib.Ast_500.Parsetree.class_type</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type_field">Astlib.Ast_500.Parsetree.class_type_field</a></span></code></div><div class="spec-doc"><p><code>pctf_inherit</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_type_field_desc.Pctf_inherit"><code>Ast.class_type_field_desc.Pctf_inherit</code></a></p><p><b>Example OCaml</b></p><p><code>inherit CT</code></p></div></div><h4 id="class-type"><a href="#class-type" class="anchor"></a>Class type</h4><div class="odoc-spec"><div class="spec value anchored" id="val-pcty_open"><a href="#val-pcty_open" class="anchor"></a><code><span><span class="keyword">val</span> pcty_open :
<span><span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-open_infos">Astlib.Ast_500.Parsetree.open_infos</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type">Astlib.Ast_500.Parsetree.class_type</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type">Astlib.Ast_500.Parsetree.class_type</a></span></code></div><div class="spec-doc"><p><code>pcty_open</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_type_desc.Pcty_open"><code>Ast.class_type_desc.Pcty_open</code></a></p><p><b>Example OCaml</b></p><p><code>let open M in CT</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pcty_extension"><a href="#val-pcty_extension" class="anchor"></a><code><span><span class="keyword">val</span> pcty_extension :
<span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-payload">Astlib.Ast_500.Parsetree.payload</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type">Astlib.Ast_500.Parsetree.class_type</a></span></code></div><div class="spec-doc"><p><code>pcty_extension</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_type_desc.Pcty_extension"><code>Ast.class_type_desc.Pcty_extension</code></a></p><p><b>Example OCaml</b></p><p><code>%id</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pcty_arrow"><a href="#val-pcty_arrow" class="anchor"></a><code><span><span class="keyword">val</span> pcty_arrow :
<span><a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label">Astlib.Ast_500.Asttypes.arg_label</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type">Astlib.Ast_500.Parsetree.class_type</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type">Astlib.Ast_500.Parsetree.class_type</a></span></code></div><div class="spec-doc"><p><code>pcty_arrow</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_type_desc.Pcty_arrow"><code>Ast.class_type_desc.Pcty_arrow</code></a></p><p><b>Example OCaml</b></p><p><code>Pcty_arrow(lbl, T, CT)</code> represents:</p><ul><li><code>T -&gt; CT</code> when <code>lbl</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Nolabel"><code>Nolabel</code></a>,</li><li><code>~l:T -&gt; CT</code> when <code>lbl</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Labelled"><code>Labelled l</code></a>,</li><li><code>?l:T -&gt; CT</code> when <code>lbl</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Optional"><code>Optional l</code></a>.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pcty_signature"><a href="#val-pcty_signature" class="anchor"></a><code><span><span class="keyword">val</span> pcty_signature :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_signature">Astlib.Ast_500.Parsetree.class_signature</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type">Astlib.Ast_500.Parsetree.class_type</a></span></code></div><div class="spec-doc"><p><code>pcty_signature</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_type_desc.Pcty_signature"><code>Ast.class_type_desc.Pcty_signature</code></a></p><p><b>Example OCaml</b></p><p><code>object ... end</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pcty_constr"><a href="#val-pcty_constr" class="anchor"></a><code><span><span class="keyword">val</span> pcty_constr :
<span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type">Astlib.Ast_500.Parsetree.class_type</a></span></code></div><div class="spec-doc"><p><code>pcty_constr</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_type_desc.Pcty_constr"><code>Ast.class_type_desc.Pcty_constr</code></a></p><p><b>Example OCaml</b></p><ul><li><code>c</code></li><li><code>['a1, ..., 'an] c</code></li></ul></div></div><h4 id="class-structure"><a href="#class-structure" class="anchor"></a>Class structure</h4><div class="odoc-spec"><div class="spec value anchored" id="val-class_structure"><a href="#val-class_structure" class="anchor"></a><code><span><span class="keyword">val</span> class_structure :
<span>self:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <span class="arrow">&#45;&gt;</span></span>
<span>fields:<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_field">Astlib.Ast_500.Parsetree.class_field</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_structure">Astlib.Ast_500.Parsetree.class_structure</a></span></code></div><div class="spec-doc"><p><code>class_structure</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_structure"><code>Ast.class_structure</code></a></p><p><b>Example OCaml</b></p><p>Values of type <a href="#val-class_structure"><code>class_structure</code></a> represents:</p><ul><li><code>object(selfpat) ... end</code></li><li><code>object ... end</code> when <a href="../../index.html#type-class_structure.pcstr_self"><code>pcstr_self</code></a> is <a href="../../index.html#type-pattern_desc.Ppat_any"><code>Ppat_any</code></a></li></ul></div></div><h4 id="class-signature"><a href="#class-signature" class="anchor"></a>Class signature</h4><div class="odoc-spec"><div class="spec value anchored" id="val-class_signature"><a href="#val-class_signature" class="anchor"></a><code><span><span class="keyword">val</span> class_signature :
<span>self:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <span class="arrow">&#45;&gt;</span></span>
<span>fields:<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type_field">Astlib.Ast_500.Parsetree.class_type_field</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_signature">Astlib.Ast_500.Parsetree.class_signature</a></span></code></div><div class="spec-doc"><p><code>class_signature</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_signature"><code>Ast.class_signature</code></a></p><p><b>Example OCaml</b></p><p>Values of type <code>class_signature</code> represents:</p><ul><li><code>object('selfpat) ... end</code></li><li><code>object ... end</code> when <a href="../../index.html#type-class_signature.pcsig_self"><code>pcsig_self</code></a> is <a href="../../index.html#type-core_type_desc.Ptyp_any"><code>Ptyp_any</code></a></li></ul></div></div><h4 id="class-field"><a href="#class-field" class="anchor"></a>Class field</h4><div class="odoc-spec"><div class="spec value anchored" id="val-pcf_extension"><a href="#val-pcf_extension" class="anchor"></a><code><span><span class="keyword">val</span> pcf_extension :
<span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-payload">Astlib.Ast_500.Parsetree.payload</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_field">Astlib.Ast_500.Parsetree.class_field</a></span></code></div><div class="spec-doc"><p><code>pcf_extension</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_field_desc.Pcf_extension"><code>Ast.class_field_desc.Pcf_extension</code></a></p><p><b>Example OCaml</b></p><p><code>[%%id]</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pcf_attribute"><a href="#val-pcf_attribute" class="anchor"></a><code><span><span class="keyword">val</span> pcf_attribute :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-attribute">Astlib.Ast_500.Parsetree.attribute</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_field">Astlib.Ast_500.Parsetree.class_field</a></span></code></div><div class="spec-doc"><p><code>pcf_attribute</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_field_desc.Pcf_attribute"><code>Ast.class_field_desc.Pcf_attribute</code></a></p><p><b>Example OCaml</b></p><p><code>[@@@id]</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pcf_initializer"><a href="#val-pcf_initializer" class="anchor"></a><code><span><span class="keyword">val</span> pcf_initializer :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_field">Astlib.Ast_500.Parsetree.class_field</a></span></code></div><div class="spec-doc"><p><code>pcf_initializer</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_field_desc.Pcf_initializer"><code>Ast.class_field_desc.Pcf_initializer</code></a></p><p><b>Example OCaml</b></p><p><code>initializer E</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pcf_constraint"><a href="#val-pcf_constraint" class="anchor"></a><code><span><span class="keyword">val</span> pcf_constraint :
<span><span>(<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_field">Astlib.Ast_500.Parsetree.class_field</a></span></code></div><div class="spec-doc"><p><code>pcf_constraint</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_field_desc.Pcf_constraint"><code>Ast.class_field_desc.Pcf_constraint</code></a></p><p><b>Example OCaml</b></p><p><code>constraint T1 = T2</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pcf_method"><a href="#val-pcf_method" class="anchor"></a><code><span><span class="keyword">val</span> pcf_method :
<span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span>
* <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-private_flag">Astlib.Ast_500.Asttypes.private_flag</a>
* <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_field_kind">Astlib.Ast_500.Parsetree.class_field_kind</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_field">Astlib.Ast_500.Parsetree.class_field</a></span></code></div><div class="spec-doc"><p><code>pcf_method</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_field_desc.Pcf_method"><code>Ast.class_field_desc.Pcf_method</code></a></p><p><b>Example OCaml</b></p><ul><li><code>method x = E</code> (<code>E</code> can be a <a href="../../index.html#type-expression_desc.Pexp_poly"><code>Pexp_poly</code></a>)</li><li><code>method virtual x: T</code> (<code>T</code> can be a <a href="../../index.html#type-core_type_desc.Ptyp_poly"><code>Ptyp_poly</code></a>)</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pcf_val"><a href="#val-pcf_val" class="anchor"></a><code><span><span class="keyword">val</span> pcf_val :
<span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span>
* <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-mutable_flag">Astlib.Ast_500.Asttypes.mutable_flag</a>
* <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_field_kind">Astlib.Ast_500.Parsetree.class_field_kind</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_field">Astlib.Ast_500.Parsetree.class_field</a></span></code></div><div class="spec-doc"><p><code>pcf_val</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_field_desc.Pcf_val"><code>Ast.class_field_desc.Pcf_val</code></a></p><p><b>Example OCaml</b></p><p><code>Pcf_val(x,flag, kind)</code> represents:</p><ul><li><code>val x = E</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-mutable_flag.Immutable"><code>Immutable</code></a> and <code>kind</code> is <a href="../../index.html#type-class_field_kind.Cfk_concrete"><code>Cfk_concrete(Fresh, E)</code></a></li><li><code>val virtual x: T</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-mutable_flag.Immutable"><code>Immutable</code></a> and <code>kind</code> is <a href="../../index.html#type-class_field_kind.Cfk_virtual"><code>Cfk_virtual(T)</code></a></li><li><code>val mutable x = E</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-mutable_flag.Mutable"><code>Mutable</code></a> and <code>kind</code> is <a href="../../index.html#type-class_field_kind.Cfk_concrete"><code>Cfk_concrete(Fresh, E)</code></a></li><li><code>val mutable virtual x: T</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-mutable_flag.Mutable"><code>Mutable</code></a> and <code>kind</code> is <a href="../../index.html#type-class_field_kind.Cfk_virtual"><code>Cfk_virtual(T)</code></a></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pcf_inherit"><a href="#val-pcf_inherit" class="anchor"></a><code><span><span class="keyword">val</span> pcf_inherit :
<span><a href="../../../Astlib/Ast_500/Asttypes/index.html#type-override_flag">Astlib.Ast_500.Asttypes.override_flag</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_expr">Astlib.Ast_500.Parsetree.class_expr</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_field">Astlib.Ast_500.Parsetree.class_field</a></span></code></div><div class="spec-doc"><p><code>pcf_inherit</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_field_desc.Pcf_inherit"><code>Ast.class_field_desc.Pcf_inherit</code></a></p><p><b>Example OCaml</b></p><p><code>Pcf_inherit(flag, CE, s)</code> represents:</p><ul><li><code>inherit CE</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-override_flag.Fresh"><code>Fresh</code></a> and <code>s</code> is <code>None</code>,</li><li><code>inherit CE as x</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-override_flag.Fresh"><code>Fresh</code></a> and <code>s</code> is <code>Some x</code>,</li><li><code>inherit! CE</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-override_flag.Override"><code>Override</code></a> and <code>s</code> is <code>None</code>,</li><li><code>inherit! CE as x</code> when <code>flag</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-override_flag.Override"><code>Override</code></a> and <code>s</code> is <code>Some x</code></li></ul></div></div><h4 id="class-expr"><a href="#class-expr" class="anchor"></a>Class expr</h4><div class="odoc-spec"><div class="spec value anchored" id="val-pcl_open"><a href="#val-pcl_open" class="anchor"></a><code><span><span class="keyword">val</span> pcl_open :
<span><span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-open_infos">Astlib.Ast_500.Parsetree.open_infos</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_expr">Astlib.Ast_500.Parsetree.class_expr</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_expr">Astlib.Ast_500.Parsetree.class_expr</a></span></code></div><div class="spec-doc"><p><code>pcl_open</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_expr_desc.Pcl_open"><code>Ast.class_expr_desc.Pcl_open</code></a></p><p><b>Example OCaml</b></p><p><code>let open M in CE</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pcl_extension"><a href="#val-pcl_extension" class="anchor"></a><code><span><span class="keyword">val</span> pcl_extension :
<span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-payload">Astlib.Ast_500.Parsetree.payload</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_expr">Astlib.Ast_500.Parsetree.class_expr</a></span></code></div><div class="spec-doc"><p><code>pcl_extension</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_expr_desc.Pcl_extension"><code>Ast.class_expr_desc.Pcl_extension</code></a></p><p><b>Example OCaml</b></p><p><code>[%id]</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pcl_constraint"><a href="#val-pcl_constraint" class="anchor"></a><code><span><span class="keyword">val</span> pcl_constraint :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_expr">Astlib.Ast_500.Parsetree.class_expr</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_type">Astlib.Ast_500.Parsetree.class_type</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_expr">Astlib.Ast_500.Parsetree.class_expr</a></span></code></div><div class="spec-doc"><p><code>pcl_constraint</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_expr_desc.Pcl_constraint"><code>Ast.class_expr_desc.Pcl_constraint</code></a></p><p><b>Example OCaml</b></p><p><code>(CE : CT)</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pcl_let"><a href="#val-pcl_let" class="anchor"></a><code><span><span class="keyword">val</span> pcl_let :
<span><a href="../../../Astlib/Ast_500/Asttypes/index.html#type-rec_flag">Astlib.Ast_500.Asttypes.rec_flag</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-value_binding">Astlib.Ast_500.Parsetree.value_binding</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_expr">Astlib.Ast_500.Parsetree.class_expr</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_expr">Astlib.Ast_500.Parsetree.class_expr</a></span></code></div><div class="spec-doc"><p><code>pcl_let</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_expr_desc.Pcl_let"><code>Ast.class_expr_desc.Pcl_let</code></a></p><p><b>Example OCaml</b></p><p><code>Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE)</code> represents:</p><ul><li><code>let P1 = E1 and ... and Pn = EN in CE</code> when <code>rec</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-rec_flag.Nonrecursive"><code>Nonrecursive</code></a>,</li><li><code>let rec P1 = E1 and ... and Pn = EN in CE</code> when <code>rec</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-rec_flag.Recursive"><code>Recursive</code></a>.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pcl_apply"><a href="#val-pcl_apply" class="anchor"></a><code><span><span class="keyword">val</span> pcl_apply :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_expr">Astlib.Ast_500.Parsetree.class_expr</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><span>(<a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label">Astlib.Ast_500.Asttypes.arg_label</a> * <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a>)</span>
list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_expr">Astlib.Ast_500.Parsetree.class_expr</a></span></code></div><div class="spec-doc"><p><code>pcl_apply</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_expr_desc.Pcl_apply"><code>Ast.class_expr_desc.Pcl_apply</code></a></p><p><b>Example OCaml</b></p><p><code>Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)])</code> represents <code>CE ~l1:E1 ... ~ln:En</code>. <code>li</code> can be empty (non labeled argument) or start with <code>?</code> (optional argument).</p><p>Invariant: <code>n &gt; 0</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pcl_fun"><a href="#val-pcl_fun" class="anchor"></a><code><span><span class="keyword">val</span> pcl_fun :
<span><a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label">Astlib.Ast_500.Asttypes.arg_label</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_expr">Astlib.Ast_500.Parsetree.class_expr</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_expr">Astlib.Ast_500.Parsetree.class_expr</a></span></code></div><div class="spec-doc"><p><code>pcl_fun</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_expr_desc.Pcl_fun"><code>Ast.class_expr_desc.Pcl_fun</code></a></p><p><b>Example OCaml</b></p><p><code>Pcl_fun(lbl, exp0, P, CE)</code> represents:</p><ul><li><code>fun P -&gt; CE</code> when <code>lbl</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Nolabel"><code>Nolabel</code></a> and <code>exp0</code> is <code>None</code>,</li><li><code>fun ~l:P -&gt; CE</code> when <code>lbl</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Labelled"><code>Labelled l</code></a> and <code>exp0</code> is <code>None</code>,</li><li><code>fun ?l:P -&gt; CE</code> when <code>lbl</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Optional"><code>Optional l</code></a> and <code>exp0</code> is <code>None</code>,</li><li><code>fun ?l:(P = E0) -&gt; CE</code> when <code>lbl</code> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-arg_label.Optional"><code>Optional l</code></a> and <code>exp0</code> is <code>Some E0</code>.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pcl_structure"><a href="#val-pcl_structure" class="anchor"></a><code><span><span class="keyword">val</span> pcl_structure :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_structure">Astlib.Ast_500.Parsetree.class_structure</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_expr">Astlib.Ast_500.Parsetree.class_expr</a></span></code></div><div class="spec-doc"><p><code>pcl_structure</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_expr_desc.Pcl_structure"><code>Ast.class_expr_desc.Pcl_structure</code></a></p><p><b>Example OCaml</b></p><p><code>object ... end</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pcl_constr"><a href="#val-pcl_constr" class="anchor"></a><code><span><span class="keyword">val</span> pcl_constr :
<span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_expr">Astlib.Ast_500.Parsetree.class_expr</a></span></code></div><div class="spec-doc"><p><code>pcl_constr</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-class_expr_desc.Pcl_constr"><code>Ast.class_expr_desc.Pcl_constr</code></a></p><p><b>Example OCaml</b></p><p><code>c</code> and <code>['a1, ..., 'an] c</code></p></div></div><h4 id="case"><a href="#case" class="anchor"></a>Case</h4><div class="odoc-spec"><div class="spec value anchored" id="val-case"><a href="#val-case" class="anchor"></a><code><span><span class="keyword">val</span> case :
<span>lhs:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <span class="arrow">&#45;&gt;</span></span>
<span>guard:<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<span>rhs:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-case">Astlib.Ast_500.Parsetree.case</a></span></code></div><div class="spec-doc"><p><code>case</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-case"><code>Ast.case</code></a></p><p><b>Example OCaml</b></p><p>Values of type <a href="#val-case"><code>case</code></a> represents <code>(P -&gt; E)</code> or <code>(P when E0 -&gt; E)</code></p></div></div><h4 id="binding-op"><a href="#binding-op" class="anchor"></a>Binding op</h4><div class="odoc-spec"><div class="spec value anchored" id="val-binding_op"><a href="#val-binding_op" class="anchor"></a><code><span><span class="keyword">val</span> binding_op :
<span>op:<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>pat:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <span class="arrow">&#45;&gt;</span></span>
<span>exp:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-binding_op">Astlib.Ast_500.Parsetree.binding_op</a></span></code></div><div class="spec-doc"><p><code>binding_op</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-binding_op"><code>Ast.binding_op</code></a></p></div></div><h4 id="attribute"><a href="#attribute" class="anchor"></a>Attribute</h4><div class="odoc-spec"><div class="spec value anchored" id="val-attribute"><a href="#val-attribute" class="anchor"></a><code><span><span class="keyword">val</span> attribute :
<span>name:<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>payload:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-payload">Astlib.Ast_500.Parsetree.payload</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-attribute">Astlib.Ast_500.Parsetree.attribute</a></span></code></div><div class="spec-doc"><p><code>attribute</code> constructs an <a href="../../../Ppxlib_ast/Ast/index.html#type-attribute"><code>Ast.attribute</code></a></p><p><b>Example OCaml</b></p><p>Attributes such as <code>[@id ARG]</code> and <code>[@@id ARG]</code>.</p><p>Metadata containers passed around within the AST. The compiler ignores unknown attributes.</p></div></div><h4 id="'a-open-infos"><a href="#'a-open-infos" class="anchor"></a>'a open infos</h4><div class="odoc-spec"><div class="spec value anchored" id="val-open_infos"><a href="#val-open_infos" class="anchor"></a><code><span><span class="keyword">val</span> open_infos :
<span>expr:<span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span>
<span>override:<a href="../../../Astlib/Ast_500/Asttypes/index.html#type-override_flag">Astlib.Ast_500.Asttypes.override_flag</a> <span class="arrow">&#45;&gt;</span></span>
<span><span class="type-var">'a</span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-open_infos">Astlib.Ast_500.Parsetree.open_infos</a></span></span></code></div><div class="spec-doc"><p><code>open_infos</code> constructs an <code>Ast</code>.'aopen_infos</p><p><b>Example OCaml</b></p><p>Values of type <code>'a open_infos</code> represents:</p><ul><li><code>open! X</code> when <a href="../../index.html#type-open_infos.popen_override"><code>popen_override</code></a> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-override_flag.Override"><code>Override</code></a> (silences the &quot;used identifier shadowing&quot; warning)</li><li><code>open X</code> when <a href="../../index.html#type-open_infos.popen_override"><code>popen_override</code></a> is <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-override_flag.Fresh"><code>Fresh</code></a></li></ul></div></div><h4 id="'a-include-infos"><a href="#'a-include-infos" class="anchor"></a>'a include infos</h4><div class="odoc-spec"><div class="spec value anchored" id="val-include_infos"><a href="#val-include_infos" class="anchor"></a><code><span><span class="keyword">val</span> include_infos : <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-include_infos">Astlib.Ast_500.Parsetree.include_infos</a></span></span></code></div><div class="spec-doc"><p><code>include_infos</code> constructs an <code>Ast</code>.'ainclude_infos</p></div></div><h4 id="'a-class-infos"><a href="#'a-class-infos" class="anchor"></a>'a class infos</h4><div class="odoc-spec"><div class="spec value anchored" id="val-class_infos"><a href="#val-class_infos" class="anchor"></a><code><span><span class="keyword">val</span> class_infos :
<span>virt:<a href="../../../Astlib/Ast_500/Asttypes/index.html#type-virtual_flag">Astlib.Ast_500.Asttypes.virtual_flag</a> <span class="arrow">&#45;&gt;</span></span>
<span>params:
<span><span>(<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a>
* <span>(<a href="../../../Astlib/Ast_500/Asttypes/index.html#type-variance">Astlib.Ast_500.Asttypes.variance</a> * <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-injectivity">Astlib.Ast_500.Asttypes.injectivity</a>)</span>)</span>
list</span> <span class="arrow">&#45;&gt;</span></span>
<span>name:<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>expr:<span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="type-var">'a</span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-class_infos">Astlib.Ast_500.Parsetree.class_infos</a></span></span></code></div><div class="spec-doc"><p><code>class_infos</code> constructs an <code>Ast</code>.'aclass_infos</p><p><b>Example OCaml</b></p><p>Values of type <code>class_expr class_infos</code> represents:</p><ul><li><code>class c = ...</code></li><li><code>class ['a1,...,'an] c = ...</code></li><li><code>class virtual c = ...</code></li></ul><p>They are also used for &quot;class type&quot; declaration.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-eint"><a href="#val-eint" class="anchor"></a><code><span><span class="keyword">val</span> eint : <span>int <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-echar"><a href="#val-echar" class="anchor"></a><code><span><span class="keyword">val</span> echar : <span>char <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-estring"><a href="#val-estring" class="anchor"></a><code><span><span class="keyword">val</span> estring : <span>string <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-efloat"><a href="#val-efloat" class="anchor"></a><code><span><span class="keyword">val</span> efloat : <span>string <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-eint32"><a href="#val-eint32" class="anchor"></a><code><span><span class="keyword">val</span> eint32 : <span>int32 <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-eint64"><a href="#val-eint64" class="anchor"></a><code><span><span class="keyword">val</span> eint64 : <span>int64 <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-enativeint"><a href="#val-enativeint" class="anchor"></a><code><span><span class="keyword">val</span> enativeint : <span>nativeint <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ebool"><a href="#val-ebool" class="anchor"></a><code><span><span class="keyword">val</span> ebool : <span>bool <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pint"><a href="#val-pint" class="anchor"></a><code><span><span class="keyword">val</span> pint : <span>int <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pchar"><a href="#val-pchar" class="anchor"></a><code><span><span class="keyword">val</span> pchar : <span>char <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pstring"><a href="#val-pstring" class="anchor"></a><code><span><span class="keyword">val</span> pstring : <span>string <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pfloat"><a href="#val-pfloat" class="anchor"></a><code><span><span class="keyword">val</span> pfloat : <span>string <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pint32"><a href="#val-pint32" class="anchor"></a><code><span><span class="keyword">val</span> pint32 : <span>int32 <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pint64"><a href="#val-pint64" class="anchor"></a><code><span><span class="keyword">val</span> pint64 : <span>int64 <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pnativeint"><a href="#val-pnativeint" class="anchor"></a><code><span><span class="keyword">val</span> pnativeint : <span>nativeint <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pbool"><a href="#val-pbool" class="anchor"></a><code><span><span class="keyword">val</span> pbool : <span>bool <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-eunit"><a href="#val-eunit" class="anchor"></a><code><span><span class="keyword">val</span> eunit : <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-punit"><a href="#val-punit" class="anchor"></a><code><span><span class="keyword">val</span> punit : <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-evar"><a href="#val-evar" class="anchor"></a><code><span><span class="keyword">val</span> evar : <span>string <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>evar id</code> produces a <code>Pexp_ident _</code> expression, it parses its input so you can pass any dot-separated identifier, for instance: <code>evar ~loc &quot;Foo.bar&quot;</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pvar"><a href="#val-pvar" class="anchor"></a><code><span><span class="keyword">val</span> pvar : <span>string <span class="arrow">&#45;&gt;</span></span> <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-eapply"><a href="#val-eapply" class="anchor"></a><code><span><span class="keyword">val</span> eapply :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p>Same as pexp_apply but without labels</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-eabstract"><a href="#val-eabstract" class="anchor"></a><code><span><span class="keyword">val</span> eabstract :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-esequence"><a href="#val-esequence" class="anchor"></a><code><span><span class="keyword">val</span> esequence :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_tuple_opt"><a href="#val-ppat_tuple_opt" class="anchor"></a><code><span><span class="keyword">val</span> ppat_tuple_opt :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> option</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pexp_tuple_opt"><a href="#val-pexp_tuple_opt" class="anchor"></a><code><span><span class="keyword">val</span> pexp_tuple_opt :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> option</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pconstruct"><a href="#val-pconstruct" class="anchor"></a><code><span><span class="keyword">val</span> pconstruct :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-constructor_declaration">Astlib.Ast_500.Parsetree.constructor_declaration</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-econstruct"><a href="#val-econstruct" class="anchor"></a><code><span><span class="keyword">val</span> econstruct :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-constructor_declaration">Astlib.Ast_500.Parsetree.constructor_declaration</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-elist_tail"><a href="#val-elist_tail" class="anchor"></a><code><span><span class="keyword">val</span> elist_tail :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>elist_tail ~loc [expr1; expr2; expr3] expr_tail</code> produces the expression <code>expr1::expr2::expr3::expr_tail</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-elist"><a href="#val-elist" class="anchor"></a><code><span><span class="keyword">val</span> elist :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>elist ~loc [expr1; expr2; expr3]</code> produces the list litteral expression <code>[expr1; expr2; expr3]</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-plist_tail"><a href="#val-plist_tail" class="anchor"></a><code><span><span class="keyword">val</span> plist_tail :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>plist_tail ~loc [pat1; pat2; pat3] pat_tail</code> produces the pattern <code>pat1::pat2::pat3::pat_tail</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-plist"><a href="#val-plist" class="anchor"></a><code><span><span class="keyword">val</span> plist :
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div><div class="spec-doc"><p><code>plist ~loc [pat1; pat2; pat3]</code> produces the list pattern <code>[pat1; pat2; pat3]</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pstr_value_list"><a href="#val-pstr_value_list" class="anchor"></a><code><span><span class="keyword">val</span> pstr_value_list :
<span>loc:<a href="../../Location/index.html#type-t">Location.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Asttypes/index.html#type-rec_flag">Ppxlib_ast.Asttypes.rec_flag</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-value_binding">Astlib.Ast_500.Parsetree.value_binding</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a> list</span></span></code></div><div class="spec-doc"><p><code>pstr_value_list ~loc rf vbs</code> = <code>pstr_value ~loc rf vbs</code> if <code>vbs &lt;&gt; []</code>, <code>[]</code> otherwise.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-nonrec_type_declaration"><a href="#val-nonrec_type_declaration" class="anchor"></a><code><span><span class="keyword">val</span> nonrec_type_declaration :
<span>name:<span>string <a href="../../Loc/index.html#type-t">Loc.t</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>params:
<span><span>(<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> * <a href="../../../Astlib/Ast_500/Asttypes/index.html#type-variance">Ppxlib_ast.Asttypes.variance</a>)</span> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>cstrs:
<span><span>(<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a>
* <a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a>
* <a href="../../Location/index.html#type-t">Location.t</a>)</span>
list</span> <span class="arrow">&#45;&gt;</span></span>
<span>kind:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-type_kind">Astlib.Ast_500.Parsetree.type_kind</a> <span class="arrow">&#45;&gt;</span></span>
<span>private_:<a href="../../../Astlib/Ast_500/Asttypes/index.html#type-private_flag">Ppxlib_ast.Asttypes.private_flag</a> <span class="arrow">&#45;&gt;</span></span>
<span>manifest:<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-type_declaration">Astlib.Ast_500.Parsetree.type_declaration</a></span></code></div><div class="spec-doc"><ul class="at-tags"><li class="deprecated"><span class="at-tag">deprecated</span> [since 2016-10] use Nonrecursive on the P(str|sig)_type instead</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-unapplied_type_constr_conv"><a href="#val-unapplied_type_constr_conv" class="anchor"></a><code><span><span class="keyword">val</span> unapplied_type_constr_conv :
<span><span><a href="../../Longident/index.html#type-t">Longident.t</a> <a href="../../Loc/index.html#type-t">Loc.t</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>f:<span>(<span>string <span class="arrow">&#45;&gt;</span></span> string)</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div><div class="spec-doc"><p><code>unapplied_type_constr_conv</code> is the standard way to map identifiers to conversion fonctions, for preprocessor that creates values that follow the structure of types. More precisely, <code>path_conv path (sprintf &quot;sexp_of_%s&quot;)</code> is:</p><ul><li>sexp_of_t if path is &quot;t&quot;</li><li>A.B.sexp_of_foo if path is &quot;A.B.foo&quot;</li><li>A.B.sexp_of_f__foo (module A1) (module A2) if path is &quot;A.B.F(A1)(A2).foo&quot; <code>type_constr_conv</code> also applies it to a list of expression, which both prevents the compiler from allocating useless closures, and almost always what is needed, since type constructors are always applied.</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-type_constr_conv"><a href="#val-type_constr_conv" class="anchor"></a><code><span><span class="keyword">val</span> type_constr_conv :
<span><span><a href="../../Longident/index.html#type-t">Longident.t</a> <a href="../../Loc/index.html#type-t">Loc.t</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>f:<span>(<span>string <span class="arrow">&#45;&gt;</span></span> string)</span> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-eta_reduce"><a href="#val-eta_reduce" class="anchor"></a><code><span><span class="keyword">val</span> eta_reduce :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> option</span></span></code></div><div class="spec-doc"><p>Tries to simplify <code>fun v1 v2 .. -&gt; f v1 v2 ..</code> into <code>f</code>. Only works when <code>f</code> is a path, not an arbitrary expression as that would change the meaning of the code. This can be used either for cleaning up the generated code, or to reduce allocation if <code>f</code> is a local variable (the compiler won't optimize the allocation of the closure).</p><p>Eta-reduction can change the types/behavior in some corner cases that are unlikely to show up in generated code:</p><ul><li>if <code>f</code> has optional arguments, eta-expanding <code>f</code> can drop them</li><li>because labels commute, it can change the type of an expression: $ let f ~x y = x + y let f2 = fun x -&gt; add x;; val f : x:int -&gt; int -&gt; int = &lt;fun&gt; val f2 : int -&gt; x:int -&gt; int = &lt;fun&gt; In fact, if <code>f</code> does side effects before receiving all its arguments, and if the eta-expansion is partially applied, eta-reducing could change behavior.</li></ul><p><code>eta_reduce_if_possible_and_nonrec</code> is meant for the case where the resulting expression is going to be bound in a potentially recursive let-binding, where we have to keep the eta-expansion when <code>rec_flag</code> is <code>Recursive</code> to avoid a compile error.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-eta_reduce_if_possible"><a href="#val-eta_reduce_if_possible" class="anchor"></a><code><span><span class="keyword">val</span> eta_reduce_if_possible :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-eta_reduce_if_possible_and_nonrec"><a href="#val-eta_reduce_if_possible_and_nonrec" class="anchor"></a><code><span><span class="keyword">val</span> eta_reduce_if_possible_and_nonrec :
<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span>
<span>rec_flag:<a href="../../../Astlib/Ast_500/Asttypes/index.html#type-rec_flag">Astlib.Ast_500.Asttypes.rec_flag</a> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Latest"><a href="#module-Latest" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Latest/index.html">Latest</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppat_construct"><a href="#val-ppat_construct" class="anchor"></a><code><span><span class="keyword">val</span> ppat_construct :
<span><span><a href="../../../Astlib/Longident/index.html#type-t">Astlib.Longident.t</a> <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-constructor_declaration"><a href="#val-constructor_declaration" class="anchor"></a><code><span><span class="keyword">val</span> constructor_declaration :
<span>name:<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>args:<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-constructor_arguments">Astlib.Ast_500.Parsetree.constructor_arguments</a> <span class="arrow">&#45;&gt;</span></span>
<span>res:<span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> option</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-constructor_declaration">Astlib.Ast_500.Parsetree.constructor_declaration</a></span></code></div></div></div></body></html>