Skip to content

Commit

Permalink
deploy: c63c618
Browse files Browse the repository at this point in the history
  • Loading branch information
favonia committed Sep 24, 2023
1 parent b8309cd commit ab8a981
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion asai-examples/Syslib/Logger/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
<span>?fatal:<span>(<span><span><a href="Code/index.html#type-t">Code.t</a> <a href="../../../asai/Asai/Diagnostic/index.html#type-t">Asai.Diagnostic.t</a></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>unit <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span>)</span> <span class="arrow">&#45;&gt;</span></span>
<span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-register_printer"><a href="#val-register_printer" class="anchor"></a><code><span><span class="keyword">val</span> register_printer :
<span><span>(<span><span>[ <span>`Emit of <span><a href="Code/index.html#type-t">Code.t</a> <a href="../../../asai/Asai/Diagnostic/index.html#type-t">Asai.Diagnostic.t</a></span></span> <span><span>| `Fatal</span> of <span><a href="Code/index.html#type-t">Code.t</a> <a href="../../../asai/Asai/Diagnostic/index.html#type-t">Asai.Diagnostic.t</a></span></span> ]</span> <span class="arrow">&#45;&gt;</span></span>
<span><span>(<span><span>[ <span>`Emit of <span><a href="Code/index.html#type-t">Code.t</a> <a href="../../../asai/Asai/Diagnostic/index.html#type-t">Asai.Diagnostic.t</a></span></span>
<span><span>| `Fatal</span> of <span><a href="Code/index.html#type-t">Code.t</a> <a href="../../../asai/Asai/Diagnostic/index.html#type-t">Asai.Diagnostic.t</a></span></span>
<span>| `Trace</span> ]</span> <span class="arrow">&#45;&gt;</span></span>
<span>string option</span>)</span> <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div></div></details></div></div></body></html>
4 changes: 2 additions & 2 deletions asai/Asai/Logger/Make/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@
<span>?fatal:<span>(<span><span><a href="argument-1-Code/index.html#type-t">Code.t</a> <a href="../../Diagnostic/index.html#type-t">Diagnostic.t</a></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>unit <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span>)</span> <span class="arrow">&#45;&gt;</span></span>
<span class="type-var">'a</span></span></code></div><div class="spec-doc"><p><code>try_with ~emit ~fatal f</code> runs the thunk <code>f</code>, using <code>emit</code> to intercept non-fatal diagnostics before continuing the computation (see <a href="#val-emit"><code>emit</code></a> and <a href="#val-emitf"><code>emitf</code></a>), and <code>fatal</code> to intercept fatal diagnostics that have aborted the computation (see <a href="#val-fatal"><code>fatal</code></a> and <a href="#val-fatalf"><code>fatalf</code></a>). The default interceptors re-emit or re-raise the intercepted diagnostics.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">emit</span> <p>The interceptor of non-fatal diagnostics. The default value is <a href="#val-emit_diagnostic"><code>emit_diagnostic</code></a>.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">fatal</span> <p>The interceptor of fatal diagnostics. The default value is <a href="#val-fatal_diagnostic"><code>fatal_diagnostic</code></a>.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-register_printer"><a href="#val-register_printer" class="anchor"></a><code><span><span class="keyword">val</span> register_printer :
<span><span>(<span><span>[ <span>`Emit of <span><a href="argument-1-Code/index.html#type-t">Code.t</a> <a href="../../Diagnostic/index.html#type-t">Diagnostic.t</a></span></span> <span><span>| `Fatal</span> of <span><a href="argument-1-Code/index.html#type-t">Code.t</a> <a href="../../Diagnostic/index.html#type-t">Diagnostic.t</a></span></span> ]</span> <span class="arrow">&#45;&gt;</span></span>
<span><span>(<span><span>[ `Trace <span><span>| `Emit</span> of <span><a href="argument-1-Code/index.html#type-t">Code.t</a> <a href="../../Diagnostic/index.html#type-t">Diagnostic.t</a></span></span> <span><span>| `Fatal</span> of <span><a href="argument-1-Code/index.html#type-t">Code.t</a> <a href="../../Diagnostic/index.html#type-t">Diagnostic.t</a></span></span> ]</span> <span class="arrow">&#45;&gt;</span></span>
<span>string option</span>)</span> <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div><div class="spec-doc"><p><code>register_printer p</code> registers a printer <code>p</code> via <code>Printexc</code>.register_printer to convert unhandled internal effects and exceptions into strings for the OCaml runtime system to display. Ideally, all internal effects and exceptions should have been handled by <a href="#val-run"><code>run</code></a> and there is no need to use this function, but when it is not the case, this function can be helpful for debugging. The functor <a href="#"><code>Logger.Make</code></a> always registers a simple printer to suggest using <a href="#val-run"><code>run</code></a>, but you can register new ones to override it. The return type of the printer <code>p</code> should return <code>Some s</code> where <code>s</code> is the resulting string, or <code>None</code> if it chooses not to convert a particular effect or exception. The registered printers are tried in reverse order until one of them returns <code>Some s</code> for some <code>s</code>; that is, the last registered printer is tried first. Note that this function is a wrapper of <code>Printexc</code>.register_printer and all the registered printers (via this function or <code>Printexc</code>.register_printer) are put into the same list.</p><p>The input type of the printer <code>p</code> is a variant representation of all internal effects and exceptions used in this module:</p><ul><li><code>`Emit diag</code> corresponds to the effect triggered by <a href="#val-emit"><code>emit</code></a>; and</li><li><code>`Fatal diag</code> corresponds to the exception triggered by <a href="#val-fatal"><code>fatal</code></a>.</li></ul><p>Note: <a href="../../Diagnostic/index.html#val-string_of_text"><code>Diagnostic.string_of_text</code></a> can be handy for converting a message into a string.</p></div></div></div></body></html>
unit</span></code></div><div class="spec-doc"><p><code>register_printer p</code> registers a printer <code>p</code> via <code>Printexc</code>.register_printer to convert unhandled internal effects and exceptions into strings for the OCaml runtime system to display. Ideally, all internal effects and exceptions should have been handled by <a href="#val-run"><code>run</code></a> and there is no need to use this function, but when it is not the case, this function can be helpful for debugging. The functor <a href="#"><code>Logger.Make</code></a> always registers a simple printer to suggest using <a href="#val-run"><code>run</code></a>, but you can register new ones to override it. The return type of the printer <code>p</code> should return <code>Some s</code> where <code>s</code> is the resulting string, or <code>None</code> if it chooses not to convert a particular effect or exception. The registered printers are tried in reverse order until one of them returns <code>Some s</code> for some <code>s</code>; that is, the last registered printer is tried first. Note that this function is a wrapper of <code>Printexc</code>.register_printer and all the registered printers (via this function or <code>Printexc</code>.register_printer) are put into the same list.</p><p>The input type of the printer <code>p</code> is a variant representation of all internal effects and exceptions used in this module:</p><ul><li><code>`Trace</code> corresponds to the effect triggered by <a href="#val-trace"><code>trace</code></a>; and</li><li><code>`Emit diag</code> corresponds to the effect triggered by <a href="#val-emit"><code>emit</code></a>; and</li><li><code>`Fatal diag</code> corresponds to the exception triggered by <a href="#val-fatal"><code>fatal</code></a>.</li></ul><p>Note: <a href="../../Diagnostic/index.html#val-string_of_text"><code>Diagnostic.string_of_text</code></a> can be handy for converting a message into a string.</p></div></div></div></body></html>
4 changes: 2 additions & 2 deletions asai/Asai/Logger/module-type-S/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@
<span>?fatal:<span>(<span><span><a href="Code/index.html#type-t">Code.t</a> <a href="../../Diagnostic/index.html#type-t">Diagnostic.t</a></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>unit <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span>)</span> <span class="arrow">&#45;&gt;</span></span>
<span class="type-var">'a</span></span></code></div><div class="spec-doc"><p><code>try_with ~emit ~fatal f</code> runs the thunk <code>f</code>, using <code>emit</code> to intercept non-fatal diagnostics before continuing the computation (see <a href="#val-emit"><code>emit</code></a> and <a href="#val-emitf"><code>emitf</code></a>), and <code>fatal</code> to intercept fatal diagnostics that have aborted the computation (see <a href="#val-fatal"><code>fatal</code></a> and <a href="#val-fatalf"><code>fatalf</code></a>). The default interceptors re-emit or re-raise the intercepted diagnostics.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">emit</span> <p>The interceptor of non-fatal diagnostics. The default value is <a href="#val-emit_diagnostic"><code>emit_diagnostic</code></a>.</p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">fatal</span> <p>The interceptor of fatal diagnostics. The default value is <a href="#val-fatal_diagnostic"><code>fatal_diagnostic</code></a>.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-register_printer"><a href="#val-register_printer" class="anchor"></a><code><span><span class="keyword">val</span> register_printer :
<span><span>(<span><span>[ <span>`Emit of <span><a href="Code/index.html#type-t">Code.t</a> <a href="../../Diagnostic/index.html#type-t">Diagnostic.t</a></span></span> <span><span>| `Fatal</span> of <span><a href="Code/index.html#type-t">Code.t</a> <a href="../../Diagnostic/index.html#type-t">Diagnostic.t</a></span></span> ]</span> <span class="arrow">&#45;&gt;</span></span>
<span><span>(<span><span>[ `Trace <span><span>| `Emit</span> of <span><a href="Code/index.html#type-t">Code.t</a> <a href="../../Diagnostic/index.html#type-t">Diagnostic.t</a></span></span> <span><span>| `Fatal</span> of <span><a href="Code/index.html#type-t">Code.t</a> <a href="../../Diagnostic/index.html#type-t">Diagnostic.t</a></span></span> ]</span> <span class="arrow">&#45;&gt;</span></span>
<span>string option</span>)</span> <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div><div class="spec-doc"><p><code>register_printer p</code> registers a printer <code>p</code> via <code>Printexc</code>.register_printer to convert unhandled internal effects and exceptions into strings for the OCaml runtime system to display. Ideally, all internal effects and exceptions should have been handled by <a href="#val-run"><code>run</code></a> and there is no need to use this function, but when it is not the case, this function can be helpful for debugging. The functor <a href="../Make/index.html"><code>Logger.Make</code></a> always registers a simple printer to suggest using <a href="#val-run"><code>run</code></a>, but you can register new ones to override it. The return type of the printer <code>p</code> should return <code>Some s</code> where <code>s</code> is the resulting string, or <code>None</code> if it chooses not to convert a particular effect or exception. The registered printers are tried in reverse order until one of them returns <code>Some s</code> for some <code>s</code>; that is, the last registered printer is tried first. Note that this function is a wrapper of <code>Printexc</code>.register_printer and all the registered printers (via this function or <code>Printexc</code>.register_printer) are put into the same list.</p><p>The input type of the printer <code>p</code> is a variant representation of all internal effects and exceptions used in this module:</p><ul><li><code>`Emit diag</code> corresponds to the effect triggered by <a href="#val-emit"><code>emit</code></a>; and</li><li><code>`Fatal diag</code> corresponds to the exception triggered by <a href="#val-fatal"><code>fatal</code></a>.</li></ul><p>Note: <a href="../../Diagnostic/index.html#val-string_of_text"><code>Diagnostic.string_of_text</code></a> can be handy for converting a message into a string.</p></div></div></div></body></html>
unit</span></code></div><div class="spec-doc"><p><code>register_printer p</code> registers a printer <code>p</code> via <code>Printexc</code>.register_printer to convert unhandled internal effects and exceptions into strings for the OCaml runtime system to display. Ideally, all internal effects and exceptions should have been handled by <a href="#val-run"><code>run</code></a> and there is no need to use this function, but when it is not the case, this function can be helpful for debugging. The functor <a href="../Make/index.html"><code>Logger.Make</code></a> always registers a simple printer to suggest using <a href="#val-run"><code>run</code></a>, but you can register new ones to override it. The return type of the printer <code>p</code> should return <code>Some s</code> where <code>s</code> is the resulting string, or <code>None</code> if it chooses not to convert a particular effect or exception. The registered printers are tried in reverse order until one of them returns <code>Some s</code> for some <code>s</code>; that is, the last registered printer is tried first. Note that this function is a wrapper of <code>Printexc</code>.register_printer and all the registered printers (via this function or <code>Printexc</code>.register_printer) are put into the same list.</p><p>The input type of the printer <code>p</code> is a variant representation of all internal effects and exceptions used in this module:</p><ul><li><code>`Trace</code> corresponds to the effect triggered by <a href="#val-trace"><code>trace</code></a>; and</li><li><code>`Emit diag</code> corresponds to the effect triggered by <a href="#val-emit"><code>emit</code></a>; and</li><li><code>`Fatal diag</code> corresponds to the exception triggered by <a href="#val-fatal"><code>fatal</code></a>.</li></ul><p>Note: <a href="../../Diagnostic/index.html#val-string_of_text"><code>Diagnostic.string_of_text</code></a> can be handy for converting a message into a string.</p></div></div></div></body></html>

0 comments on commit ab8a981

Please sign in to comment.