-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
61 changed files
with
36 additions
and
36 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>Deep (algaeff.Algaeff.Fun.Deep)</title><link rel="stylesheet" href="../../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">algaeff</a> » <a href="../../index.html">Algaeff</a> » <a href="../index.html">Fun</a> » Deep</nav><header class="odoc-preamble"><h1>Module <code><span>Fun.Deep</span></code></h1><p>Useful helper functions for deep handlers.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-finally"><a href="#val-finally" class="anchor"></a><code><span><span class="keyword">val</span> finally : <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <span class="xref-unresolved">Stdlib</span>.Effect.Deep.continuation</span> <span class="arrow">-></span></span> <span><span>(<span>unit <span class="arrow">-></span></span> <span class="type-var">'a</span>)</span> <span class="arrow">-></span></span> <span class="type-var">'b</span></span></code></div><div class="spec-doc"><p><code>finally f</code> runs the thunk <code>f</code> and calls <code>continue</code> if a value is returned and <code>discontinue</code> if an exception is raised. Here is an example that calls <code>List</code>.nth and then either returns the found element with <code>continue</code> or raises the exception <code>Not_found</code> with <code>discontinue</code>.</p><pre class="language-ocaml"><code>Algaeff.Fun.Deep.finally k @@ fun () -> List.nth elements n</code></pre></div></div></div></body></html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Deep (algaeff.Algaeff.Fun.Deep)</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">algaeff</a> » <a href="../../index.html">Algaeff</a> » <a href="../index.html">Fun</a> » Deep</nav><header class="odoc-preamble"><h1>Module <code><span>Fun.Deep</span></code></h1><p>Useful helper functions for deep handlers.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-finally"><a href="#val-finally" class="anchor"></a><code><span><span class="keyword">val</span> finally : <span><span><span>(<span class="type-var">'a</span>, <span class="type-var">'b</span>)</span> <span class="xref-unresolved">Stdlib</span>.Effect.Deep.continuation</span> <span class="arrow">-></span></span> <span><span>(<span>unit <span class="arrow">-></span></span> <span class="type-var">'a</span>)</span> <span class="arrow">-></span></span> <span class="type-var">'b</span></span></code></div><div class="spec-doc"><p><code>finally f</code> runs the thunk <code>f</code> and calls <code>continue</code> if a value is returned and <code>discontinue</code> if an exception is raised. Here is an example that calls <code>List</code>.nth and then either returns the found element with <code>continue</code> or raises the exception <code>Not_found</code> with <code>discontinue</code>.</p><pre class="language-ocaml"><code>Algaeff.Fun.Deep.finally k @@ fun () -> List.nth elements n</code></pre></div></div></div></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>Fun (algaeff.Algaeff.Fun)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">algaeff</a> » <a href="../index.html">Algaeff</a> » Fun</nav><header class="odoc-preamble"><h1>Module <code><span>Algaeff.Fun</span></code></h1><p>Useful helper functions around effects.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Deep"><a href="#module-Deep" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Deep/index.html">Deep</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Useful helper functions for deep handlers.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Shallow"><a href="#module-Shallow" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Shallow/index.html">Shallow</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Useful helper functions for shallow handlers.</p></div></div></div></body></html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Fun (algaeff.Algaeff.Fun)</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">algaeff</a> » <a href="../index.html">Algaeff</a> » Fun</nav><header class="odoc-preamble"><h1>Module <code><span>Algaeff.Fun</span></code></h1><p>Useful helper functions around effects.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec module anchored" id="module-Deep"><a href="#module-Deep" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Deep/index.html">Deep</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Useful helper functions for deep handlers.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Shallow"><a href="#module-Shallow" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Shallow/index.html">Shallow</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Useful helper functions for shallow handlers.</p></div></div></div></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>Make (algaeff.Algaeff.Mutex.Make)</title><link rel="stylesheet" href="../../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../../index.html">algaeff</a> » <a href="../../index.html">Algaeff</a> » <a href="../index.html">Mutex</a> » Make</nav><header class="odoc-preamble"><h1>Module <code><span>Mutex.Make</span></code></h1><p>The implementation of mutex effects. <code>Make</code> is generative so that one can use multiple mutexes at the same time.</p><p>The signature of mutex effects.</p></header><nav class="odoc-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-spec"><div class="spec exception anchored" id="exception-Locked"><a href="#exception-Locked" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Locked</span></span></code></div><div class="spec-doc"><p>The exception raised by <a href="#val-exclusively"><code>exclusively</code></a> if the mutex was locked.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-exclusively"><a href="#val-exclusively" class="anchor"></a><code><span><span class="keyword">val</span> exclusively : <span><span>(<span>unit <span class="arrow">-></span></span> <span class="type-var">'a</span>)</span> <span class="arrow">-></span></span> <span class="type-var">'a</span></span></code></div><div class="spec-doc"><p><code>exclusively f</code> locks the mutex, run the thunk <code>f</code>, and then unlock the mutex. If the mutex was already locked, <code>exclusively f</code> immediately raises <a href="#exception-Locked"><code>Locked</code></a> without waiting. Note that calling <code>exclusively</code> inside <code>f</code> is an instance of attempting to lock an already locked mutex.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <span class="value">Locked</span> <p>The mutex was already locked.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-run"><a href="#val-run" class="anchor"></a><code><span><span class="keyword">val</span> run : <span><span>(<span>unit <span class="arrow">-></span></span> <span class="type-var">'a</span>)</span> <span class="arrow">-></span></span> <span class="type-var">'a</span></span></code></div><div class="spec-doc"><p><code>run f</code> executes the thunk <code>f</code> which may perform mutex effects. Each call of <code>run</code> creates a fresh mutex; in particular, calling <code>run</code> inside the thunk <code>f</code> will start a new scope that does not interfere with the outer scope.</p></div></div></div></body></html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Make (algaeff.Algaeff.Mutex.Make)</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">algaeff</a> » <a href="../../index.html">Algaeff</a> » <a href="../index.html">Mutex</a> » Make</nav><header class="odoc-preamble"><h1>Module <code><span>Mutex.Make</span></code></h1><p>The implementation of mutex effects. <code>Make</code> is generative so that one can use multiple mutexes at the same time.</p><p>The signature of mutex effects.</p></header><nav class="odoc-toc"><ul><li><a href="#parameters">Parameters</a></li><li><a href="#signature">Signature</a></li></ul></nav><div class="odoc-content"><h2 id="parameters"><a href="#parameters" class="anchor"></a>Parameters</h2><h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2><div class="odoc-spec"><div class="spec exception anchored" id="exception-Locked"><a href="#exception-Locked" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Locked</span></span></code></div><div class="spec-doc"><p>The exception raised by <a href="#val-exclusively"><code>exclusively</code></a> if the mutex was locked.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-exclusively"><a href="#val-exclusively" class="anchor"></a><code><span><span class="keyword">val</span> exclusively : <span><span>(<span>unit <span class="arrow">-></span></span> <span class="type-var">'a</span>)</span> <span class="arrow">-></span></span> <span class="type-var">'a</span></span></code></div><div class="spec-doc"><p><code>exclusively f</code> locks the mutex, run the thunk <code>f</code>, and then unlock the mutex. If the mutex was already locked, <code>exclusively f</code> immediately raises <a href="#exception-Locked"><code>Locked</code></a> without waiting. Note that calling <code>exclusively</code> inside <code>f</code> is an instance of attempting to lock an already locked mutex.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <span class="value">Locked</span> <p>The mutex was already locked.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-run"><a href="#val-run" class="anchor"></a><code><span><span class="keyword">val</span> run : <span><span>(<span>unit <span class="arrow">-></span></span> <span class="type-var">'a</span>)</span> <span class="arrow">-></span></span> <span class="type-var">'a</span></span></code></div><div class="spec-doc"><p><code>run f</code> executes the thunk <code>f</code> which may perform mutex effects. Each call of <code>run</code> creates a fresh mutex; in particular, calling <code>run</code> inside the thunk <code>f</code> will start a new scope that does not interfere with the outer scope.</p></div></div></div></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.