Skip to content

Commit

Permalink
Update ppx_deriving doc to 6.0.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanReb committed Apr 15, 2024
1 parent 8a2ee07 commit d7985d4
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 17 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="by-name">
<h2>OCaml package documentation</h2>
<ol>
<li><a href="ppx_deriving/index.html">ppx_deriving</a> <span class="version">5.3.0</span></li>
<li><a href="ppx_deriving/index.html">ppx_deriving</a> <span class="version">6.0.0</span></li>
</ol>
</div>
</main>
Expand Down
2 changes: 1 addition & 1 deletion ppx_deriving/Ppx_deriving/Arg/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Arg (ppx_deriving.Ppx_deriving.Arg)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/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">ppx_deriving</a> &#x00BB; <a href="../index.html">Ppx_deriving</a> &#x00BB; Arg</nav><header class="odoc-preamble"><h1>Module <code><span>Ppx_deriving.Arg</span></code></h1><p><a href="#"><code>Arg</code></a> contains convenience functions that extract constants from AST fragments, to be used when parsing options or <code>[\@attributes]</code> attached to types, fields or constructors.</p><p>The <code>~name</code> argument is used in error messages and should receive the name of the deriving plugin, e.g. <code>&quot;show&quot;</code>.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-conv"><a href="#type-conv" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a conv</span></span><span> = <span><span class="xref-unresolved">Ppxlib</span>.expression <span class="arrow">&#45;&gt;</span></span> <span><span>(<span class="type-var">'a</span>, string)</span> <span class="xref-unresolved">Result</span>.result</span></span></code></div><div class="spec-doc"><p>A type of conversion functions.</p><p>A conversion function of type <code>'a conv</code> converts a raw expression into an argument of type <code>'a</code>. Or returns <code>Result.Error &quot;error&quot;</code> if conversion fails.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-expr"><a href="#val-expr" class="anchor"></a><code><span><span class="keyword">val</span> expr : <span><span class="xref-unresolved">Ppxlib</span>.expression <a href="#type-conv">conv</a></span></span></code></div><div class="spec-doc"><p><code>expr</code> returns the input expression as-is.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-bool"><a href="#val-bool" class="anchor"></a><code><span><span class="keyword">val</span> bool : <span>bool <a href="#type-conv">conv</a></span></span></code></div><div class="spec-doc"><p><code>bool expr</code> extracts a boolean constant from <code>expr</code>, or returns <code>Result.Error &quot;boolean&quot;</code> if <code>expr</code> does not contain a boolean literal.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-int"><a href="#val-int" class="anchor"></a><code><span><span class="keyword">val</span> int : <span>int <a href="#type-conv">conv</a></span></span></code></div><div class="spec-doc"><p><code>int expr</code> extracts an integer constant from <code>expr</code>, or returns <code>Result.Error &quot;integer&quot;</code> if <code>expr</code> does not contain an integer literal.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-string"><a href="#val-string" class="anchor"></a><code><span><span class="keyword">val</span> string : <span>string <a href="#type-conv">conv</a></span></span></code></div><div class="spec-doc"><p><code>string expr</code> extracts a string constant from <code>expr</code>, or returns <code>Result.Error &quot;string&quot;</code> if <code>expr</code> does not contain a string literal.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-char"><a href="#val-char" class="anchor"></a><code><span><span class="keyword">val</span> char : <span>char <a href="#type-conv">conv</a></span></span></code></div><div class="spec-doc"><p><code>char expr</code> extracts a char constant from <code>expr</code>, or returns <code>Result.Error &quot;char&quot;</code> if <code>expr</code> does not contain a char literal.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-enum"><a href="#val-enum" class="anchor"></a><code><span><span class="keyword">val</span> enum : <span><span>string list</span> <span class="arrow">&#45;&gt;</span></span> <span>string <a href="#type-conv">conv</a></span></span></code></div><div class="spec-doc"><p><code>enum values expr</code> extracts a polymorphic variant constant from <code>expr</code>, or returns <code>Result.Error &quot;one of: `a, `b, ...&quot;</code> if <code>expr</code> does not contain a polymorphic variant constructor included in <code>values</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-list"><a href="#val-list" class="anchor"></a><code><span><span class="keyword">val</span> list : <span><span><span class="type-var">'a</span> <a href="#type-conv">conv</a></span> <span class="arrow">&#45;&gt;</span></span> <span><span><span class="type-var">'a</span> list</span> <a href="#type-conv">conv</a></span></span></code></div><div class="spec-doc"><p><code>list f expr</code> extracts a list constant from <code>expr</code> and maps every element through <code>f</code>, or returns <code>Result.Error &quot;list:...&quot;</code> where <code>...</code> is the error returned by <code>f</code>, or returns <code>Result.Error &quot;list&quot;</code> if <code>expr</code> does not contain a list.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get_attr"><a href="#val-get_attr" class="anchor"></a><code><span><span class="keyword">val</span> get_attr :
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Arg (ppx_deriving.Ppx_deriving.Arg)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/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">ppx_deriving</a> &#x00BB; <a href="../index.html">Ppx_deriving</a> &#x00BB; Arg</nav><header class="odoc-preamble"><h1>Module <code><span>Ppx_deriving.Arg</span></code></h1><p><a href="#"><code>Arg</code></a> contains convenience functions that extract constants from AST fragments, to be used when parsing options or <code>[\@attributes]</code> attached to types, fields or constructors.</p><p>The <code>~name</code> argument is used in error messages and should receive the name of the deriving plugin, e.g. <code>&quot;show&quot;</code>.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-conv"><a href="#type-conv" class="anchor"></a><code><span><span class="keyword">type</span> <span>'a conv</span></span><span> = <span><span class="xref-unresolved">Ppxlib</span>.expression <span class="arrow">&#45;&gt;</span></span> <span><span>(<span class="type-var">'a</span>, string)</span> <span class="xref-unresolved">Stdlib</span>.result</span></span></code></div><div class="spec-doc"><p>A type of conversion functions.</p><p>A conversion function of type <code>'a conv</code> converts a raw expression into an argument of type <code>'a</code>. Or returns <code>Error &quot;error&quot;</code> if conversion fails.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-expr"><a href="#val-expr" class="anchor"></a><code><span><span class="keyword">val</span> expr : <span><span class="xref-unresolved">Ppxlib</span>.expression <a href="#type-conv">conv</a></span></span></code></div><div class="spec-doc"><p><code>expr</code> returns the input expression as-is.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-bool"><a href="#val-bool" class="anchor"></a><code><span><span class="keyword">val</span> bool : <span>bool <a href="#type-conv">conv</a></span></span></code></div><div class="spec-doc"><p><code>bool expr</code> extracts a boolean constant from <code>expr</code>, or returns <code>Error &quot;boolean&quot;</code> if <code>expr</code> does not contain a boolean literal.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-int"><a href="#val-int" class="anchor"></a><code><span><span class="keyword">val</span> int : <span>int <a href="#type-conv">conv</a></span></span></code></div><div class="spec-doc"><p><code>int expr</code> extracts an integer constant from <code>expr</code>, or returns <code>Error &quot;integer&quot;</code> if <code>expr</code> does not contain an integer literal.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-string"><a href="#val-string" class="anchor"></a><code><span><span class="keyword">val</span> string : <span>string <a href="#type-conv">conv</a></span></span></code></div><div class="spec-doc"><p><code>string expr</code> extracts a string constant from <code>expr</code>, or returns <code>Error &quot;string&quot;</code> if <code>expr</code> does not contain a string literal.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-char"><a href="#val-char" class="anchor"></a><code><span><span class="keyword">val</span> char : <span>char <a href="#type-conv">conv</a></span></span></code></div><div class="spec-doc"><p><code>char expr</code> extracts a char constant from <code>expr</code>, or returns <code>Error &quot;char&quot;</code> if <code>expr</code> does not contain a char literal.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-enum"><a href="#val-enum" class="anchor"></a><code><span><span class="keyword">val</span> enum : <span><span>string list</span> <span class="arrow">&#45;&gt;</span></span> <span>string <a href="#type-conv">conv</a></span></span></code></div><div class="spec-doc"><p><code>enum values expr</code> extracts a polymorphic variant constant from <code>expr</code>, or returns <code>Error &quot;one of: `a, `b, ...&quot;</code> if <code>expr</code> does not contain a polymorphic variant constructor included in <code>values</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-list"><a href="#val-list" class="anchor"></a><code><span><span class="keyword">val</span> list : <span><span><span class="type-var">'a</span> <a href="#type-conv">conv</a></span> <span class="arrow">&#45;&gt;</span></span> <span><span><span class="type-var">'a</span> list</span> <a href="#type-conv">conv</a></span></span></code></div><div class="spec-doc"><p><code>list f expr</code> extracts a list constant from <code>expr</code> and maps every element through <code>f</code>, or returns <code>Error &quot;list:...&quot;</code> where <code>...</code> is the error returned by <code>f</code>, or returns <code>Error &quot;list&quot;</code> if <code>expr</code> does not contain a list.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get_attr"><a href="#val-get_attr" class="anchor"></a><code><span><span class="keyword">val</span> get_attr :
<span><span class="label">deriver</span>:string <span class="arrow">&#45;&gt;</span></span>
<span><span><span class="type-var">'a</span> <a href="#type-conv">conv</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><span><span class="xref-unresolved">Ppxlib</span>.attribute option</span> <span class="arrow">&#45;&gt;</span></span>
Expand Down
2 changes: 1 addition & 1 deletion ppx_deriving/Ppx_deriving_fold/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
<span class="xref-unresolved">Ppxlib__Deriving</span>.Generator.t</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-intf_generator"><a href="#val-intf_generator" class="anchor"></a><code><span><span class="keyword">val</span> intf_generator :
<span><span>(<span><span class="xref-unresolved">Astlib</span>.Ast_500.Parsetree.signature_item list</span>,
<span class="xref-unresolved">Ppxlib__</span>.Import.rec_flag * <span><span class="xref-unresolved">Ppxlib</span>.Parsetree.type_declaration list</span>)</span>
<span class="xref-unresolved">Ppxlib__Deriving</span>.Generator.t</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-deriving"><a href="#val-deriving" class="anchor"></a><code><span><span class="keyword">val</span> deriving : <span class="xref-unresolved">Ppxlib</span>.Deriving.t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-derive_extension"><a href="#val-derive_extension" class="anchor"></a><code><span><span class="keyword">val</span> derive_extension : <span class="xref-unresolved">Ppxlib</span>.Extension.V3.t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-derive_transformation"><a href="#val-derive_transformation" class="anchor"></a><code><span><span class="keyword">val</span> derive_transformation : unit</span></code></div></div></div></body></html>
<span class="xref-unresolved">Ppxlib__Deriving</span>.Generator.t</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-deriving"><a href="#val-deriving" class="anchor"></a><code><span><span class="keyword">val</span> deriving : <span class="xref-unresolved">Ppxlib</span>.Deriving.t</span></code></div></div></div></body></html>
2 changes: 1 addition & 1 deletion ppx_deriving/Ppx_deriving_iter/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
<span class="xref-unresolved">Ppxlib__Deriving</span>.Generator.t</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-intf_generator"><a href="#val-intf_generator" class="anchor"></a><code><span><span class="keyword">val</span> intf_generator :
<span><span>(<span><span class="xref-unresolved">Astlib</span>.Ast_500.Parsetree.signature_item list</span>,
<span class="xref-unresolved">Ppxlib__</span>.Import.rec_flag * <span><span class="xref-unresolved">Ppxlib</span>.type_declaration list</span>)</span>
<span class="xref-unresolved">Ppxlib__Deriving</span>.Generator.t</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-deriving"><a href="#val-deriving" class="anchor"></a><code><span><span class="keyword">val</span> deriving : <span class="xref-unresolved">Ppxlib</span>.Deriving.t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-derive_extension"><a href="#val-derive_extension" class="anchor"></a><code><span><span class="keyword">val</span> derive_extension : <span class="xref-unresolved">Ppxlib</span>.Extension.V3.t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-derive_transformation"><a href="#val-derive_transformation" class="anchor"></a><code><span><span class="keyword">val</span> derive_transformation : unit</span></code></div></div></div></body></html>
<span class="xref-unresolved">Ppxlib__Deriving</span>.Generator.t</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-deriving"><a href="#val-deriving" class="anchor"></a><code><span><span class="keyword">val</span> deriving : <span class="xref-unresolved">Ppxlib</span>.Deriving.t</span></code></div></div></div></body></html>
Loading

0 comments on commit d7985d4

Please sign in to comment.