ocaml-trace/ppxlib/Ppxlib/Extension/Expert/index.html
2025-12-12 13:56:43 +00:00

20 lines
5.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Expert (ppxlib.Ppxlib.Extension.Expert)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../../../../index.html">Index</a> &#x00BB; <a href="../../../index.html">ppxlib</a> &#x00BB; <a href="../../index.html">Ppxlib</a> &#x00BB; <a href="../index.html">Extension</a> &#x00BB; Expert</nav><header class="odoc-preamble"><h1>Module <code><span>Extension.Expert</span></code></h1><p>This module allows to declare extensions that do not produce a value of the context type. This is typically useful for extensions point that depends on more things from the context than the path and location.</p></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> <span>('context, 'payload) t</span></span></code></div><div class="spec-doc"><p>Type of declared expert extensions.</p><p>The <code>'context</code> type parameter describes where the extension is expected and the <code>'payload</code> one what its payload should contain.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-declare"><a href="#val-declare" class="anchor"></a><code><span><span class="keyword">val</span> declare :
<span>string <span class="arrow">&#45;&gt;</span></span>
<span><span><span class="type-var">'context</span> <a href="../Context/index.html#type-t">Context.t</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><span><span>(<a href="../../../Astlib/Ast_502/Parsetree/index.html#type-payload">Astlib.Ast_502.Parsetree.payload</a>, <span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Ast_pattern/index.html#type-t">Ast_pattern.t</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span>
<span><span>(<span class="type-var">'context</span>, <span class="type-var">'b</span>)</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-declare_with_path_arg"><a href="#val-declare_with_path_arg" class="anchor"></a><code><span><span class="keyword">val</span> declare_with_path_arg :
<span>string <span class="arrow">&#45;&gt;</span></span>
<span><span><span class="type-var">'context</span> <a href="../Context/index.html#type-t">Context.t</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><span><span>(<a href="../../../Astlib/Ast_502/Parsetree/index.html#type-payload">Astlib.Ast_502.Parsetree.payload</a>, <span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <a href="../../Ast_pattern/index.html#type-t">Ast_pattern.t</a></span> <span class="arrow">&#45;&gt;</span></span>
<span><span>(<span><span class="label">arg</span>:<span><span><a href="../../Longident/index.html#type-t">Longident.t</a> <a href="../../Loc/index.html#type-t">Loc.t</a></span> option</span> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span>)</span> <span class="arrow">&#45;&gt;</span></span>
<span><span>(<span class="type-var">'context</span>, <span class="type-var">'b</span>)</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-convert_res"><a href="#val-convert_res" class="anchor"></a><code><span><span class="keyword">val</span> convert_res :
<span><span><span><span>(<span class="type-var">_</span>, <span class="type-var">'a</span>)</span> <a href="#type-t">t</a></span> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="label">loc</span>:<a href="../../Location/index.html#type-t">Location.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> * <a href="../../../Astlib/Ast_502/Parsetree/index.html#type-payload">Astlib.Ast_502.Parsetree.payload</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<span><span>(<span><span class="type-var">'a</span> option</span>, <span><a href="../../Location/Error/index.html#type-t">Location.Error.t</a> <a href="../../../Stdppx/NonEmptyList/index.html#type-t">Stdppx.NonEmptyList.t</a></span>)</span> <a href="../../../../ocaml/Stdlib/index.html#type-result">result</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-convert"><a href="#val-convert" class="anchor"></a><code><span><span class="keyword">val</span> convert :
<span><span><span><span>(<span class="type-var">_</span>, <span class="type-var">'a</span>)</span> <a href="#type-t">t</a></span> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="label">loc</span>:<a href="../../Location/index.html#type-t">Location.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><span>(<span>string <a href="../../../Astlib/Location/index.html#type-loc">Astlib.Location.loc</a></span> * <a href="../../../Astlib/Ast_502/Parsetree/index.html#type-payload">Astlib.Ast_502.Parsetree.payload</a>)</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="type-var">'a</span> option</span></span></code></div></div></div></body></html>