This commit is contained in:
c-cube 2025-01-13 18:31:05 +00:00
parent 5eb2ef5286
commit 7360a37c38
34 changed files with 1643 additions and 1516 deletions

View file

@ -1,3 +1,7 @@
# 0.9
- add an extensible sum type, so users can implement custom events. For example
an OTEL collector can provide custom events to link two spans to one another.
# 0.8

File diff suppressed because one or more lines are too long

View file

@ -1,2 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Keyword (ppxlib.Astlib.Keyword)</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">Astlib</a> &#x00BB; Keyword</nav><header class="odoc-preamble"><h1>Module <code><span>Astlib.Keyword</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-is_keyword"><a href="#val-is_keyword" class="anchor"></a><code><span><span class="keyword">val</span> is_keyword : <span>string <span class="arrow">&#45;&gt;</span></span> bool</span></code></div><div class="spec-doc"><p>Check if a string is an OCaml keyword.</p></div></div></div></body></html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Keyword (ppxlib.Astlib.Keyword)</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">Astlib</a> &#x00BB; Keyword</nav><header class="odoc-preamble"><h1>Module <code><span>Astlib.Keyword</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-is_keyword"><a href="#val-is_keyword" class="anchor"></a><code><span><span class="keyword">val</span> is_keyword : <span>string <span class="arrow">&#45;&gt;</span></span> bool</span></code></div><div class="spec-doc"><p>Check if a string is an OCaml keyword.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-apply_keyword_edition"><a href="#val-apply_keyword_edition" class="anchor"></a><code><span><span class="keyword">val</span> apply_keyword_edition : <span>cli:<span>string option</span> <span class="arrow">&#45;&gt;</span></span> <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Processes any keywords= sections from the OCAMLPARAM environment variable and CLI option and initialises the compiler's lexer with the correct keyword set.</p></div></div></div></body></html>

View file

@ -8,7 +8,10 @@
unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-string_of_expression"><a href="#val-string_of_expression" class="anchor"></a><code><span><span class="keyword">val</span> string_of_expression : <span><a href="../Ast_414/Parsetree/index.html#type-expression">Ast_414.Parsetree.expression</a> <span class="arrow">&#45;&gt;</span></span> string</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-top_phrase"><a href="#val-top_phrase" class="anchor"></a><code><span><span class="keyword">val</span> top_phrase :
<span><a href="../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../Ast_414/Parsetree/index.html#type-toplevel_phrase">Ast_414.Parsetree.toplevel_phrase</a> <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-core_type"><a href="#val-core_type" class="anchor"></a><code><span><span class="keyword">val</span> core_type : <span><a href="../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Ast_414/Parsetree/index.html#type-core_type">Ast_414.Parsetree.core_type</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pattern"><a href="#val-pattern" class="anchor"></a><code><span><span class="keyword">val</span> pattern : <span><a href="../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Ast_414/Parsetree/index.html#type-pattern">Ast_414.Parsetree.pattern</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-signature"><a href="#val-signature" class="anchor"></a><code><span><span class="keyword">val</span> signature : <span><a href="../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Ast_414/Parsetree/index.html#type-signature">Ast_414.Parsetree.signature</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-structure"><a href="#val-structure" class="anchor"></a><code><span><span class="keyword">val</span> structure : <span><a href="../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Ast_414/Parsetree/index.html#type-structure">Ast_414.Parsetree.structure</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-string_of_structure"><a href="#val-string_of_structure" class="anchor"></a><code><span><span class="keyword">val</span> string_of_structure : <span><a href="../Ast_414/Parsetree/index.html#type-structure">Ast_414.Parsetree.structure</a> <span class="arrow">&#45;&gt;</span></span> string</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-class_expr"><a href="#val-class_expr" class="anchor"></a><code><span><span class="keyword">val</span> class_expr :
unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-core_type"><a href="#val-core_type" class="anchor"></a><code><span><span class="keyword">val</span> core_type : <span><a href="../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Ast_414/Parsetree/index.html#type-core_type">Ast_414.Parsetree.core_type</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pattern"><a href="#val-pattern" class="anchor"></a><code><span><span class="keyword">val</span> pattern : <span><a href="../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Ast_414/Parsetree/index.html#type-pattern">Ast_414.Parsetree.pattern</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-signature"><a href="#val-signature" class="anchor"></a><code><span><span class="keyword">val</span> signature : <span><a href="../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Ast_414/Parsetree/index.html#type-signature">Ast_414.Parsetree.signature</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-structure"><a href="#val-structure" class="anchor"></a><code><span><span class="keyword">val</span> structure : <span><a href="../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Ast_414/Parsetree/index.html#type-structure">Ast_414.Parsetree.structure</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-string_of_structure"><a href="#val-string_of_structure" class="anchor"></a><code><span><span class="keyword">val</span> string_of_structure : <span><a href="../Ast_414/Parsetree/index.html#type-structure">Ast_414.Parsetree.structure</a> <span class="arrow">&#45;&gt;</span></span> string</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-binding"><a href="#val-binding" class="anchor"></a><code><span><span class="keyword">val</span> binding :
<span><a href="../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../Ast_414/Parsetree/index.html#type-value_binding">Ast_414.Parsetree.value_binding</a> <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-longident"><a href="#val-longident" class="anchor"></a><code><span><span class="keyword">val</span> longident : <span><a href="../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Longident/index.html#type-t">Longident.t</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-payload"><a href="#val-payload" class="anchor"></a><code><span><span class="keyword">val</span> payload : <span><a href="../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Ast_414/Parsetree/index.html#type-payload">Ast_414.Parsetree.payload</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-class_expr"><a href="#val-class_expr" class="anchor"></a><code><span><span class="keyword">val</span> class_expr :
<span><a href="../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../Ast_414/Parsetree/index.html#type-class_expr">Ast_414.Parsetree.class_expr</a> <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-class_field"><a href="#val-class_field" class="anchor"></a><code><span><span class="keyword">val</span> class_field :

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -85,4 +85,20 @@
<span><span>(<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a>,
<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-type_exception">Astlib.Ast_500.Parsetree.type_exception</a>,
<span class="type-var">_</span>)</span>
<a href="#type-attr_inline">attr_inline</a></span></span></code></div></div></div></body></html>
<a href="#type-attr_inline">attr_inline</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-attr_str_class_type_decl"><a href="#val-attr_str_class_type_decl" class="anchor"></a><code><span><span class="keyword">val</span> attr_str_class_type_decl :
<span><span>(<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a>,
<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>,
<span class="type-var">_</span>)</span>
<a href="#type-attr_group_inline">attr_group_inline</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-attr_sig_class_type_decl"><a href="#val-attr_sig_class_type_decl" class="anchor"></a><code><span><span class="keyword">val</span> attr_sig_class_type_decl :
<span><span>(<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a>,
<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>,
<span class="type-var">_</span>)</span>
<a href="#type-attr_group_inline">attr_group_inline</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-attr_str_class_type_decl_expect"><a href="#val-attr_str_class_type_decl_expect" class="anchor"></a><code><span><span class="keyword">val</span> attr_str_class_type_decl_expect :
<span><span>(<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a>,
<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>,
<span class="type-var">_</span>)</span>
<a href="#type-attr_group_inline">attr_group_inline</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-attr_sig_class_type_decl_expect"><a href="#val-attr_sig_class_type_decl_expect" class="anchor"></a><code><span><span class="keyword">val</span> attr_sig_class_type_decl_expect :
<span><span>(<a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a>,
<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>,
<span class="type-var">_</span>)</span>
<a href="#type-attr_group_inline">attr_group_inline</a></span></span></code></div></div></div></body></html>

View file

@ -5,6 +5,11 @@
<a href="../../Astlib/Ast_500/Asttypes/index.html#type-rec_flag">Astlib.Ast_500.Asttypes.rec_flag</a>
* <span><a href="../../Astlib/Ast_500/Parsetree/index.html#type-type_declaration">Astlib.Ast_500.Parsetree.type_declaration</a> list</span>)</span>
<a href="Generator/index.html#type-t">Generator.t</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>?str_class_type_decl:
<span><span>(<span><a href="../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a> list</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>
<a href="Generator/index.html#type-t">Generator.t</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>?str_type_ext:
<span><span>(<span><a href="../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a> list</span>,
<a href="../../Astlib/Ast_500/Parsetree/index.html#type-type_extension">Astlib.Ast_500.Parsetree.type_extension</a>)</span>
@ -22,6 +27,11 @@
<a href="../../Astlib/Ast_500/Asttypes/index.html#type-rec_flag">Astlib.Ast_500.Asttypes.rec_flag</a>
* <span><a href="../../Astlib/Ast_500/Parsetree/index.html#type-type_declaration">Astlib.Ast_500.Parsetree.type_declaration</a> list</span>)</span>
<a href="Generator/index.html#type-t">Generator.t</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>?sig_class_type_decl:
<span><span>(<span><a href="../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a> list</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>
<a href="Generator/index.html#type-t">Generator.t</a></span> <span class="arrow">&#45;&gt;</span></span>
<span>?sig_type_ext:
<span><span>(<span><a href="../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a> list</span>,
<a href="../../Astlib/Ast_500/Parsetree/index.html#type-type_extension">Astlib.Ast_500.Parsetree.type_extension</a>)</span>
@ -43,10 +53,12 @@
<a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Register a new deriving generator.</p><p>The various arguments are for the various items on which derivers can be attached in structure and signatures.</p><p>We distinguish <code>exception</code> from <code>type_extension</code> as <code>exception E</code> is not exactly the same as <code>type exn += E</code>. Indeed if the type <code>exn</code> is redefined, then <code>type exn += E</code> will add <code>E</code> to the new <code>exn</code> type while <code>exception E</code> will add <code>E</code> to the predefined <code>exn</code> type.</p><p><code>extension</code> register an expander for extension with the name of the deriver. This is here mostly to support the ppx_deriving backend.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_alias"><a href="#val-add_alias" class="anchor"></a><code><span><span class="keyword">val</span> add_alias :
<span>string <span class="arrow">&#45;&gt;</span></span>
<span>?str_type_decl:<span><a href="#type-t">t</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>?str_class_type_decl:<span><a href="#type-t">t</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>?str_type_ext:<span><a href="#type-t">t</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>?str_exception:<span><a href="#type-t">t</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>?str_module_type_decl:<span><a href="#type-t">t</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>?sig_type_decl:<span><a href="#type-t">t</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>?sig_class_type_decl:<span><a href="#type-t">t</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>?sig_type_ext:<span><a href="#type-t">t</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>?sig_exception:<span><a href="#type-t">t</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>?sig_module_type_decl:<span><a href="#type-t">t</a> list</span> <span class="arrow">&#45;&gt;</span></span>

View file

@ -0,0 +1,7 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Config (ppxlib.Ppxlib.Pp_ast.Config)</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">Pp_ast</a> &#x00BB; Config</nav><header class="odoc-preamble"><h1>Module <code><span>Pp_ast.Config</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div><div class="spec-doc"><p>Type for AST pretty-printing config</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-make"><a href="#val-make" class="anchor"></a><code><span><span class="keyword">val</span> make :
<span>?show_attrs:bool <span class="arrow">&#45;&gt;</span></span>
<span>?show_locs:bool <span class="arrow">&#45;&gt;</span></span>
<span>?loc_mode:<span>[ `Short <span>| `Full</span> ]</span> <span class="arrow">&#45;&gt;</span></span>
<span>unit <span class="arrow">&#45;&gt;</span></span>
<a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Create a custom pretty-printing config. Default values are the ones that are used when no configuration is passed to the pretty-printers defined in <a href="../index.html"><code>Pp_ast</code></a>.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">?show_attrs</span> <p>controls whether attributes are shown or hidden. Defaults to <code>false</code>.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">?show_loc</span> <p>controls whether locations are shown or hidden. Defaults to <code>false</code>.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">?loc_mode</span> <p>controls how locations are shown if they are shown at all. Defaults to <code>`Short</code>.</p><ul><li>When set to <code>`Short</code>, locations are displayed as <code>&quot;l1c6..l2c2&quot;</code> for multiline locations and as <code>&quot;l1c6..12&quot;</code> for single line locations. Ghost locations are suffixed with a <code>&quot;(g)&quot;</code>.</li><li>When set to <code>`Full</code>, locations are displayed as any other record would be.</li></ul></li></ul></div></div></div></body></html>

View file

@ -0,0 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Default (ppxlib.Ppxlib.Pp_ast.Default)</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">Pp_ast</a> &#x00BB; Default</nav><header class="odoc-preamble"><h1>Module <code><span>Pp_ast.Default</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-printer"><a href="#type-printer" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a printer</span></span><span> = <span><span class="type-var">'a</span> <a href="../index.html#type-configured">configured</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-structure"><a href="#val-structure" class="anchor"></a><code><span><span class="keyword">val</span> structure : <span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a> list</span> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-structure_item"><a href="#val-structure_item" class="anchor"></a><code><span><span class="keyword">val</span> structure_item : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-signature"><a href="#val-signature" class="anchor"></a><code><span><span class="keyword">val</span> signature : <span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a> list</span> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-signature_item"><a href="#val-signature_item" class="anchor"></a><code><span><span class="keyword">val</span> signature_item : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-expression"><a href="#val-expression" class="anchor"></a><code><span><span class="keyword">val</span> expression : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pattern"><a href="#val-pattern" class="anchor"></a><code><span><span class="keyword">val</span> pattern : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-core_type"><a href="#val-core_type" class="anchor"></a><code><span><span class="keyword">val</span> core_type : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <a href="#type-printer">printer</a></span></span></code></div></div></div></body></html>

View file

@ -0,0 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Conf (ppxlib.Ppxlib.Pp_ast.Make.Conf)</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">Pp_ast</a> &#x00BB; <a href="../index.html">Make</a> &#x00BB; Conf</nav><header class="odoc-preamble"><h1>Parameter <code><span>Make.Conf</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-config"><a href="#val-config" class="anchor"></a><code><span><span class="keyword">val</span> config : <a href="../../Config/index.html#type-t">Config.t</a></span></code></div></div></div></body></html>

View file

@ -0,0 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make (ppxlib.Ppxlib.Pp_ast.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">Pp_ast</a> &#x00BB; Make</nav><header class="odoc-preamble"><h1>Module <code><span>Pp_ast.Make</span></code></h1></header><nav class="odoc-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></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-Conf"><a href="#argument-1-Conf" class="anchor"></a><code><span><span class="keyword">module</span> </span><span><a href="argument-1-Conf/index.html">Conf</a></span><span> : <a href="../module-type-Conf/index.html">Conf</a></span></code></div></div><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-spec"><div class="spec type anchored" id="type-printer"><a href="#type-printer" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a printer</span></span><span> = <span><span class="type-var">'a</span> <a href="../index.html#type-configured">configured</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-structure"><a href="#val-structure" class="anchor"></a><code><span><span class="keyword">val</span> structure : <span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a> list</span> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-structure_item"><a href="#val-structure_item" class="anchor"></a><code><span><span class="keyword">val</span> structure_item : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-signature"><a href="#val-signature" class="anchor"></a><code><span><span class="keyword">val</span> signature : <span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a> list</span> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-signature_item"><a href="#val-signature_item" class="anchor"></a><code><span><span class="keyword">val</span> signature_item : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-expression"><a href="#val-expression" class="anchor"></a><code><span><span class="keyword">val</span> expression : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pattern"><a href="#val-pattern" class="anchor"></a><code><span><span class="keyword">val</span> pattern : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-core_type"><a href="#val-core_type" class="anchor"></a><code><span><span class="keyword">val</span> core_type : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <a href="#type-printer">printer</a></span></span></code></div></div></div></body></html>

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Conf (ppxlib.Ppxlib.Pp_ast.Conf)</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">Pp_ast</a> &#x00BB; Conf</nav><header class="odoc-preamble"><h1>Module type <code><span>Pp_ast.Conf</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-config"><a href="#val-config" class="anchor"></a><code><span><span class="keyword">val</span> config : <a href="../Config/index.html#type-t">Config.t</a></span></code></div></div></div></body></html>

View file

@ -0,0 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Configurable (ppxlib.Ppxlib.Pp_ast.Configurable)</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">Pp_ast</a> &#x00BB; Configurable</nav><header class="odoc-preamble"><h1>Module type <code><span>Pp_ast.Configurable</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-printer"><a href="#type-printer" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a printer</span></span><span> = <span><span class="type-var">'a</span> <a href="../index.html#type-configurable">configurable</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-structure"><a href="#val-structure" class="anchor"></a><code><span><span class="keyword">val</span> structure : <span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a> list</span> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-structure_item"><a href="#val-structure_item" class="anchor"></a><code><span><span class="keyword">val</span> structure_item : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-signature"><a href="#val-signature" class="anchor"></a><code><span><span class="keyword">val</span> signature : <span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a> list</span> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-signature_item"><a href="#val-signature_item" class="anchor"></a><code><span><span class="keyword">val</span> signature_item : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-expression"><a href="#val-expression" class="anchor"></a><code><span><span class="keyword">val</span> expression : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pattern"><a href="#val-pattern" class="anchor"></a><code><span><span class="keyword">val</span> pattern : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-core_type"><a href="#val-core_type" class="anchor"></a><code><span><span class="keyword">val</span> core_type : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <a href="#type-printer">printer</a></span></span></code></div></div></div></body></html>

View file

@ -0,0 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Configured (ppxlib.Ppxlib.Pp_ast.Configured)</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">Pp_ast</a> &#x00BB; Configured</nav><header class="odoc-preamble"><h1>Module type <code><span>Pp_ast.Configured</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-printer"><a href="#type-printer" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a printer</span></span><span> = <span><span class="type-var">'a</span> <a href="../index.html#type-configured">configured</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-structure"><a href="#val-structure" class="anchor"></a><code><span><span class="keyword">val</span> structure : <span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a> list</span> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-structure_item"><a href="#val-structure_item" class="anchor"></a><code><span><span class="keyword">val</span> structure_item : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-signature"><a href="#val-signature" class="anchor"></a><code><span><span class="keyword">val</span> signature : <span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a> list</span> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-signature_item"><a href="#val-signature_item" class="anchor"></a><code><span><span class="keyword">val</span> signature_item : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-expression"><a href="#val-expression" class="anchor"></a><code><span><span class="keyword">val</span> expression : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pattern"><a href="#val-pattern" class="anchor"></a><code><span><span class="keyword">val</span> pattern : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-core_type"><a href="#val-core_type" class="anchor"></a><code><span><span class="keyword">val</span> core_type : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <a href="#type-printer">printer</a></span></span></code></div></div></div></body></html>

View file

@ -0,0 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>S (ppxlib.Ppxlib.Pp_ast.S)</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">Pp_ast</a> &#x00BB; S</nav><header class="odoc-preamble"><h1>Module type <code><span>Pp_ast.S</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-printer"><a href="#type-printer" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a printer</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-structure"><a href="#val-structure" class="anchor"></a><code><span><span class="keyword">val</span> structure : <span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a> list</span> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-structure_item"><a href="#val-structure_item" class="anchor"></a><code><span><span class="keyword">val</span> structure_item : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-structure_item">Astlib.Ast_500.Parsetree.structure_item</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-signature"><a href="#val-signature" class="anchor"></a><code><span><span class="keyword">val</span> signature : <span><span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a> list</span> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-signature_item"><a href="#val-signature_item" class="anchor"></a><code><span><span class="keyword">val</span> signature_item : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-signature_item">Astlib.Ast_500.Parsetree.signature_item</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-expression"><a href="#val-expression" class="anchor"></a><code><span><span class="keyword">val</span> expression : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pattern"><a href="#val-pattern" class="anchor"></a><code><span><span class="keyword">val</span> pattern : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-pattern">Astlib.Ast_500.Parsetree.pattern</a> <a href="#type-printer">printer</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-core_type"><a href="#val-core_type" class="anchor"></a><code><span><span class="keyword">val</span> core_type : <span><a href="../../../Astlib/Ast_500/Parsetree/index.html#type-core_type">Astlib.Ast_500.Parsetree.core_type</a> <a href="#type-printer">printer</a></span></span></code></div></div></div></body></html>

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Ppxlib__Pp_ast (ppxlib.Ppxlib__Pp_ast)</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; Ppxlib__Pp_ast</nav><header class="odoc-preamble"><h1>Module <code><span>Ppxlib__Pp_ast</span></code></h1></header><div class="odoc-content"></div></body></html>

View file

@ -1,12 +1,13 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>reconstructors (ppxlib.Ppxlib_traverse.Backends.reconstructors)</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_traverse</a> &#x00BB; <a href="../index.html">Backends</a> &#x00BB; reconstructors</nav><header class="odoc-preamble"><h1>Class <code><span>Backends.reconstructors</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec method anchored" id="method-record"><a href="#method-record" class="anchor"></a><code><span><span class="keyword">method</span> record : <span><a href="#">reconstructors</a> <span class="arrow">&#45;&gt;</span></span>
<span>loc:<span class="xref-unresolved">Ppxlib__.Import.location</span> <span class="arrow">&#45;&gt;</span></span>
<span><span><span>(<span class="xref-unresolved">Ppxlib__.Import.longident_loc</span> * <span class="xref-unresolved">Ppxlib__.Import.expression</span>)</span> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>loc:<span class="xref-unresolved">Ppxlib__.Location.t</span> <span class="arrow">&#45;&gt;</span></span>
<span><span><span>(<span><span class="xref-unresolved">Ppxlib__.Import.longident</span> <span class="xref-unresolved">Ppxlib__.Import.loc</span></span> * <span class="xref-unresolved">Ppxlib__.Import.expression</span>)</span>
list</span> <span class="arrow">&#45;&gt;</span></span>
<span class="xref-unresolved">Ppxlib__.Import.expression</span></span></code></div></div><div class="odoc-spec"><div class="spec method anchored" id="method-construct"><a href="#method-construct" class="anchor"></a><code><span><span class="keyword">method</span> construct : <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span>
<span>loc:<span class="xref-unresolved">Ppxlib__.Import.location</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="xref-unresolved">Ppxlib__.Import.longident_loc</span> <span class="arrow">&#45;&gt;</span></span>
<span>loc:<span class="xref-unresolved">Ppxlib__.Location.t</span> <span class="arrow">&#45;&gt;</span></span>
<span><span><span class="xref-unresolved">Ppxlib__.Import.longident</span> <span class="xref-unresolved">Ppxlib__.Import.loc</span></span> <span class="arrow">&#45;&gt;</span></span>
<span><span><span class="xref-unresolved">Ppxlib__.Import.expression</span> list</span> <span class="arrow">&#45;&gt;</span></span>
<span class="xref-unresolved">Ppxlib__.Import.expression</span></span></code></div></div><div class="odoc-spec"><div class="spec method anchored" id="method-tuple"><a href="#method-tuple" class="anchor"></a><code><span><span class="keyword">method</span> tuple : <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span>
<span>loc:<span class="xref-unresolved">Ppxlib__.Import.location</span> <span class="arrow">&#45;&gt;</span></span>
<span>loc:<span class="xref-unresolved">Ppxlib__.Location.t</span> <span class="arrow">&#45;&gt;</span></span>
<span><span><span class="xref-unresolved">Ppxlib__.Import.expression</span> list</span> <span class="arrow">&#45;&gt;</span></span>
<span class="xref-unresolved">Ppxlib__.Import.expression</span></span></code></div></div></div></body></html>

View file

@ -10,7 +10,7 @@
<span><span><span>string <a href="../Ppxlib/index.html#type-loc">Ppxlib.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> list</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-fst_expr"><a href="#val-fst_expr" class="anchor"></a><code><span><span class="keyword">val</span> fst_expr : <span>loc:<a href="../Ppxlib/index.html#type-location">Ppxlib.location</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Ppxlib/index.html#type-expression">Ppxlib.expression</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Ppxlib/index.html#type-expression">Ppxlib.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-snd_expr"><a href="#val-snd_expr" class="anchor"></a><code><span><span class="keyword">val</span> snd_expr : <span>loc:<a href="../Ppxlib/index.html#type-location">Ppxlib.location</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Ppxlib/index.html#type-expression">Ppxlib.expression</a> <span class="arrow">&#45;&gt;</span></span> <a href="../Ppxlib/index.html#type-expression">Ppxlib.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-methods_of_class_exn"><a href="#val-methods_of_class_exn" class="anchor"></a><code><span><span class="keyword">val</span> methods_of_class_exn : <span><a href="../Ppxlib/index.html#type-structure_item">Ppxlib.structure_item</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="../Ppxlib/index.html#type-class_field">Ppxlib.class_field</a> list</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Backends"><a href="#module-Backends" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Backends/index.html">Backends</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-what"><a href="#type-what" class="anchor"></a><code><span><span class="keyword">type</span> what</span><span> = <a href="Backends/class-type-what/index.html">Backends.what</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-mapper_type"><a href="#val-mapper_type" class="anchor"></a><code><span><span class="keyword">val</span> mapper_type :
<span>what:<a href="#type-what">what</a> <span class="arrow">&#45;&gt;</span></span>
<span>loc:<a href="../Astlib/Location/index.html#type-t">Astlib.Location.t</a> <span class="arrow">&#45;&gt;</span></span>
<span>loc:<a href="../Ppxlib/Location/index.html#type-t">Ppxlib.Location.t</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><span><a href="../Ppxlib/index.html#type-core_type">Ppxlib.core_type</a> <a href="../Stdppx/List/index.html#type-t">Stdppx.List.t</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><div class="odoc-spec"><div class="spec value anchored" id="val-constrained_mapper"><a href="#val-constrained_mapper" class="anchor"></a><code><span><span class="keyword">val</span> constrained_mapper :
@ -27,13 +27,13 @@
<span><span><a href="../Ppxlib/index.html#type-core_type">Ppxlib.core_type</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span>(<span>string <a href="../Ppxlib/index.html#type-loc">Ppxlib.loc</a></span> * <a href="../Ppxlib/index.html#type-expression">Ppxlib.expression</a>)</span> list</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-gen_record'"><a href="#val-gen_record'" class="anchor"></a><code><span><span class="keyword">val</span> gen_record' :
<span>what:<a href="#type-what">what</a> <span class="arrow">&#45;&gt;</span></span>
<span>loc:<a href="../Astlib/Location/index.html#type-t">Astlib.Location.t</a> <span class="arrow">&#45;&gt;</span></span>
<span>loc:<a href="../Ppxlib/Location/index.html#type-t">Ppxlib.Location.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../Ppxlib/index.html#type-label_declaration">Ppxlib.label_declaration</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>
* <a href="../Astlib/Ast_500/Parsetree/index.html#type-expression">Astlib.Ast_500.Parsetree.expression</a>
* <span><span>(<span>string <a href="../Ppxlib/index.html#type-loc">Ppxlib.loc</a></span> * <a href="../Ppxlib/index.html#type-expression">Ppxlib.expression</a>)</span> list</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-gen_record"><a href="#val-gen_record" class="anchor"></a><code><span><span class="keyword">val</span> gen_record :
<span>what:<a href="#type-what">what</a> <span class="arrow">&#45;&gt;</span></span>
<span>loc:<a href="../Astlib/Location/index.html#type-t">Astlib.Location.t</a> <span class="arrow">&#45;&gt;</span></span>
<span>loc:<a href="../Ppxlib/Location/index.html#type-t">Ppxlib.Location.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><span><a href="../Ppxlib/index.html#type-label_declaration">Ppxlib.label_declaration</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<a href="../Ppxlib/index.html#type-expression">Ppxlib.expression</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-is_constant_constructor"><a href="#val-is_constant_constructor" class="anchor"></a><code><span><span class="keyword">val</span> is_constant_constructor : <span><a href="../Ppxlib/index.html#type-constructor_declaration">Ppxlib.constructor_declaration</a> <span class="arrow">&#45;&gt;</span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-erase_type_variables"><a href="#val-erase_type_variables" class="anchor"></a><code><span><span class="keyword">val</span> erase_type_variables : <a href="../Ppxlib/Ast_traverse/class-map/index.html">Ppxlib.Ast_traverse.map</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-gen_variant"><a href="#val-gen_variant" class="anchor"></a><code><span><span class="keyword">val</span> gen_variant :
<span>what:<a href="#type-what">what</a> <span class="arrow">&#45;&gt;</span></span>

View file

@ -1,3 +1,42 @@
0.34.0 (2025-01-06)
-------------------
### 5.3 support
5.3 support is being added gradually over the course of its development.
This section should be updated with each relevant PR.
Note to maintainers: until 5.3 support is officially released, this section
should be excluded from the release, see [RELEASING.md](RELEASING.md) for
details.
- Add initial OCaml 5.3 support (#487, @NathanReb, @hhugo, @nojb)
- Initialise OCaml 5.3's lexer with the `keywords` setting from `OCAMLPARAM` or
the new `-keywords` driver's CLI option to allow the standalone ppx driver to
process old packages using `effect` as an identifier
(#535, @dra27, @NathanReb)
### Other changes
- Add `Pprintast.binding`, `longident` and `payload` (#542, @mattiasdrp)
- Fix `deriving_inline` round-trip check so that it works with 5.01 <-> 5.02
migrations (#519, @NathanReb)
- Add ppxlib's AST pretty-printing utilities in `Ppxlib.Pp_ast` and
a `ppxlib-pp-ast` executable in a new separate `ppxlib-tools` package
(#517, #525, #537, @NathanReb)
- Change `-dparsetree` from a sexp output to a pretty printed AST, closer
to what the compiler's `-dparsetree` is.
(#530, @NathanReb)
- Add Parsetree documentation comments to `Ast_builder` functions (#518, @patricoferris)
- Support class type declarations in derivers with the new, optional arguments
`{str,sig}_class_type_decl` in `Deriving.add` (#538, @patricoferris)
0.33.0 (2024-07-22)
-------------------

View file

@ -448,8 +448,6 @@ Global transformations are the most general kind of transformation. As such, the
factorised, resulting in slower compilation time.
- If you don't make sure that you really follow all {{!"good-practices"}good practices}, you might end up messing up the global developer experience.
- If you don't make sure that you really follow all {{!"good-practices"}good practices}, you might end up messing up the global developer experience.
For all these reasons, a global transformation should be avoided whenever a
context-free transformation could do the job, which by experience seems to be most of the time.
The API for defining a global transformation is easy. A global transformation consists simply of the function and can be directly be registered with {{!Ppxlib.Driver.register_transformation}[Driver.register_transformation]}.

View file

@ -57,7 +57,7 @@ val rule : Context_free.Rule.t = &lt;abstr&gt;
# Driver.register_transformation ~rules:[ rule ] &quot;special_function_demo&quot; ;;
- : unit = ()</code></pre><p>With such a rewriter registered:</p><pre class="language-ocaml"><code># Printf.printf &quot;n_args is applied with %d arguments\n&quot; (n_args ignored &quot;arguments&quot;);;
n_args is applied with 2 arguments
- : unit = ()</code></pre><h2 id="global_transformation"><a href="#global_transformation" class="anchor"></a>Global transformation</h2><p>Global transformations are the most general kind of transformation. As such, they allow doing virtually any modifications, but this comes with several drawbacks. There are very few PPXs that really need this powerful but dangerous feature. In fact, even if, at first sight, it seems like your transformation isn't context-free, it's likely that you can find a more suitable abstraction with which it becomes context-free. Whenever that's the case, go for context-free! The mentioned drawbacks are:</p><ul><li>It is harder for the user to know exactly what parts of the AST will be changed. Your transformation becomes a scary black box.</li><li>It is harder for <code>ppxlib</code> to combine several global transformations, as there is no guarantee that the effect of one will work well with the effect of another.</li><li>The job done by two global transformations (e.g., an AST traverse) cannot be factorised, resulting in slower compilation time.</li><li>If you don't make sure that you really follow all <a href="good-practices.html">good practices</a>, you might end up messing up the global developer experience.</li></ul><ul><li>If you don't make sure that you really follow all <a href="good-practices.html">good practices</a>, you might end up messing up the global developer experience.</li></ul><p>For all these reasons, a global transformation should be avoided whenever a context-free transformation could do the job, which by experience seems to be most of the time. The API for defining a global transformation is easy. A global transformation consists simply of the function and can be directly be registered with <a href="Ppxlib/Driver/index.html#val-register_transformation"><code>Driver.register_transformation</code></a>.</p><pre class="language-ocaml"><code># let f str = List.filter (fun _ -&gt; Random.bool ()) str;; (* Randomly omit structure items *)
- : unit = ()</code></pre><h2 id="global_transformation"><a href="#global_transformation" class="anchor"></a>Global transformation</h2><p>Global transformations are the most general kind of transformation. As such, they allow doing virtually any modifications, but this comes with several drawbacks. There are very few PPXs that really need this powerful but dangerous feature. In fact, even if, at first sight, it seems like your transformation isn't context-free, it's likely that you can find a more suitable abstraction with which it becomes context-free. Whenever that's the case, go for context-free! The mentioned drawbacks are:</p><ul><li>It is harder for the user to know exactly what parts of the AST will be changed. Your transformation becomes a scary black box.</li><li>It is harder for <code>ppxlib</code> to combine several global transformations, as there is no guarantee that the effect of one will work well with the effect of another.</li><li>The job done by two global transformations (e.g., an AST traverse) cannot be factorised, resulting in slower compilation time.</li><li>If you don't make sure that you really follow all <a href="good-practices.html">good practices</a>, you might end up messing up the global developer experience.</li></ul><p>For all these reasons, a global transformation should be avoided whenever a context-free transformation could do the job, which by experience seems to be most of the time. The API for defining a global transformation is easy. A global transformation consists simply of the function and can be directly be registered with <a href="Ppxlib/Driver/index.html#val-register_transformation"><code>Driver.register_transformation</code></a>.</p><pre class="language-ocaml"><code># let f str = List.filter (fun _ -&gt; Random.bool ()) str;; (* Randomly omit structure items *)
val f : 'a list -&gt; 'a list = &lt;fun&gt;
# Driver.register_transformation ~impl:f &quot;absent_minded_transformation&quot;
- : unit = ()</code></pre><h2 id="inlining-transformations"><a href="#inlining-transformations" class="anchor"></a>Inlining Transformations</h2><p>When using a PPX, the transformation happens at compile time, and the produced code could be directly inlined into the original code. This allows dropping the dependency on <code>ppxlib</code> and the PPX used to generate the code.</p><p>This mechanism is implemented for derivers implemented in <code>ppxlib</code> and is convenient to use, especially in conjunction with Dune. When applying a deriver, using <code>[@@deriving_inline deriver_name]</code> will apply the inline mode of <code>deriver_name</code> instead of the normal mode.</p><p>Inline derivers will generate a <code>.corrected</code> version of the file that Dune can use to promote your file. For more information on how to use this feature to remove a dependency on <code>ppxlib</code> and a specific PPX from your project, refer to <a href="https://ocaml.org/docs/metaprogramming#dropping-ppxs-dependency-with-derivinginline">this guide</a>.</p><h2 id="integration-with-dune"><a href="#integration-with-dune" class="anchor"></a>Integration with Dune</h2><p>If your PPX is written as a Dune project, you'll need to specify the <code>kind</code> field in your <code>dune</code> file with one of the following two values:</p><ul><li><code>ppx_rewriter</code>, or</li><li><code>ppx_deriver</code>.</li></ul><p>If your transformation is anything but a deriver (e.g. an extension node rewriter), use <code>ppx_rewriter</code>. If your transformation is a deriver, then the TLDR workflow is: use <code>ppx_deriver</code> and furthermore add <code>ppx_deriving</code> to your dependencies, i.e. to the <code>libraries</code> field of your dune file. In fact, the situation is quite a bit more complex, though: apart from applying the registered transformations, the Ppxlib driver also does several checks. One of those consists in checking the following: whenever the source code contains <code>[@@deriving foo (...)]</code>, then the Ppxlib driver expects a driver named <code>foo</code> to be registered. That's helpful to catch typos and missing dependencies on derivers and is certainly more hygienic than silently ignoring the annotation. However, for that check to work, the registered derivers must be grouped together into one process, i.e. a driver. UTop cannot use a static driver such as the Ppxlib one because dependencies are added dynamically to a UTop session. So the solution is the following: if you use <code>ppx_deriver</code> in your <code>kind</code> field, dune will add the right data to your PPXs META file to ensure that UTop will use the <code>ppx_deriving</code> driver, which links the derivers dynamically. As a result, <code>ppx_derivng</code> appears as a dependency in the META file. Therefore, whenever a user uses <code>ocamlfind</code> (e.g. by using UTop), they will hit an &quot;<code>ppx_derivng</code> not found&quot; error, unless you define <code>ppx_deriving</code> in your dependencies. So, long story short: if you strongly care about avoiding <code>ppx_deriving</code> as a dependency, use <code>ppx_rewriter</code> in your <code>kind</code> field and be aware of the fact that users won't be able to try your deriver in UTop; otherwise do the TLDR workflow.</p><p>Here is a minimal Dune stanza for a rewriter:</p><pre class="language-dune"><code>(library

View file

@ -1,3 +1,7 @@
# 0.9
- add an extensible sum type, so users can implement custom events. For example
an OTEL collector can provide custom events to link two spans to one another.
# 0.8

View file

@ -1,3 +1,7 @@
# 0.9
- add an extensible sum type, so users can implement custom events. For example
an OTEL collector can provide custom events to link two spans to one another.
# 0.8

View file

@ -54,4 +54,4 @@
<span>?data:<span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <span><span>(string * <a href="#type-user_data">user_data</a>)</span> list</span>)</span> <span class="arrow">&#45;&gt;</span></span>
<span>string <span class="arrow">&#45;&gt;</span></span>
<span>float <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div><div class="spec-doc"><p>Emit a counter of type <code>float</code>. See <a href="#val-counter_int"><code>counter_int</code></a> for more details.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">level</span> <p>optional level for this span. since 0.7. Default is set via <a href="#val-set_default_level"><code>set_default_level</code></a>.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">data</span> <p>metadata for this metric (since 0.4)</p></li></ul></div></div><h3 id="collector"><a href="#collector" class="anchor"></a>Collector</h3><div class="odoc-spec"><div class="spec type anchored" id="type-collector"><a href="#type-collector" class="anchor"></a><code><span><span class="keyword">type</span> collector</span><span> = <span>(<span class="keyword">module</span> <a href="../Trace_core/Collector/module-type-S/index.html">Collector.S</a>)</span></span></code></div><div class="spec-doc"><p>An event collector.</p><p>See <a href="../Trace_core/Collector/index.html"><code>Collector</code></a> for more details.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-setup_collector"><a href="#val-setup_collector" class="anchor"></a><code><span><span class="keyword">val</span> setup_collector : <span><a href="#type-collector">collector</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>setup_collector c</code> installs <code>c</code> as the current collector.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <span class="value">Invalid_argument</span> <p>if there already is an established collector.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get_current_level"><a href="#val-get_current_level" class="anchor"></a><code><span><span class="keyword">val</span> get_current_level : <span>unit <span class="arrow">&#45;&gt;</span></span> <a href="../Trace_core/Level/index.html#type-t">Level.t</a></span></code></div><div class="spec-doc"><p>Get current level. This is only meaningful if a collector was set up with <a href="#val-setup_collector"><code>setup_collector</code></a>.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.7</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-set_current_level"><a href="#val-set_current_level" class="anchor"></a><code><span><span class="keyword">val</span> set_current_level : <span><a href="../Trace_core/Level/index.html#type-t">Level.t</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Set the current level of tracing. This only has a visible effect if a collector was installed with <a href="#val-setup_collector"><code>setup_collector</code></a>.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.7</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-shutdown"><a href="#val-shutdown" class="anchor"></a><code><span><span class="keyword">val</span> shutdown : <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>shutdown ()</code> shutdowns the current collector, if one was installed, and waits for it to terminate before returning.</p></div></div><h3 id="extensions"><a href="#extensions" class="anchor"></a>Extensions</h3><div class="odoc-spec"><div class="spec type anchored" id="type-extension_event"><a href="#type-extension_event" class="anchor"></a><code><span><span class="keyword">type</span> extension_event</span><span> = </span><span>..</span></code></div><div class="spec-doc"><p>Extension event</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> NEXT_RELEASE</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-extension_event"><a href="#val-extension_event" class="anchor"></a><code><span><span class="keyword">val</span> extension_event : <span><a href="#type-extension_event">extension_event</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Trigger an extension event, whose meaning depends on the library that defines it. Some collectors will simply ignore it. This does nothing if no collector is setup.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> NEXT_RELEASE</li></ul></div></div></details></div></div></body></html>
unit</span></code></div><div class="spec-doc"><p>Emit a counter of type <code>float</code>. See <a href="#val-counter_int"><code>counter_int</code></a> for more details.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">level</span> <p>optional level for this span. since 0.7. Default is set via <a href="#val-set_default_level"><code>set_default_level</code></a>.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">data</span> <p>metadata for this metric (since 0.4)</p></li></ul></div></div><h3 id="collector"><a href="#collector" class="anchor"></a>Collector</h3><div class="odoc-spec"><div class="spec type anchored" id="type-collector"><a href="#type-collector" class="anchor"></a><code><span><span class="keyword">type</span> collector</span><span> = <span>(<span class="keyword">module</span> <a href="../Trace_core/Collector/module-type-S/index.html">Collector.S</a>)</span></span></code></div><div class="spec-doc"><p>An event collector.</p><p>See <a href="../Trace_core/Collector/index.html"><code>Collector</code></a> for more details.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-setup_collector"><a href="#val-setup_collector" class="anchor"></a><code><span><span class="keyword">val</span> setup_collector : <span><a href="#type-collector">collector</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>setup_collector c</code> installs <code>c</code> as the current collector.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <span class="value">Invalid_argument</span> <p>if there already is an established collector.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get_current_level"><a href="#val-get_current_level" class="anchor"></a><code><span><span class="keyword">val</span> get_current_level : <span>unit <span class="arrow">&#45;&gt;</span></span> <a href="../Trace_core/Level/index.html#type-t">Level.t</a></span></code></div><div class="spec-doc"><p>Get current level. This is only meaningful if a collector was set up with <a href="#val-setup_collector"><code>setup_collector</code></a>.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.7</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-set_current_level"><a href="#val-set_current_level" class="anchor"></a><code><span><span class="keyword">val</span> set_current_level : <span><a href="../Trace_core/Level/index.html#type-t">Level.t</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Set the current level of tracing. This only has a visible effect if a collector was installed with <a href="#val-setup_collector"><code>setup_collector</code></a>.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.7</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-shutdown"><a href="#val-shutdown" class="anchor"></a><code><span><span class="keyword">val</span> shutdown : <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>shutdown ()</code> shutdowns the current collector, if one was installed, and waits for it to terminate before returning.</p></div></div><h3 id="extensions"><a href="#extensions" class="anchor"></a>Extensions</h3><div class="odoc-spec"><div class="spec type anchored" id="type-extension_event"><a href="#type-extension_event" class="anchor"></a><code><span><span class="keyword">type</span> extension_event</span><span> = </span><span>..</span></code></div><div class="spec-doc"><p>Extension event</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.8</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-extension_event"><a href="#val-extension_event" class="anchor"></a><code><span><span class="keyword">val</span> extension_event : <span><a href="#type-extension_event">extension_event</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Trigger an extension event, whose meaning depends on the library that defines it. Some collectors will simply ignore it. This does nothing if no collector is setup.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.8</li></ul></div></div></details></div></div></body></html>

View file

@ -92,4 +92,4 @@
list</span> <span class="arrow">&#45;&gt;</span></span>
<span>string <span class="arrow">&#45;&gt;</span></span>
<span>float <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div><div class="spec-doc"><p>Float counter.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-extension_event"><a href="#val-extension_event" class="anchor"></a><code><span><span class="keyword">val</span> extension_event : <span><span class="xref-unresolved">Trace_core__.Types.extension_event</span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Handle an extension event. A collector <b>MUST</b> simple ignore events it doesn't know, and return <code>()</code> silently.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> NEXT_RELEASE</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-shutdown"><a href="#val-shutdown" class="anchor"></a><code><span><span class="keyword">val</span> shutdown : <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Shutdown collector, possibly waiting for it to finish sending data.</p></div></div></div></body></html>
unit</span></code></div><div class="spec-doc"><p>Float counter.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-extension_event"><a href="#val-extension_event" class="anchor"></a><code><span><span class="keyword">val</span> extension_event : <span><span class="xref-unresolved">Trace_core__.Types.extension_event</span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Handle an extension event. A collector <b>MUST</b> simple ignore events it doesn't know, and return <code>()</code> silently.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.8</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-shutdown"><a href="#val-shutdown" class="anchor"></a><code><span><span class="keyword">val</span> shutdown : <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Shutdown collector, possibly waiting for it to finish sending data.</p></div></div></div></body></html>

View file

@ -54,4 +54,4 @@
<span>?data:<span>(<span>unit <span class="arrow">&#45;&gt;</span></span> <span><span>(string * <a href="#type-user_data">user_data</a>)</span> list</span>)</span> <span class="arrow">&#45;&gt;</span></span>
<span>string <span class="arrow">&#45;&gt;</span></span>
<span>float <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div><div class="spec-doc"><p>Emit a counter of type <code>float</code>. See <a href="#val-counter_int"><code>counter_int</code></a> for more details.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">level</span> <p>optional level for this span. since 0.7. Default is set via <a href="#val-set_default_level"><code>set_default_level</code></a>.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">data</span> <p>metadata for this metric (since 0.4)</p></li></ul></div></div><h3 id="collector"><a href="#collector" class="anchor"></a>Collector</h3><div class="odoc-spec"><div class="spec type anchored" id="type-collector"><a href="#type-collector" class="anchor"></a><code><span><span class="keyword">type</span> collector</span><span> = <span>(<span class="keyword">module</span> <a href="Collector/module-type-S/index.html">Collector.S</a>)</span></span></code></div><div class="spec-doc"><p>An event collector.</p><p>See <a href="Collector/index.html"><code>Collector</code></a> for more details.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-setup_collector"><a href="#val-setup_collector" class="anchor"></a><code><span><span class="keyword">val</span> setup_collector : <span><a href="#type-collector">collector</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>setup_collector c</code> installs <code>c</code> as the current collector.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <span class="value">Invalid_argument</span> <p>if there already is an established collector.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get_current_level"><a href="#val-get_current_level" class="anchor"></a><code><span><span class="keyword">val</span> get_current_level : <span>unit <span class="arrow">&#45;&gt;</span></span> <a href="Level/index.html#type-t">Level.t</a></span></code></div><div class="spec-doc"><p>Get current level. This is only meaningful if a collector was set up with <a href="#val-setup_collector"><code>setup_collector</code></a>.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.7</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-set_current_level"><a href="#val-set_current_level" class="anchor"></a><code><span><span class="keyword">val</span> set_current_level : <span><a href="Level/index.html#type-t">Level.t</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Set the current level of tracing. This only has a visible effect if a collector was installed with <a href="#val-setup_collector"><code>setup_collector</code></a>.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.7</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-shutdown"><a href="#val-shutdown" class="anchor"></a><code><span><span class="keyword">val</span> shutdown : <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>shutdown ()</code> shutdowns the current collector, if one was installed, and waits for it to terminate before returning.</p></div></div><h3 id="extensions"><a href="#extensions" class="anchor"></a>Extensions</h3><div class="odoc-spec"><div class="spec type anchored" id="type-extension_event"><a href="#type-extension_event" class="anchor"></a><code><span><span class="keyword">type</span> extension_event</span><span> = </span><span>..</span></code></div><div class="spec-doc"><p>Extension event</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> NEXT_RELEASE</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-extension_event"><a href="#val-extension_event" class="anchor"></a><code><span><span class="keyword">val</span> extension_event : <span><a href="#type-extension_event">extension_event</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Trigger an extension event, whose meaning depends on the library that defines it. Some collectors will simply ignore it. This does nothing if no collector is setup.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> NEXT_RELEASE</li></ul></div></div></div></body></html>
unit</span></code></div><div class="spec-doc"><p>Emit a counter of type <code>float</code>. See <a href="#val-counter_int"><code>counter_int</code></a> for more details.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">level</span> <p>optional level for this span. since 0.7. Default is set via <a href="#val-set_default_level"><code>set_default_level</code></a>.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">data</span> <p>metadata for this metric (since 0.4)</p></li></ul></div></div><h3 id="collector"><a href="#collector" class="anchor"></a>Collector</h3><div class="odoc-spec"><div class="spec type anchored" id="type-collector"><a href="#type-collector" class="anchor"></a><code><span><span class="keyword">type</span> collector</span><span> = <span>(<span class="keyword">module</span> <a href="Collector/module-type-S/index.html">Collector.S</a>)</span></span></code></div><div class="spec-doc"><p>An event collector.</p><p>See <a href="Collector/index.html"><code>Collector</code></a> for more details.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-setup_collector"><a href="#val-setup_collector" class="anchor"></a><code><span><span class="keyword">val</span> setup_collector : <span><a href="#type-collector">collector</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>setup_collector c</code> installs <code>c</code> as the current collector.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <span class="value">Invalid_argument</span> <p>if there already is an established collector.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get_current_level"><a href="#val-get_current_level" class="anchor"></a><code><span><span class="keyword">val</span> get_current_level : <span>unit <span class="arrow">&#45;&gt;</span></span> <a href="Level/index.html#type-t">Level.t</a></span></code></div><div class="spec-doc"><p>Get current level. This is only meaningful if a collector was set up with <a href="#val-setup_collector"><code>setup_collector</code></a>.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.7</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-set_current_level"><a href="#val-set_current_level" class="anchor"></a><code><span><span class="keyword">val</span> set_current_level : <span><a href="Level/index.html#type-t">Level.t</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Set the current level of tracing. This only has a visible effect if a collector was installed with <a href="#val-setup_collector"><code>setup_collector</code></a>.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.7</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-shutdown"><a href="#val-shutdown" class="anchor"></a><code><span><span class="keyword">val</span> shutdown : <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>shutdown ()</code> shutdowns the current collector, if one was installed, and waits for it to terminate before returning.</p></div></div><h3 id="extensions"><a href="#extensions" class="anchor"></a>Extensions</h3><div class="odoc-spec"><div class="spec type anchored" id="type-extension_event"><a href="#type-extension_event" class="anchor"></a><code><span><span class="keyword">type</span> extension_event</span><span> = </span><span>..</span></code></div><div class="spec-doc"><p>Extension event</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.8</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-extension_event"><a href="#val-extension_event" class="anchor"></a><code><span><span class="keyword">val</span> extension_event : <span><a href="#type-extension_event">extension_event</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Trigger an extension event, whose meaning depends on the library that defines it. Some collectors will simply ignore it. This does nothing if no collector is setup.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.8</li></ul></div></div></div></body></html>

View file

@ -54,4 +54,4 @@
<span>time_ns:float <span class="arrow">&#45;&gt;</span></span>
<span>tid:int <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../../Trace_core/index.html#type-extension_event">Trace_core.extension_event</a> <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div><div class="spec-doc"><p>Extension event</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> NEXT_RELEASE</li></ul></div></div></div></body></html>
unit</span></code></div><div class="spec-doc"><p>Extension event</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.8</li></ul></div></div></div></body></html>

View file

@ -1,3 +1,7 @@
# 0.9
- add an extensible sum type, so users can implement custom events. For example
an OTEL collector can provide custom events to link two spans to one another.
# 0.8