mirror of
https://github.com/c-cube/iter.git
synced 2025-12-06 11:15:32 -05:00
deploy: 92d0022079
This commit is contained in:
parent
f83ee4bacd
commit
d02b21ff74
26 changed files with 518 additions and 59 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (iter.Iter.IO)</title><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.3.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">iter</a> » <a href="../index.html">Iter</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Iter.IO</span></code></h1><p>Basic IO</p><p>Very basic interface to manipulate files as iterator of chunks/lines. The iterators take care of opening and closing files properly; every time one iterates over an iterator, the file is opened/closed again.</p><p>Example: copy a file <code>"a"</code> into file <code>"b"</code>, removing blank lines:</p><pre class="language-ocaml"><code>Iterator.(IO.lines_of "a" |> filter (fun l-> l<> "") |> IO.write_lines "b");;</code></pre><p>By chunks of <code>4096</code> bytes:</p><pre class="language-ocaml"><code>Iterator.IO.(chunks_of ~size:4096 "a" |> write_to "b");;</code></pre><p>Read the lines of a file into a list:</p><pre class="language-ocaml"><code>Iterator.IO.lines "a" |> Iterator.to_list</code></pre><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.5.1</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-lines_of"><a href="#val-lines_of" class="anchor"></a><code><span><span class="keyword">val</span> lines_of : <span><span class="optlabel">?mode</span>:int <span class="arrow">-></span></span> <span><span class="optlabel">?flags</span>:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">-></span></span> <span>string <span class="arrow">-></span></span> <span>string <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>lines_of filename</code> reads all lines of the given file. It raises the same exception as would opening the file and read from it, except from <code>End_of_file</code> (which is caught). The file is <b>always</b> properly closed. Every time the iterator is iterated on, the file is opened again, so different iterations might return different results</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">mode</span> <p>default <code>0o644</code></p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">flags</span> <p>default: <code>[Open_rdonly]</code></p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-chunks_of"><a href="#val-chunks_of" class="anchor"></a><code><span><span class="keyword">val</span> chunks_of :
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (iter.Iter.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.0"/><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">iter</a> » <a href="../index.html">Iter</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>Iter.IO</span></code></h1><p>Basic IO</p><p>Very basic interface to manipulate files as iterator of chunks/lines. The iterators take care of opening and closing files properly; every time one iterates over an iterator, the file is opened/closed again.</p><p>Example: copy a file <code>"a"</code> into file <code>"b"</code>, removing blank lines:</p><pre class="language-ocaml"><code>Iterator.(IO.lines_of "a" |> filter (fun l-> l<> "") |> IO.write_lines "b");;</code></pre><p>By chunks of <code>4096</code> bytes:</p><pre class="language-ocaml"><code>Iterator.IO.(chunks_of ~size:4096 "a" |> write_to "b");;</code></pre><p>Read the lines of a file into a list:</p><pre class="language-ocaml"><code>Iterator.IO.lines "a" |> Iterator.to_list</code></pre><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.5.1</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-lines_of"><a href="#val-lines_of" class="anchor"></a><code><span><span class="keyword">val</span> lines_of : <span><span class="optlabel">?mode</span>:int <span class="arrow">-></span></span> <span><span class="optlabel">?flags</span>:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">-></span></span> <span>string <span class="arrow">-></span></span> <span>string <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>lines_of filename</code> reads all lines of the given file. It raises the same exception as would opening the file and read from it, except from <code>End_of_file</code> (which is caught). The file is <b>always</b> properly closed. Every time the iterator is iterated on, the file is opened again, so different iterations might return different results</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">mode</span> <p>default <code>0o644</code></p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">flags</span> <p>default: <code>[Open_rdonly]</code></p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-chunks_of"><a href="#val-chunks_of" class="anchor"></a><code><span><span class="keyword">val</span> chunks_of :
|
||||||
<span><span class="optlabel">?mode</span>:int <span class="arrow">-></span></span>
|
<span><span class="optlabel">?mode</span>:int <span class="arrow">-></span></span>
|
||||||
<span><span class="optlabel">?flags</span>:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">-></span></span>
|
<span><span class="optlabel">?flags</span>:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">-></span></span>
|
||||||
<span><span class="optlabel">?size</span>:int <span class="arrow">-></span></span>
|
<span><span class="optlabel">?size</span>:int <span class="arrow">-></span></span>
|
||||||
|
|
|
||||||
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
|
|
@ -1,4 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Map (iter.Iter.Map)</title><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.3.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">iter</a> » <a href="../index.html">Iter</a> » Map</nav><header class="odoc-preamble"><h1>Module <code><span>Iter.Map</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-S"><a href="#module-type-S" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-S/index.html">S</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Adapt"><a href="#module-Adapt" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Adapt/index.html">Adapt</a></span><span>
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Map (iter.Iter.Map)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.0"/><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">iter</a> » <a href="../index.html">Iter</a> » Map</nav><header class="odoc-preamble"><h1>Module <code><span>Iter.Map</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-S"><a href="#module-type-S" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-S/index.html">S</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Adapt"><a href="#module-Adapt" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Adapt/index.html">Adapt</a></span><span>
|
||||||
(<a href="Adapt/index.html#argument-1-M">M</a> : <span class="xref-unresolved">Stdlib</span>.Map.S) :
|
(<a href="Adapt/index.html#argument-1-M">M</a> : <span class="xref-unresolved">Stdlib</span>.Map.S) :
|
||||||
<a href="module-type-S/index.html">S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-key">key</a> = <span class="xref-unresolved">M</span>.key</span> <span class="keyword">and</span> <span><span class="keyword">type</span> <span>'a <a href="module-type-S/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <span class="xref-unresolved">M</span>.t</span></span></span></code></div><div class="spec-doc"><p>Adapt a pre-existing Map module to make it iterator-aware</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make/index.html">Make</a></span><span> (<a href="Make/index.html#argument-1-V">V</a> : <span class="xref-unresolved">Stdlib</span>.Map.OrderedType) : <a href="module-type-S/index.html">S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-key">key</a> = <span class="xref-unresolved">V</span>.t</span></span></code></div><div class="spec-doc"><p>Create an enriched Map module, with iterator-aware functions</p></div></div></div></body></html>
|
<a href="module-type-S/index.html">S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-key">key</a> = <span class="xref-unresolved">M</span>.key</span> <span class="keyword">and</span> <span><span class="keyword">type</span> <span>'a <a href="module-type-S/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <span class="xref-unresolved">M</span>.t</span></span></span></code></div><div class="spec-doc"><p>Adapt a pre-existing Map module to make it iterator-aware</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make/index.html">Make</a></span><span> (<a href="Make/index.html#argument-1-V">V</a> : <span class="xref-unresolved">Stdlib</span>.Map.OrderedType) : <a href="module-type-S/index.html">S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-key">key</a> = <span class="xref-unresolved">V</span>.t</span></span></code></div><div class="spec-doc"><p>Create an enriched Map module, with iterator-aware functions</p></div></div></div></body></html>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>S (iter.Iter.Map.S)</title><link rel="stylesheet" href="../../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.3.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">iter</a> » <a href="../../index.html">Iter</a> » <a href="../index.html">Map</a> » S</nav><header class="odoc-preamble"><h1>Module type <code><span>Map.S</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> <span class="xref-unresolved">Stdlib</span>.Map.S</span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-key"><a href="#type-key" class="anchor"></a><code><span><span class="keyword">type</span> key</span></code></div></div><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>!+'a t</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-empty"><a href="#val-empty" class="anchor"></a><code><span><span class="keyword">val</span> empty : <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-is_empty"><a href="#val-is_empty" class="anchor"></a><code><span><span class="keyword">val</span> is_empty : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-mem"><a href="#val-mem" class="anchor"></a><code><span><span class="keyword">val</span> mem : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add"><a href="#val-add" class="anchor"></a><code><span><span class="keyword">val</span> add : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-update"><a href="#val-update" class="anchor"></a><code><span><span class="keyword">val</span> update : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span>(<span><span><span class="type-var">'a</span> option</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> option</span>)</span> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-singleton"><a href="#val-singleton" class="anchor"></a><code><span><span class="keyword">val</span> singleton : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-remove"><a href="#val-remove" class="anchor"></a><code><span><span class="keyword">val</span> remove : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-merge"><a href="#val-merge" class="anchor"></a><code><span><span class="keyword">val</span> merge :
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>S (iter.Iter.Map.S)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.0"/><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">iter</a> » <a href="../../index.html">Iter</a> » <a href="../index.html">Map</a> » S</nav><header class="odoc-preamble"><h1>Module type <code><span>Map.S</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> <span class="xref-unresolved">Stdlib</span>.Map.S</span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-key"><a href="#type-key" class="anchor"></a><code><span><span class="keyword">type</span> key</span></code></div></div><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>!+'a t</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-empty"><a href="#val-empty" class="anchor"></a><code><span><span class="keyword">val</span> empty : <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-is_empty"><a href="#val-is_empty" class="anchor"></a><code><span><span class="keyword">val</span> is_empty : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-mem"><a href="#val-mem" class="anchor"></a><code><span><span class="keyword">val</span> mem : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add"><a href="#val-add" class="anchor"></a><code><span><span class="keyword">val</span> add : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-update"><a href="#val-update" class="anchor"></a><code><span><span class="keyword">val</span> update : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span>(<span><span><span class="type-var">'a</span> option</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> option</span>)</span> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-singleton"><a href="#val-singleton" class="anchor"></a><code><span><span class="keyword">val</span> singleton : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-remove"><a href="#val-remove" class="anchor"></a><code><span><span class="keyword">val</span> remove : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-merge"><a href="#val-merge" class="anchor"></a><code><span><span class="keyword">val</span> merge :
|
||||||
<span><span>(<span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> option</span> <span class="arrow">-></span></span> <span><span><span class="type-var">'b</span> option</span> <span class="arrow">-></span></span> <span><span class="type-var">'c</span> option</span>)</span> <span class="arrow">-></span></span>
|
<span><span>(<span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> option</span> <span class="arrow">-></span></span> <span><span><span class="type-var">'b</span> option</span> <span class="arrow">-></span></span> <span><span class="type-var">'c</span> option</span>)</span> <span class="arrow">-></span></span>
|
||||||
<span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span>
|
<span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span>
|
||||||
<span><span><span class="type-var">'b</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span>
|
<span><span><span class="type-var">'b</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span>
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,2 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Set (iter.Iter.Set)</title><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.3.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">iter</a> » <a href="../index.html">Iter</a> » Set</nav><header class="odoc-preamble"><h1>Module <code><span>Iter.Set</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-S"><a href="#module-type-S" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-S/index.html">S</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Adapt"><a href="#module-Adapt" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Adapt/index.html">Adapt</a></span><span> (<a href="Adapt/index.html#argument-1-X">X</a> : <span class="xref-unresolved">Stdlib</span>.Set.S) : <a href="module-type-S/index.html">S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-elt">elt</a> = <span class="xref-unresolved">X</span>.elt</span> <span class="keyword">and</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-t">t</a> = <span class="xref-unresolved">X</span>.t</span></span></code></div><div class="spec-doc"><p>Create an enriched Set module from the given one</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make/index.html">Make</a></span><span> (<a href="Make/index.html#argument-1-X">X</a> : <span class="xref-unresolved">Stdlib</span>.Set.OrderedType) : <a href="module-type-S/index.html">S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-elt">elt</a> = <span class="xref-unresolved">X</span>.t</span></span></code></div><div class="spec-doc"><p>Functor to build an extended Set module from an ordered type</p></div></div></div></body></html>
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Set (iter.Iter.Set)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.0"/><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">iter</a> » <a href="../index.html">Iter</a> » Set</nav><header class="odoc-preamble"><h1>Module <code><span>Iter.Set</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-S"><a href="#module-type-S" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-S/index.html">S</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Adapt"><a href="#module-Adapt" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Adapt/index.html">Adapt</a></span><span> (<a href="Adapt/index.html#argument-1-X">X</a> : <span class="xref-unresolved">Stdlib</span>.Set.S) : <a href="module-type-S/index.html">S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-elt">elt</a> = <span class="xref-unresolved">X</span>.elt</span> <span class="keyword">and</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-t">t</a> = <span class="xref-unresolved">X</span>.t</span></span></code></div><div class="spec-doc"><p>Create an enriched Set module from the given one</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make/index.html">Make</a></span><span> (<a href="Make/index.html#argument-1-X">X</a> : <span class="xref-unresolved">Stdlib</span>.Set.OrderedType) : <a href="module-type-S/index.html">S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-elt">elt</a> = <span class="xref-unresolved">X</span>.t</span></span></code></div><div class="spec-doc"><p>Functor to build an extended Set module from an ordered type</p></div></div></div></body></html>
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,2 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IterBigarray (iter.IterBigarray)</title><link rel="stylesheet" href="../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.3.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">iter</a> » IterBigarray</nav><header class="odoc-preamble"><h1>Module <code><span>IterBigarray</span></code></h1><p>Interface and Helpers for bigarrays</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.5.4</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-of_bigarray"><a href="#val-of_bigarray" class="anchor"></a><code><span><span class="keyword">val</span> of_bigarray : <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">_</span>, <span class="type-var">_</span>)</span> <span class="xref-unresolved">Stdlib</span>.Bigarray.Array1.t</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="../Iter/index.html#type-t">Iter.t</a></span></span></code></div><div class="spec-doc"><p>Iterate on the elements of a 1-D array</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-mmap"><a href="#val-mmap" class="anchor"></a><code><span><span class="keyword">val</span> mmap : <span>string <span class="arrow">-></span></span> <span>char <a href="../Iter/index.html#type-t">Iter.t</a></span></span></code></div><div class="spec-doc"><p>Map the file into memory, and read the characters.</p></div></div></div></body></html>
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IterBigarray (iter.IterBigarray)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.0"/><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">iter</a> » IterBigarray</nav><header class="odoc-preamble"><h1>Module <code><span>IterBigarray</span></code></h1><p>Interface and Helpers for bigarrays</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.5.4</li></ul></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-of_bigarray"><a href="#val-of_bigarray" class="anchor"></a><code><span><span class="keyword">val</span> of_bigarray : <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">_</span>, <span class="type-var">_</span>)</span> <span class="xref-unresolved">Stdlib</span>.Bigarray.Array1.t</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="../Iter/index.html#type-t">Iter.t</a></span></span></code></div><div class="spec-doc"><p>Iterate on the elements of a 1-D array</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-mmap"><a href="#val-mmap" class="anchor"></a><code><span><span class="keyword">val</span> mmap : <span>string <span class="arrow">-></span></span> <span>char <a href="../Iter/index.html#type-t">Iter.t</a></span></span></code></div><div class="spec-doc"><p>Map the file into memory, and read the characters.</p></div></div></div></body></html>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (iter.IterLabels.IO)</title><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.3.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">iter</a> » <a href="../index.html">IterLabels</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>IterLabels.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-lines_of"><a href="#val-lines_of" class="anchor"></a><code><span><span class="keyword">val</span> lines_of : <span><span class="optlabel">?mode</span>:int <span class="arrow">-></span></span> <span><span class="optlabel">?flags</span>:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">-></span></span> <span>string <span class="arrow">-></span></span> <span>string <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>lines_of filename</code> reads all lines of the given file. It raises the same exception as would opening the file and read from it, except from <code>End_of_file</code> (which is caught). The file is <b>always</b> properly closed. Every time the iterator is iterated on, the file is opened again, so different iterations might return different results</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">mode</span> <p>default <code>0o644</code></p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">flags</span> <p>default: <code>[Open_rdonly]</code></p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-chunks_of"><a href="#val-chunks_of" class="anchor"></a><code><span><span class="keyword">val</span> chunks_of :
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IO (iter.IterLabels.IO)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.0"/><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">iter</a> » <a href="../index.html">IterLabels</a> » IO</nav><header class="odoc-preamble"><h1>Module <code><span>IterLabels.IO</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-lines_of"><a href="#val-lines_of" class="anchor"></a><code><span><span class="keyword">val</span> lines_of : <span><span class="optlabel">?mode</span>:int <span class="arrow">-></span></span> <span><span class="optlabel">?flags</span>:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">-></span></span> <span>string <span class="arrow">-></span></span> <span>string <a href="../index.html#type-t">t</a></span></span></code></div><div class="spec-doc"><p><code>lines_of filename</code> reads all lines of the given file. It raises the same exception as would opening the file and read from it, except from <code>End_of_file</code> (which is caught). The file is <b>always</b> properly closed. Every time the iterator is iterated on, the file is opened again, so different iterations might return different results</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">mode</span> <p>default <code>0o644</code></p></li></ul><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">flags</span> <p>default: <code>[Open_rdonly]</code></p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-chunks_of"><a href="#val-chunks_of" class="anchor"></a><code><span><span class="keyword">val</span> chunks_of :
|
||||||
<span><span class="optlabel">?mode</span>:int <span class="arrow">-></span></span>
|
<span><span class="optlabel">?mode</span>:int <span class="arrow">-></span></span>
|
||||||
<span><span class="optlabel">?flags</span>:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">-></span></span>
|
<span><span class="optlabel">?flags</span>:<span><span class="xref-unresolved">Stdlib</span>.open_flag list</span> <span class="arrow">-></span></span>
|
||||||
<span><span class="optlabel">?size</span>:int <span class="arrow">-></span></span>
|
<span><span class="optlabel">?size</span>:int <span class="arrow">-></span></span>
|
||||||
|
|
|
||||||
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
|
|
@ -1,4 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Map (iter.IterLabels.Map)</title><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.3.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">iter</a> » <a href="../index.html">IterLabels</a> » Map</nav><header class="odoc-preamble"><h1>Module <code><span>IterLabels.Map</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-S"><a href="#module-type-S" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-S/index.html">S</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Adapt"><a href="#module-Adapt" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Adapt/index.html">Adapt</a></span><span>
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Map (iter.IterLabels.Map)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.0"/><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">iter</a> » <a href="../index.html">IterLabels</a> » Map</nav><header class="odoc-preamble"><h1>Module <code><span>IterLabels.Map</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-S"><a href="#module-type-S" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-S/index.html">S</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Adapt"><a href="#module-Adapt" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Adapt/index.html">Adapt</a></span><span>
|
||||||
(<a href="Adapt/index.html#argument-1-M">M</a> : <span class="xref-unresolved">Stdlib</span>.Map.S) :
|
(<a href="Adapt/index.html#argument-1-M">M</a> : <span class="xref-unresolved">Stdlib</span>.Map.S) :
|
||||||
<a href="module-type-S/index.html">S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-key">key</a> = <span class="xref-unresolved">M</span>.key</span> <span class="keyword">and</span> <span><span class="keyword">type</span> <span>'a <a href="module-type-S/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <span class="xref-unresolved">M</span>.t</span></span></span></code></div><div class="spec-doc"><p>Adapt a pre-existing Map module to make it iterator-aware</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make/index.html">Make</a></span><span> (<a href="Make/index.html#argument-1-V">V</a> : <span class="xref-unresolved">Stdlib</span>.Map.OrderedType) : <a href="module-type-S/index.html">S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-key">key</a> = <span class="xref-unresolved">V</span>.t</span></span></code></div><div class="spec-doc"><p>Create an enriched Map module, with iterator-aware functions</p></div></div></div></body></html>
|
<a href="module-type-S/index.html">S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-key">key</a> = <span class="xref-unresolved">M</span>.key</span> <span class="keyword">and</span> <span><span class="keyword">type</span> <span>'a <a href="module-type-S/index.html#type-t">t</a></span> = <span><span class="type-var">'a</span> <span class="xref-unresolved">M</span>.t</span></span></span></code></div><div class="spec-doc"><p>Adapt a pre-existing Map module to make it iterator-aware</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make/index.html">Make</a></span><span> (<a href="Make/index.html#argument-1-V">V</a> : <span class="xref-unresolved">Stdlib</span>.Map.OrderedType) : <a href="module-type-S/index.html">S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-key">key</a> = <span class="xref-unresolved">V</span>.t</span></span></code></div><div class="spec-doc"><p>Create an enriched Map module, with iterator-aware functions</p></div></div></div></body></html>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>S (iter.IterLabels.Map.S)</title><link rel="stylesheet" href="../../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.3.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">iter</a> » <a href="../../index.html">IterLabels</a> » <a href="../index.html">Map</a> » S</nav><header class="odoc-preamble"><h1>Module type <code><span>Map.S</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> <span class="xref-unresolved">Stdlib</span>.Map.S</span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-key"><a href="#type-key" class="anchor"></a><code><span><span class="keyword">type</span> key</span></code></div></div><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>!+'a t</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-empty"><a href="#val-empty" class="anchor"></a><code><span><span class="keyword">val</span> empty : <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-is_empty"><a href="#val-is_empty" class="anchor"></a><code><span><span class="keyword">val</span> is_empty : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-mem"><a href="#val-mem" class="anchor"></a><code><span><span class="keyword">val</span> mem : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add"><a href="#val-add" class="anchor"></a><code><span><span class="keyword">val</span> add : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-update"><a href="#val-update" class="anchor"></a><code><span><span class="keyword">val</span> update : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span>(<span><span><span class="type-var">'a</span> option</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> option</span>)</span> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-singleton"><a href="#val-singleton" class="anchor"></a><code><span><span class="keyword">val</span> singleton : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-remove"><a href="#val-remove" class="anchor"></a><code><span><span class="keyword">val</span> remove : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-merge"><a href="#val-merge" class="anchor"></a><code><span><span class="keyword">val</span> merge :
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>S (iter.IterLabels.Map.S)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.0"/><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">iter</a> » <a href="../../index.html">IterLabels</a> » <a href="../index.html">Map</a> » S</nav><header class="odoc-preamble"><h1>Module type <code><span>Map.S</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> <span class="xref-unresolved">Stdlib</span>.Map.S</span></code></summary><div class="odoc-spec"><div class="spec type anchored" id="type-key"><a href="#type-key" class="anchor"></a><code><span><span class="keyword">type</span> key</span></code></div></div><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>!+'a t</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-empty"><a href="#val-empty" class="anchor"></a><code><span><span class="keyword">val</span> empty : <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-is_empty"><a href="#val-is_empty" class="anchor"></a><code><span><span class="keyword">val</span> is_empty : <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-mem"><a href="#val-mem" class="anchor"></a><code><span><span class="keyword">val</span> mem : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add"><a href="#val-add" class="anchor"></a><code><span><span class="keyword">val</span> add : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-update"><a href="#val-update" class="anchor"></a><code><span><span class="keyword">val</span> update : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span>(<span><span><span class="type-var">'a</span> option</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> option</span>)</span> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-singleton"><a href="#val-singleton" class="anchor"></a><code><span><span class="keyword">val</span> singleton : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-remove"><a href="#val-remove" class="anchor"></a><code><span><span class="keyword">val</span> remove : <span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span> <span><span class="type-var">'a</span> <a href="#type-t">t</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-merge"><a href="#val-merge" class="anchor"></a><code><span><span class="keyword">val</span> merge :
|
||||||
<span><span>(<span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> option</span> <span class="arrow">-></span></span> <span><span><span class="type-var">'b</span> option</span> <span class="arrow">-></span></span> <span><span class="type-var">'c</span> option</span>)</span> <span class="arrow">-></span></span>
|
<span><span>(<span><a href="#type-key">key</a> <span class="arrow">-></span></span> <span><span><span class="type-var">'a</span> option</span> <span class="arrow">-></span></span> <span><span><span class="type-var">'b</span> option</span> <span class="arrow">-></span></span> <span><span class="type-var">'c</span> option</span>)</span> <span class="arrow">-></span></span>
|
||||||
<span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span>
|
<span><span><span class="type-var">'a</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span>
|
||||||
<span><span><span class="type-var">'b</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span>
|
<span><span><span class="type-var">'b</span> <a href="#type-t">t</a></span> <span class="arrow">-></span></span>
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,2 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Set (iter.IterLabels.Set)</title><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.3.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">iter</a> » <a href="../index.html">IterLabels</a> » Set</nav><header class="odoc-preamble"><h1>Module <code><span>IterLabels.Set</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-S"><a href="#module-type-S" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-S/index.html">S</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Adapt"><a href="#module-Adapt" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Adapt/index.html">Adapt</a></span><span> (<a href="Adapt/index.html#argument-1-X">X</a> : <span class="xref-unresolved">Stdlib</span>.Set.S) : <a href="module-type-S/index.html">S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-elt">elt</a> = <span class="xref-unresolved">X</span>.elt</span> <span class="keyword">and</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-t">t</a> = <span class="xref-unresolved">X</span>.t</span></span></code></div><div class="spec-doc"><p>Create an enriched Set module from the given one</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make/index.html">Make</a></span><span> (<a href="Make/index.html#argument-1-X">X</a> : <span class="xref-unresolved">Stdlib</span>.Set.OrderedType) : <a href="module-type-S/index.html">S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-elt">elt</a> = <span class="xref-unresolved">X</span>.t</span></span></code></div><div class="spec-doc"><p>Functor to build an extended Set module from an ordered type</p></div></div></div></body></html>
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Set (iter.IterLabels.Set)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.0"/><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">iter</a> » <a href="../index.html">IterLabels</a> » Set</nav><header class="odoc-preamble"><h1>Module <code><span>IterLabels.Set</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module-type anchored" id="module-type-S"><a href="#module-type-S" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-S/index.html">S</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Adapt"><a href="#module-Adapt" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Adapt/index.html">Adapt</a></span><span> (<a href="Adapt/index.html#argument-1-X">X</a> : <span class="xref-unresolved">Stdlib</span>.Set.S) : <a href="module-type-S/index.html">S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-elt">elt</a> = <span class="xref-unresolved">X</span>.elt</span> <span class="keyword">and</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-t">t</a> = <span class="xref-unresolved">X</span>.t</span></span></code></div><div class="spec-doc"><p>Create an enriched Set module from the given one</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Make"><a href="#module-Make" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Make/index.html">Make</a></span><span> (<a href="Make/index.html#argument-1-X">X</a> : <span class="xref-unresolved">Stdlib</span>.Set.OrderedType) : <a href="module-type-S/index.html">S</a> <span class="keyword">with</span> <span><span class="keyword">type</span> <a href="module-type-S/index.html#type-elt">elt</a> = <span class="xref-unresolved">X</span>.t</span></span></code></div><div class="spec-doc"><p>Functor to build an extended Set module from an ordered type</p></div></div></div></body></html>
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,2 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>index (iter.index)</title><link rel="stylesheet" href="../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.3.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> – iter</nav><header class="odoc-preamble"><h1 id="iter-index"><a href="#iter-index" class="anchor"></a>iter index</h1></header><nav class="odoc-toc"><ul><li><a href="#library-iter">Library iter</a></li><li><a href="#library-iter.bigarray">Library iter.bigarray</a></li></ul></nav><div class="odoc-content"><h2 id="library-iter"><a href="#library-iter" class="anchor"></a>Library iter</h2><p>This library exposes the following toplevel modules:</p><ul class="modules"><li><a href="Iter/index.html"><code>Iter</code></a> <span class="synopsis">Simple and Efficient Iterators.</span></li><li><a href="IterLabels/index.html"><code>IterLabels</code></a> </li></ul><h2 id="library-iter.bigarray"><a href="#library-iter.bigarray" class="anchor"></a>Library iter.bigarray</h2><p>The entry point of this library is the module: <a href="IterBigarray/index.html"><code>IterBigarray</code></a>.</p></div></body></html>
|
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>index (iter.index)</title><meta charset="utf-8"/><link rel="stylesheet" href="../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.0"/><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> – iter</nav><header class="odoc-preamble"><h1 id="iter-index"><a href="#iter-index" class="anchor"></a>iter index</h1></header><nav class="odoc-toc"><ul><li><a href="#library-iter">Library iter</a></li><li><a href="#library-iter.bigarray">Library iter.bigarray</a></li></ul></nav><div class="odoc-content"><h2 id="library-iter"><a href="#library-iter" class="anchor"></a>Library iter</h2><p>This library exposes the following toplevel modules:</p><ul class="modules"><li><a href="Iter/index.html"><code>Iter</code></a> <span class="synopsis">Simple and Efficient Iterators.</span></li><li><a href="IterLabels/index.html"><code>IterLabels</code></a> </li></ul><h2 id="library-iter.bigarray"><a href="#library-iter.bigarray" class="anchor"></a>Library iter.bigarray</h2><p>The entry point of this library is the module: <a href="IterBigarray/index.html"><code>IterBigarray</code></a>.</p></div></body></html>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
/* Copyright (c) 2016 The odoc contributors. All rights reserved.
|
/* Copyright (c) 2016 The odoc contributors. All rights reserved.
|
||||||
Distributed under the ISC license, see terms at the end of the file.
|
Distributed under the ISC license, see terms at the end of the file.
|
||||||
odoc 2.3.0 */
|
odoc 2.4.0 */
|
||||||
|
|
||||||
/* Fonts */
|
/* Fonts */
|
||||||
/* noticia-text-regular - latin */
|
/* noticia-text-regular - latin */
|
||||||
|
|
@ -95,7 +95,10 @@
|
||||||
|
|
||||||
:root,
|
:root,
|
||||||
.light:root {
|
.light:root {
|
||||||
--main-background: #FFFFFF;
|
|
||||||
|
scroll-padding-top: calc(var(--search-bar-height) + var(--search-padding-top) + 1em);
|
||||||
|
|
||||||
|
--main-background: #FFFFFF;
|
||||||
|
|
||||||
--color: #333333;
|
--color: #333333;
|
||||||
--link-color: #2C94BD;
|
--link-color: #2C94BD;
|
||||||
|
|
@ -116,6 +119,7 @@
|
||||||
--toc-color: #1F2D3D;
|
--toc-color: #1F2D3D;
|
||||||
--toc-before-color: #777;
|
--toc-before-color: #777;
|
||||||
--toc-background: #f6f8fa;
|
--toc-background: #f6f8fa;
|
||||||
|
--toc-background-emph: #ecf0f5;
|
||||||
--toc-list-border: #ccc;
|
--toc-list-border: #ccc;
|
||||||
|
|
||||||
--spec-summary-border-color: #5c9cf5;
|
--spec-summary-border-color: #5c9cf5;
|
||||||
|
|
@ -124,6 +128,12 @@
|
||||||
--spec-summary-hover-background: #ebeff2;
|
--spec-summary-hover-background: #ebeff2;
|
||||||
--spec-details-after-background: rgba(0, 4, 15, 0.05);
|
--spec-details-after-background: rgba(0, 4, 15, 0.05);
|
||||||
--spec-details-after-shadow: rgba(204, 204, 204, 0.53);
|
--spec-details-after-shadow: rgba(204, 204, 204, 0.53);
|
||||||
|
|
||||||
|
--search-results-border: #bbb;
|
||||||
|
--search-results-shadow: #bbb;
|
||||||
|
|
||||||
|
--search-snake: #82aaff;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dark:root {
|
.dark:root {
|
||||||
|
|
@ -151,6 +161,7 @@
|
||||||
--li-code-color: #999;
|
--li-code-color: #999;
|
||||||
--toc-color: #777;
|
--toc-color: #777;
|
||||||
--toc-background: #252525;
|
--toc-background: #252525;
|
||||||
|
--toc-background-emph: #2a2a2a;
|
||||||
|
|
||||||
--hljs-link: #999;
|
--hljs-link: #999;
|
||||||
--hljs-keyword: #cda869;
|
--hljs-keyword: #cda869;
|
||||||
|
|
@ -161,6 +172,10 @@
|
||||||
--hljs-variable: #cf6a4c;
|
--hljs-variable: #cf6a4c;
|
||||||
|
|
||||||
--spec-label-color: lightgreen;
|
--spec-label-color: lightgreen;
|
||||||
|
|
||||||
|
--search-results-border: #505050;
|
||||||
|
--search-results-shadow: #404040;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
|
|
@ -195,6 +210,7 @@
|
||||||
--toc-color: #777;
|
--toc-color: #777;
|
||||||
--toc-before-color: #777;
|
--toc-before-color: #777;
|
||||||
--toc-background: #252525;
|
--toc-background: #252525;
|
||||||
|
--toc-background-emph: #2a2a2a;
|
||||||
--toc-list-border: #ccc;
|
--toc-list-border: #ccc;
|
||||||
--spec-summary-hover-background: #ebeff2;
|
--spec-summary-hover-background: #ebeff2;
|
||||||
--spec-details-after-background: rgba(0, 4, 15, 0.05);
|
--spec-details-after-background: rgba(0, 4, 15, 0.05);
|
||||||
|
|
@ -209,6 +225,10 @@
|
||||||
--hljs-variable: #cf6a4c;
|
--hljs-variable: #cf6a4c;
|
||||||
|
|
||||||
--spec-label-color: lightgreen;
|
--spec-label-color: lightgreen;
|
||||||
|
|
||||||
|
--search-results-border: #505050;
|
||||||
|
--search-results-shadow: #404040;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -246,26 +266,50 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin-left: calc(10vw + 20ex);
|
margin-left: auto;
|
||||||
margin-right: 4ex;
|
margin-right: auto;
|
||||||
margin-top: 20px;
|
padding: 0 4ex;
|
||||||
margin-bottom: 50px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body.odoc {
|
body.odoc {
|
||||||
max-width: 100ex;
|
max-width: 132ex;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: min-content 1fr;
|
||||||
|
column-gap: 4ex;
|
||||||
|
row-gap: 2ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.odoc-src {
|
body.odoc-src {
|
||||||
margin-right: calc(10vw + 20ex);
|
margin-right: calc(10vw + 20ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.odoc-content {
|
||||||
|
grid-row: 4;
|
||||||
|
grid-column: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-preamble > *:first-child {
|
||||||
|
/* This make the first thing in the preamble align with the sidebar */
|
||||||
|
padding-top: 0;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
header.odoc-preamble {
|
||||||
|
grid-column: 2;
|
||||||
|
grid-row: 3;
|
||||||
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
font-family: "Fira Sans", Helvetica, Arial, sans-serif;
|
font-family: "Fira Sans", sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav.odoc-nav {
|
||||||
|
grid-column: 2;
|
||||||
|
grid-row: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Basic markup elements */
|
/* Basic markup elements */
|
||||||
|
|
@ -396,7 +440,7 @@ a.anchor {
|
||||||
a.source_link {
|
a.source_link {
|
||||||
float: right;
|
float: right;
|
||||||
color: var(--source-color);
|
color: var(--source-color);
|
||||||
font-family: "Fira Sans", Helvetica, Arial, sans-serif;
|
font-family: "Fira Sans", sans-serif;
|
||||||
font-size: initial;
|
font-size: initial;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -405,13 +449,17 @@ a.source_link {
|
||||||
we restart the sequence there like h2 */
|
we restart the sequence there like h2 */
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6, .h7, .h8, .h9, .h10 {
|
h1, h2, h3, h4, h5, h6, .h7, .h8, .h9, .h10 {
|
||||||
font-family: "Fira Sans", Helvetica, Arial, sans-serif;
|
font-family: "Fira Sans", sans-serif;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
padding-top: 0.1em;
|
padding-top: 0.1em;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.odoc-preamble h1 {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 2.441em;
|
font-size: 2.441em;
|
||||||
|
|
@ -459,7 +507,7 @@ h4 {
|
||||||
font-size: 1.12em;
|
font-size: 1.12em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Comment delimiters, hidden but accessible to screen readers and
|
/* Comment delimiters, hidden but accessible to screen readers and
|
||||||
selected for copy/pasting */
|
selected for copy/pasting */
|
||||||
|
|
||||||
/* Taken from bootstrap */
|
/* Taken from bootstrap */
|
||||||
|
|
@ -479,7 +527,7 @@ h4 {
|
||||||
/* Preformatted and code */
|
/* Preformatted and code */
|
||||||
|
|
||||||
tt, code, pre {
|
tt, code, pre {
|
||||||
font-family: "Fira Mono", courier;
|
font-family: "Fira Mono", monospace;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -549,10 +597,10 @@ div.odoc-spec,.odoc-include {
|
||||||
|
|
||||||
.spec.type .variant, .spec.type .record {
|
.spec.type .variant, .spec.type .record {
|
||||||
margin-left: 2ch;
|
margin-left: 2ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.spec.type li.variant, .spec.type li.record {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
row-gap: 4px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.spec.type .record > code, .spec.type .variant > code {
|
.spec.type .record > code, .spec.type .variant > code {
|
||||||
|
|
@ -569,9 +617,8 @@ div.odoc-spec,.odoc-include {
|
||||||
padding: 0.25em 0.5em;
|
padding: 0.25em 0.5em;
|
||||||
margin-left: 10%;
|
margin-left: 10%;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
flex-grow:1;
|
|
||||||
background: var(--main-background);
|
background: var(--main-background);
|
||||||
box-shadow: 2px 2px 4px lightgrey;
|
box-shadow: 1px 1px 2px lightgrey;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.def {
|
div.def {
|
||||||
|
|
@ -739,19 +786,32 @@ td.def-doc *:first-child {
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* When a search bar is present, we need the sticky sidebar to be a bit lower,
|
||||||
|
so `top` is higher */
|
||||||
|
|
||||||
|
.odoc-search + * + .odoc-toc {
|
||||||
|
--toc-top: calc(var(--search-bar-height) + var(--search-padding-top) + 20px);
|
||||||
|
max-height: calc(100vh - 2 * var(--toc-top));
|
||||||
|
top: var(--toc-top)
|
||||||
|
}
|
||||||
|
|
||||||
.odoc-toc {
|
.odoc-toc {
|
||||||
position: fixed;
|
--toc-top: 20px;
|
||||||
top: 0px;
|
width: 28ex;
|
||||||
bottom: 0px;
|
|
||||||
left: 0px;
|
|
||||||
max-width: 30ex;
|
|
||||||
min-width: 26ex;
|
|
||||||
width: 20%;
|
|
||||||
background: var(--toc-background);
|
background: var(--toc-background);
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
color: var(--toc-color);
|
color: var(--toc-color);
|
||||||
padding-left: 2ex;
|
padding-left: 2ex;
|
||||||
padding-right: 2ex;
|
padding-right: 2ex;
|
||||||
|
grid-row-start: 3;
|
||||||
|
grid-row-end: 5;
|
||||||
|
grid-column: 1;
|
||||||
|
height: fit-content;
|
||||||
|
border: solid 1px var(--border);
|
||||||
|
border-radius: 5px;
|
||||||
|
position:sticky;
|
||||||
|
max-height: calc(100vh - 2 * var(--toc-top));
|
||||||
|
top: var(--toc-top)
|
||||||
}
|
}
|
||||||
|
|
||||||
.odoc-toc ul li a {
|
.odoc-toc ul li a {
|
||||||
|
|
@ -759,15 +819,287 @@ td.def-doc *:first-child {
|
||||||
font-size: 0.95em;
|
font-size: 0.95em;
|
||||||
color: var(--color);
|
color: var(--color);
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 1.6em;
|
line-height: 1.2em;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.odoc-toc ul li a:hover {
|
.odoc-sidebar ul li a:hover {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--search-bar-height: 25px;
|
||||||
|
--search-padding-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
background: var(--main-background);
|
||||||
|
/* This amounts to fit-content when the search is not active, but when you
|
||||||
|
have the search results displayed, you do not want the height of the search
|
||||||
|
container to change. */
|
||||||
|
height: calc(var(--search-bar-height) + var(--search-padding-top));
|
||||||
|
width: 100%;
|
||||||
|
padding-top: var(--search-padding-top);
|
||||||
|
z-index: 1;
|
||||||
|
grid-row: 1;
|
||||||
|
grid-column-start: 1;
|
||||||
|
grid-column-end: 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.odoc-search .search-inner {
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
left: 0;
|
||||||
|
display: grid;
|
||||||
|
/* The second column is for the search snake, which has 0 width */
|
||||||
|
grid-template-columns: 1fr 0fr;
|
||||||
|
grid-row-gap: 1rem;
|
||||||
|
/* The second row is for the search results. It has a width, but only */
|
||||||
|
grid-template-rows: min-content 0px;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-bar {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
font-size: 1em;
|
||||||
|
transition: font-size 0.3s;
|
||||||
|
box-shadow: 0px 0px 0.2rem 0.3em var(--main-background);
|
||||||
|
height: var(--search-bar-height);
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search:focus-within .search-bar {
|
||||||
|
font-size: 1.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search:not(:focus-within) .search-result {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-result:empty {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-result {
|
||||||
|
grid-row: 2;
|
||||||
|
background: var(--toc-background);
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
border: solid;
|
||||||
|
border-color: var(--search-results-border);
|
||||||
|
border-width: 1px;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 3px 10px 2px var(--search-results-shadow), 0 0 3px 4px var(--main-background), 0px -1rem 0px 0px var(--main-background);
|
||||||
|
/* Works better on smallish screens with this */
|
||||||
|
max-height: calc(min(40rem, 50vh));
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar {
|
||||||
|
/* inputs are of fixed size by default, even if you display:block them */
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.odoc-search .search-no-result {
|
||||||
|
color: var(--color);
|
||||||
|
border-bottom: var(--search-results-border) solid 1px;
|
||||||
|
background-color: inherit;
|
||||||
|
outline: 0;
|
||||||
|
padding: 10px;
|
||||||
|
padding-right: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-bar-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: stretch;
|
||||||
|
border-bottom: 1rem solid var(--main-background);
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-snake {
|
||||||
|
grid-row: 1;
|
||||||
|
grid-column: 2;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 0;
|
||||||
|
z-index: 2;
|
||||||
|
position: relative;
|
||||||
|
left: 0;
|
||||||
|
margin-top: 4px;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
/* Otherwise the search snake flickers for very fast searches. */
|
||||||
|
transition: opacity 0.2s;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-snake.search-busy {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-snake:before {
|
||||||
|
content: " ";
|
||||||
|
display: block;
|
||||||
|
aspect-ratio: 1 / 1;
|
||||||
|
height: 100%;
|
||||||
|
margin-right: 4px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 3px solid #aaa;
|
||||||
|
border-color: var(--search-snake) transparent var(--search-snake) transparent;
|
||||||
|
animation: search-snake 1.2s linear infinite;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes search-snake {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--kind-font-size-factor: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-entry {
|
||||||
|
color: var(--color);
|
||||||
|
display: grid;
|
||||||
|
/* Possible kinds are the following :
|
||||||
|
"doc" "type" "mod" "exn" "class" "meth" "cons" "sig" "cons" "field" "val"
|
||||||
|
and "ext".
|
||||||
|
As the longest is 5 characters (and the font monospace), we give 5
|
||||||
|
character size to the column. However the font used for kind is a little
|
||||||
|
smaller, so we adjust by this factor.
|
||||||
|
*/
|
||||||
|
grid-template-columns: [kinds] calc(var(--kind-font-size-factor) * 5ch) [titles] 1fr;
|
||||||
|
column-gap: 0.5rem;
|
||||||
|
border-bottom: var(--search-results-border) solid 1px;
|
||||||
|
background-color: inherit;
|
||||||
|
outline: 0;
|
||||||
|
padding: 0.4rem 0.4rem 0.7rem 0.7rem;
|
||||||
|
}
|
||||||
|
.odoc-search .search-entry p {
|
||||||
|
margin: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-entry:focus-visible {
|
||||||
|
box-shadow: none;
|
||||||
|
background-color: var(--target-background);
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-entry:hover {
|
||||||
|
box-shadow: none;
|
||||||
|
background-color: var(--toc-background-emph);
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-entry .entry-kind {
|
||||||
|
grid-row: 1/2;
|
||||||
|
grid-column: 1/2;
|
||||||
|
line-height: 1.4rem;
|
||||||
|
font-size: calc(var(--kind-font-size-factor) * 1em);
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: right;
|
||||||
|
position: relative;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-entry pre {
|
||||||
|
border: none;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-entry pre code {
|
||||||
|
font-size: 1em;
|
||||||
|
background-color: var(--li-code-background);
|
||||||
|
color: var(--li-code-color);
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 0 0.3ex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-entry .entry-title {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
grid-column: 2/2;
|
||||||
|
grid-row: 1/2;
|
||||||
|
align-self: end;
|
||||||
|
line-height: 1.4rem;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .entry-name {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .prefix-name {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-entry .prefix-name {
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .entry-rhs {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-entry .entry-content {
|
||||||
|
flex-grow: 1;
|
||||||
|
flex-shrink: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-entry .entry-comment {
|
||||||
|
max-height: 1.5em;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-size: 0.95em;
|
||||||
|
grid-row: 2/2;
|
||||||
|
grid-column: 2/2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-entry .entry-comment ul {
|
||||||
|
white-space: nowrap;
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-entry .entry-comment li {
|
||||||
|
display: inline;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-entry .entry-comment ul>li::before {
|
||||||
|
content: '•';
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-entry .entry-comment div {
|
||||||
|
display: inline;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-entry .entry-comment p {
|
||||||
|
display: inline;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.odoc-search .search-entry .entry-comment code {
|
||||||
|
display: inline;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
/* First level titles */
|
/* First level titles */
|
||||||
|
|
||||||
.odoc-toc>ul>li>a {
|
.odoc-toc>ul>li>a {
|
||||||
|
|
@ -776,6 +1108,7 @@ td.def-doc *:first-child {
|
||||||
|
|
||||||
.odoc-toc li ul {
|
.odoc-toc li ul {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
|
padding-top: 0.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.odoc-toc ul {
|
.odoc-toc ul {
|
||||||
|
|
@ -783,8 +1116,9 @@ td.def-doc *:first-child {
|
||||||
}
|
}
|
||||||
|
|
||||||
.odoc-toc ul li {
|
.odoc-toc ul li {
|
||||||
margin: 0;
|
padding: 0.25em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.odoc-toc>ul>li {
|
.odoc-toc>ul>li {
|
||||||
margin-bottom: 0.3em;
|
margin-bottom: 0.3em;
|
||||||
}
|
}
|
||||||
|
|
@ -801,7 +1135,8 @@ td.def-doc *:first-child {
|
||||||
margin: 1em;
|
margin: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.odoc-table td, .odoc-table th {
|
.odoc-table td,
|
||||||
|
.odoc-table th {
|
||||||
padding-left: 0.5em;
|
padding-left: 0.5em;
|
||||||
padding-right: 0.5em;
|
padding-right: 0.5em;
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
|
|
@ -816,7 +1151,13 @@ td.def-doc *:first-child {
|
||||||
@media only screen and (max-width: 110ex) {
|
@media only screen and (max-width: 110ex) {
|
||||||
body {
|
body {
|
||||||
margin: 2em;
|
margin: 2em;
|
||||||
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.odoc {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
.odoc-toc {
|
.odoc-toc {
|
||||||
position: static;
|
position: static;
|
||||||
width: auto;
|
width: auto;
|
||||||
|
|
@ -836,6 +1177,7 @@ td.def-doc *:first-child {
|
||||||
color: black;
|
color: black;
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
body nav:first-child {
|
body nav:first-child {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
@ -955,23 +1297,74 @@ td.def-doc *:first-child {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.VAL, .TYPE, .LET, .REC, .IN, .OPEN, .NONREC, .MODULE, .METHOD, .LETOP, .INHERIT, .INCLUDE, .FUNCTOR, .EXTERNAL, .CONSTRAINT, .ASSERT, .AND, .END, .CLASS, .STRUCT, .SIG {
|
.VAL,
|
||||||
color: #859900;;
|
.TYPE,
|
||||||
|
.LET,
|
||||||
|
.REC,
|
||||||
|
.IN,
|
||||||
|
.OPEN,
|
||||||
|
.NONREC,
|
||||||
|
.MODULE,
|
||||||
|
.METHOD,
|
||||||
|
.LETOP,
|
||||||
|
.INHERIT,
|
||||||
|
.INCLUDE,
|
||||||
|
.FUNCTOR,
|
||||||
|
.EXTERNAL,
|
||||||
|
.CONSTRAINT,
|
||||||
|
.ASSERT,
|
||||||
|
.AND,
|
||||||
|
.END,
|
||||||
|
.CLASS,
|
||||||
|
.STRUCT,
|
||||||
|
.SIG {
|
||||||
|
color: #859900;
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
.WITH, .WHILE, .WHEN, .VIRTUAL, .TRY, .TO, .THEN, .PRIVATE, .OF, .NEW, .MUTABLE, .MATCH, .LAZY, .IF, .FUNCTION, .FUN, .FOR, .EXCEPTION, .ELSE, .TO, .DOWNTO, .DO, .DONE, .BEGIN, .AS {
|
.WITH,
|
||||||
|
.WHILE,
|
||||||
|
.WHEN,
|
||||||
|
.VIRTUAL,
|
||||||
|
.TRY,
|
||||||
|
.TO,
|
||||||
|
.THEN,
|
||||||
|
.PRIVATE,
|
||||||
|
.OF,
|
||||||
|
.NEW,
|
||||||
|
.MUTABLE,
|
||||||
|
.MATCH,
|
||||||
|
.LAZY,
|
||||||
|
.IF,
|
||||||
|
.FUNCTION,
|
||||||
|
.FUN,
|
||||||
|
.FOR,
|
||||||
|
.EXCEPTION,
|
||||||
|
.ELSE,
|
||||||
|
.TO,
|
||||||
|
.DOWNTO,
|
||||||
|
.DO,
|
||||||
|
.DONE,
|
||||||
|
.BEGIN,
|
||||||
|
.AS {
|
||||||
color: #cb4b16;
|
color: #cb4b16;
|
||||||
}
|
}
|
||||||
|
|
||||||
.TRUE, .FALSE {
|
.TRUE,
|
||||||
|
.FALSE {
|
||||||
color: #b58900;
|
color: #b58900;
|
||||||
}
|
}
|
||||||
|
|
||||||
.failwith, .INT, .SEMISEMI, .LIDENT {
|
.failwith,
|
||||||
|
.INT,
|
||||||
|
.SEMISEMI,
|
||||||
|
.LIDENT {
|
||||||
color: #2aa198;
|
color: #2aa198;
|
||||||
}
|
}
|
||||||
|
|
||||||
.STRING, .CHAR, .UIDENT {
|
.STRING,
|
||||||
|
.CHAR,
|
||||||
|
.UIDENT {
|
||||||
color: #b58900;
|
color: #b58900;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -997,4 +1390,4 @@ td.def-doc *:first-child {
|
||||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
---------------------------------------------------------------------------*/
|
---------------------------------------------------------------------------*/
|
||||||
66
dev/odoc.support/odoc_search.js
Normal file
66
dev/odoc.support/odoc_search.js
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
/* The browsers interpretation of the CORS origin policy prevents to run
|
||||||
|
webworkers from javascript files fetched from the file:// protocol. This hack
|
||||||
|
is to workaround this restriction. */
|
||||||
|
function createWebWorker() {
|
||||||
|
var searchs = search_urls.map((search_url) => {
|
||||||
|
let parts = document.location.href.split("/");
|
||||||
|
parts[parts.length - 1] = search_url;
|
||||||
|
return '"' + parts.join("/") + '"';
|
||||||
|
});
|
||||||
|
blobContents = ["importScripts(" + searchs.join(",") + ");"];
|
||||||
|
var blob = new Blob(blobContents, { type: "application/javascript" });
|
||||||
|
var blobUrl = URL.createObjectURL(blob);
|
||||||
|
|
||||||
|
var worker = new Worker(blobUrl);
|
||||||
|
URL.revokeObjectURL(blobUrl);
|
||||||
|
|
||||||
|
return worker;
|
||||||
|
}
|
||||||
|
|
||||||
|
var worker;
|
||||||
|
var waiting = 0;
|
||||||
|
|
||||||
|
function wait() {
|
||||||
|
waiting = waiting + 1;
|
||||||
|
document.querySelector(".search-snake").classList.add("search-busy");
|
||||||
|
}
|
||||||
|
|
||||||
|
function stop_waiting() {
|
||||||
|
if (waiting > 0) waiting = waiting - 1;
|
||||||
|
else waiting = 0;
|
||||||
|
if (waiting == 0) {
|
||||||
|
document.querySelector(".search-snake").classList.remove("search-busy");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.querySelector(".search-bar").addEventListener("focus", (ev) => {
|
||||||
|
if (typeof worker == "undefined") {
|
||||||
|
worker = createWebWorker();
|
||||||
|
worker.onmessage = (e) => {
|
||||||
|
stop_waiting();
|
||||||
|
let results = e.data;
|
||||||
|
let search_results = document.querySelector(".search-result");
|
||||||
|
search_results.innerHTML = "";
|
||||||
|
let f = (entry) => {
|
||||||
|
let search_result = document.createElement("a");
|
||||||
|
search_result.classList.add("search-entry");
|
||||||
|
search_result.href = base_url + entry.url;
|
||||||
|
search_result.innerHTML = entry.html;
|
||||||
|
search_results.appendChild(search_result);
|
||||||
|
};
|
||||||
|
results.forEach(f);
|
||||||
|
let search_request = document.querySelector(".search-bar").value;
|
||||||
|
if (results.length == 0 && search_request != "") {
|
||||||
|
let no_result = document.createElement("div");
|
||||||
|
no_result.classList.add("search-no-result");
|
||||||
|
no_result.innerText = "No result...";
|
||||||
|
search_results.appendChild(no_result);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
document.querySelector(".search-bar").addEventListener("input", (ev) => {
|
||||||
|
wait();
|
||||||
|
worker.postMessage(ev.target.value);
|
||||||
|
});
|
||||||
Loading…
Add table
Reference in a new issue