Skip to content

Commit

Permalink
Update eio doc to 0.13.
Browse files Browse the repository at this point in the history
  • Loading branch information
talex5 committed Nov 2, 2023
1 parent 1f249c5 commit 8bb3853
Show file tree
Hide file tree
Showing 25 changed files with 47 additions and 33 deletions.
2 changes: 1 addition & 1 deletion eio/Eio/Exn/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
<span class="type-var">'a</span></span></code></div><div class="spec-doc"><p><code>reraise_with_context ex bt msg</code> raises <code>ex</code> extended with additional information <code>msg</code>.</p><p><code>ex</code> should be an <a href="#exception-Io"><code>Io</code></a> exception (if not, is re-raised unmodified).</p><p>Example:</p><pre class="language-ocaml"><code>try connect addr
with Eio.Io _ as ex -&gt;
let bt = Printexc.get_raw_backtrace () in
reraise_with_context ex bt &quot;connecting to %S&quot; addr</code></pre><p>You must get the backtrace before calling any other function in the exception handler to prevent corruption of the backtrace.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-register_pp"><a href="#val-register_pp" class="anchor"></a><code><span><span class="keyword">val</span> register_pp : <span><span>(<span><span class="xref-unresolved">Stdlib</span>.Format.formatter <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-err">err</a> <span class="arrow">&#45;&gt;</span></span> bool)</span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>register_pp pp</code> adds <code>pp</code> as a pretty-printer of errors.</p><p><code>pp f err</code> should format <code>err</code> using <code>f</code>, if possible. It should return <code>true</code> on success, or <code>false</code> if it didn't recognise <code>err</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span><span class="keyword">val</span> pp : <span>exn <span class="xref-unresolved">Fmt</span>.t</span></span></code></div><div class="spec-doc"><p><code>pp</code> is a formatter for exceptions.</p><p>This is similar to <code>Fmt</code>.exn, but can do a better job on <a href="#exception-Io"><code>Io</code></a> exceptions because it can format them directly without having to convert to a string first.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Backend"><a href="#module-Backend" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Backend/index.html">Backend</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Extensible backend-specific exceptions.</p></div></div><div class="odoc-spec"><div class="spec type extension anchored" id="extension-decl-X"><a href="#extension-decl-X" class="anchor"></a><code><span><span class="keyword">type</span> <a href="#type-err">err</a> += </span></code><ol><li id="extension-X" class="def extension anchored"><a href="#extension-X" class="anchor"></a><code><span>| </span><span><span class="extension">X</span> <span class="keyword">of</span> <a href="Backend/index.html#type-t">Backend.t</a></span></code><div class="def-doc"><span class="comment-delim">(*</span><p>A top-level code for backend errors that don't yet have a cross-platform classification in Eio.</p><p>You should avoid matching on these (in portable code). Instead, request a proper Eio code for them.</p><span class="comment-delim">*)</span></div></li></ol></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Multiple"><a href="#exception-Multiple" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Multiple</span> <span class="keyword">of</span> <span><a href="#type-with_bt">with_bt</a> list</span></span></code></div><div class="spec-doc"><p>Raised if multiple fibers fail, to report all the exceptions.</p><p>This usually indicates a bug in the program.</p><p>Note: If multiple <b>IO</b> errors occur, then you will get <code>Io (Multiple_io _, _)</code> instead of this.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-combine"><a href="#val-combine" class="anchor"></a><code><span><span class="keyword">val</span> combine : <span><a href="#type-with_bt">with_bt</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-with_bt">with_bt</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-with_bt">with_bt</a></span></code></div><div class="spec-doc"><p><code>combine x y</code> returns a single exception and backtrace to use to represent two errors.</p><p>The resulting exception is typically just <code>Multiple [y; x]</code>, but various heuristics are used to simplify the result:</p><ul><li>Combining with a <a href="../Cancel/index.html#exception-Cancelled"><code>Cancel.Cancelled</code></a> exception does nothing, as these don't need to be reported. The result is only <code>Cancelled</code> if there is no other exception available.</li><li>If both errors are <code>Io</code> errors, then the result is <code>Io (Multiple_io _)</code>.</li></ul></div></div></div></body></html>
reraise_with_context ex bt &quot;connecting to %S&quot; addr</code></pre><p>You must get the backtrace before calling any other function in the exception handler to prevent corruption of the backtrace.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-register_pp"><a href="#val-register_pp" class="anchor"></a><code><span><span class="keyword">val</span> register_pp : <span><span>(<span><span class="xref-unresolved">Stdlib</span>.Format.formatter <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-err">err</a> <span class="arrow">&#45;&gt;</span></span> bool)</span> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>register_pp pp</code> adds <code>pp</code> as a pretty-printer of errors.</p><p><code>pp f err</code> should format <code>err</code> using <code>f</code>, if possible. It should return <code>true</code> on success, or <code>false</code> if it didn't recognise <code>err</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span><span class="keyword">val</span> pp : <span>exn <span class="xref-unresolved">Fmt</span>.t</span></span></code></div><div class="spec-doc"><p><code>pp</code> is a formatter for exceptions.</p><p>This is similar to <code>Fmt</code>.exn, but can do a better job on <a href="#exception-Io"><code>Io</code></a> exceptions because it can format them directly without having to convert to a string first.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp_err"><a href="#val-pp_err" class="anchor"></a><code><span><span class="keyword">val</span> pp_err : <span><a href="#type-err">err</a> <span class="xref-unresolved">Fmt</span>.t</span></span></code></div><div class="spec-doc"><p><code>pp_err</code> formats an error code.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Backend"><a href="#module-Backend" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Backend/index.html">Backend</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Extensible backend-specific exceptions.</p></div></div><div class="odoc-spec"><div class="spec type extension anchored" id="extension-decl-X"><a href="#extension-decl-X" class="anchor"></a><code><span><span class="keyword">type</span> <a href="#type-err">err</a> += </span></code><ol><li id="extension-X" class="def extension anchored"><a href="#extension-X" class="anchor"></a><code><span>| </span><span><span class="extension">X</span> <span class="keyword">of</span> <a href="Backend/index.html#type-t">Backend.t</a></span></code><div class="def-doc"><span class="comment-delim">(*</span><p>A top-level code for backend errors that don't yet have a cross-platform classification in Eio.</p><p>You should avoid matching on these (in portable code). Instead, request a proper Eio code for them.</p><span class="comment-delim">*)</span></div></li></ol></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Multiple"><a href="#exception-Multiple" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Multiple</span> <span class="keyword">of</span> <span><a href="#type-with_bt">with_bt</a> list</span></span></code></div><div class="spec-doc"><p>Raised if multiple fibers fail, to report all the exceptions.</p><p>This usually indicates a bug in the program.</p><p>Note: If multiple <b>IO</b> errors occur, then you will get <code>Io (Multiple_io _, _)</code> instead of this.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-combine"><a href="#val-combine" class="anchor"></a><code><span><span class="keyword">val</span> combine : <span><a href="#type-with_bt">with_bt</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-with_bt">with_bt</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-with_bt">with_bt</a></span></code></div><div class="spec-doc"><p><code>combine x y</code> returns a single exception and backtrace to use to represent two errors.</p><p>The resulting exception is typically just <code>Multiple [y; x]</code>, but various heuristics are used to simplify the result:</p><ul><li>Combining with a <a href="../Cancel/index.html#exception-Cancelled"><code>Cancel.Cancelled</code></a> exception does nothing, as these don't need to be reported. The result is only <code>Cancelled</code> if there is no other exception available.</li><li>If both errors are <code>Io</code> errors, then the result is <code>Io (Multiple_io _)</code>.</li></ul></div></div></div></body></html>
2 changes: 1 addition & 1 deletion eio/Eio/File/Pi/module-type-READ/index.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>READ (eio.Eio.File.Pi.READ)</title><link rel="stylesheet" href="../../../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.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">eio</a> &#x00BB; <a href="../../../index.html">Eio</a> &#x00BB; <a href="../../index.html">File</a> &#x00BB; <a href="../index.html">Pi</a> &#x00BB; READ</nav><header class="odoc-preamble"><h1>Module type <code><span>Pi.READ</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../Flow/Pi/module-type-SOURCE/index.html">Flow.Pi.SOURCE</a></span></code></summary><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><div class="odoc-spec"><div class="spec value anchored" id="val-read_methods"><a href="#val-read_methods" class="anchor"></a><code><span><span class="keyword">val</span> read_methods : <span><span><a href="#type-t">t</a> <a href="../../../Flow/index.html#type-read_method">Flow.read_method</a></span> list</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-single_read"><a href="#val-single_read" class="anchor"></a><code><span><span class="keyword">val</span> single_read : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><span class="xref-unresolved">Cstruct</span>.t <span class="arrow">&#45;&gt;</span></span> int</span></code></div></div></details></div><div class="odoc-spec"><div class="spec value anchored" id="val-pread"><a href="#val-pread" class="anchor"></a><code><span><span class="keyword">val</span> pread : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>file_offset:<span class="xref-unresolved">Optint</span>.Int63.t <span class="arrow">&#45;&gt;</span></span> <span><span><span class="xref-unresolved">Cstruct</span>.t list</span> <span class="arrow">&#45;&gt;</span></span> int</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-stat"><a href="#val-stat" class="anchor"></a><code><span><span class="keyword">val</span> stat : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="../../Stat/index.html#type-t">Stat.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-close"><a href="#val-close" class="anchor"></a><code><span><span class="keyword">val</span> close : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div></div></body></html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>READ (eio.Eio.File.Pi.READ)</title><link rel="stylesheet" href="../../../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.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">eio</a> &#x00BB; <a href="../../../index.html">Eio</a> &#x00BB; <a href="../../index.html">File</a> &#x00BB; <a href="../index.html">Pi</a> &#x00BB; READ</nav><header class="odoc-preamble"><h1>Module type <code><span>Pi.READ</span></code></h1></header><div class="odoc-content"><div class="odoc-include"><details open="open"><summary class="spec include"><code><span><span class="keyword">include</span> <a href="../../../Flow/Pi/module-type-SOURCE/index.html">Flow.Pi.SOURCE</a></span></code></summary><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><div class="odoc-spec"><div class="spec value anchored" id="val-read_methods"><a href="#val-read_methods" class="anchor"></a><code><span><span class="keyword">val</span> read_methods : <span><span><a href="#type-t">t</a> <a href="../../../Flow/index.html#type-read_method">Flow.read_method</a></span> list</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-single_read"><a href="#val-single_read" class="anchor"></a><code><span><span class="keyword">val</span> single_read : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><span class="xref-unresolved">Cstruct</span>.t <span class="arrow">&#45;&gt;</span></span> int</span></code></div></div></details></div><div class="odoc-spec"><div class="spec value anchored" id="val-pread"><a href="#val-pread" class="anchor"></a><code><span><span class="keyword">val</span> pread : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span>file_offset:<span class="xref-unresolved">Optint</span>.Int63.t <span class="arrow">&#45;&gt;</span></span> <span><span><span class="xref-unresolved">Cstruct</span>.t list</span> <span class="arrow">&#45;&gt;</span></span> int</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-stat"><a href="#val-stat" class="anchor"></a><code><span><span class="keyword">val</span> stat : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="../../Stat/index.html#type-t">Stat.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-seek"><a href="#val-seek" class="anchor"></a><code><span><span class="keyword">val</span> seek : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><span class="xref-unresolved">Optint</span>.Int63.t <span class="arrow">&#45;&gt;</span></span> <span><span>[ `Set <span>| `Cur</span> <span>| `End</span> ]</span> <span class="arrow">&#45;&gt;</span></span> <span class="xref-unresolved">Optint</span>.Int63.t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-close"><a href="#val-close" class="anchor"></a><code><span><span class="keyword">val</span> close : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div></div></body></html>
Loading

0 comments on commit 8bb3853

Please sign in to comment.