Deployed 4dd247b to master with MkDocs 1.2.4 and mike 1.1.2

This commit is contained in:
GitHub Action
2022-07-06 11:16:24 +00:00
parent 4478a9306b
commit 0f96020f0d
26 changed files with 1534 additions and 1041 deletions
+87 -53
View File
@@ -10,7 +10,7 @@
<link rel="icon" href="../favicon.png">
<meta name="generator" content="mkdocs-1.2.4, mkdocs-material-7.1.9">
<meta name="generator" content="mkdocs-1.2.4, mkdocs-material-7.3.6">
@@ -18,10 +18,10 @@
<link rel="stylesheet" href="../assets/stylesheets/main.ca7ac06f.min.css">
<link rel="stylesheet" href="../assets/stylesheets/main.a57b2b03.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.f1a3b89f.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.3f5d1f46.min.css">
@@ -74,7 +74,9 @@
</div>
<header class="md-header" data-md-component="header">
<header class="md-header" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href=".." title="æternity Sophia Language" class="md-header__button md-logo" aria-label="æternity Sophia Language" data-md-component="logo">
@@ -134,14 +136,24 @@
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
</label>
<button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
</button>
<nav class="md-search__options" aria-label="Search">
<a href="javascript:void(0)" class="md-search__icon md-icon" aria-label="Share" data-clipboard data-clipboard-text="" data-md-component="search-share" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7 0-.24-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9a3 3 0 0 0-3 3 3 3 0 0 0 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.15c-.05.21-.08.43-.08.66 0 1.61 1.31 2.91 2.92 2.91 1.61 0 2.92-1.3 2.92-2.91A2.92 2.92 0 0 0 18 16.08z"/></svg>
</a>
<button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
</button>
</nav>
<div class="md-search__suggest" data-md-component="search-suggest"></div>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
@@ -171,12 +183,15 @@
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
@@ -317,6 +332,8 @@
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
@@ -811,6 +828,8 @@
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
@@ -1307,10 +1326,12 @@ and this project adheres to <a href="https://semver.org/spec/v2.0.0.html">Semant
<ul>
<li>Compiler warnings for the follwing: shadowing, negative spends, division by zero, unused functions, unused includes, unused stateful annotations, unused variables, unused parameters, unused user-defined type, dead return value.</li>
<li>The pipe operator |&gt;
<code>[1, 2, 3] |&gt; List.first |&gt; Option.is_some // Option.is_some(List.first([1, 2, 3]))</code></li>
<div class="highlight"><pre><span></span><code>[1, 2, 3] |&gt; List.first |&gt; Option.is_some // Option.is_some(List.first([1, 2, 3]))
</code></pre></div></li>
<li>Allow binary operators to be used as lambdas
<code>function sum(l : list(int)) : int = foldl((+), 0, l)
function logical_and(x, y) = (&amp;&amp;)(x, y)</code></li>
<div class="highlight"><pre><span></span><code>function sum(l : list(int)) : int = foldl((+), 0, l)
function logical_and(x, y) = (&amp;&amp;)(x, y)
</code></pre></div></li>
</ul>
<h3 id="changed">Changed</h3>
<ul>
@@ -1332,12 +1353,14 @@ and this project adheres to <a href="https://semver.org/spec/v2.0.0.html">Semant
<li>Add builtin types (<code>AENS.name, AENS.pointee, Chain.ttl, Chain.base_tx, Chain.ga_meta_tx, Chain.paying_for_tx</code>) to
the calldata and result decoder</li>
<li>Patterns guards
<code>switch(x)
a::[] | a &gt; 10 =&gt; 1
_ =&gt; 2</code>
<code>function
f(a::[]) | a &gt; 10 = 1
f(_) = 2</code></li>
<div class="highlight"><pre><span></span><code>switch(x)
a::[] | a &gt; 10 =&gt; 1
_ =&gt; 2
</code></pre></div>
<div class="highlight"><pre><span></span><code>function
f(a::[]) | a &gt; 10 = 1
f(_) = 2
</code></pre></div></li>
</ul>
<h3 id="changed_1">Changed</h3>
<ul>
@@ -1381,10 +1404,11 @@ and this project adheres to <a href="https://semver.org/spec/v2.0.0.html">Semant
has been added. Use it by <code>include "String.aes"</code>. It includes functions for
turning strings into lists of characters for detailed manipulation. For
example:
<code>include "String.aes"
contract C =
entrypoint filter_all_a(s: string) : string =
String.from_list(List.filter((c : char) =&gt; c != 'a', String.to_list(s)))</code>
<div class="highlight"><pre><span></span><code>include &quot;String.aes&quot;
contract C =
entrypoint filter_all_a(s: string) : string =
String.from_list(List.filter((c : char) =&gt; c != &#39;a&#39;, String.to_list(s)))
</code></pre></div>
will return a list with all <code>a</code>'s removed.</li>
</ul>
<p>There are also convenience functions <code>split</code>, <code>concat</code>, <code>to_upper</code>,
@@ -1416,13 +1440,14 @@ and this project adheres to <a href="https://semver.org/spec/v2.0.0.html">Semant
transaction and the transaction hash is available <code>Auth.tx</code>, it is only
available during authentication if invoked by a normal contract call
it returns <code>None</code>. Example:
<code>switch(Auth.tx)
None =&gt; abort("Not in Auth context")
Some(tx0) =&gt;
switch(tx0.tx)
Chain.SpendTx(_, amount, _) =&gt; amount &gt; 400
Chain.ContractCallTx(_, _) =&gt; true
_ =&gt; false</code>
<div class="highlight"><pre><span></span><code>switch(Auth.tx)
None =&gt; abort(&quot;Not in Auth context&quot;)
Some(tx0) =&gt;
switch(tx0.tx)
Chain.SpendTx(_, amount, _) =&gt; amount &gt; 400
Chain.ContractCallTx(_, _) =&gt; true
_ =&gt; false
</code></pre></div>
- A debug mode is a added to the compiler. Right now its only use is to
turn off hermetization.</p>
<h3 id="changed_5">Changed</h3>
@@ -1471,18 +1496,21 @@ and this project adheres to <a href="https://semver.org/spec/v2.0.0.html">Semant
<ul>
<li>Allow separate entrypoint/function type signature and definition, and pattern
matching in left-hand sides:
<code>function
length : list('a) =&gt; int
length([]) = 0
length(x :: xs) = 1 + length(xs)</code></li>
<div class="highlight"><pre><span></span><code> function
length : list(&#39;a) =&gt; int
length([]) = 0
length(x :: xs) = 1 + length(xs)
</code></pre></div></li>
<li>Allow pattern matching in list comprehension generators (filtering out match
failures):
<code>function somes(xs : list(option('a))) : list('a) =
[ x | Some(x) &lt;- xs ]</code></li>
<div class="highlight"><pre><span></span><code> function somes(xs : list(option(&#39;a))) : list(&#39;a) =
[ x | Some(x) &lt;- xs ]
</code></pre></div></li>
<li>Allow pattern matching in let-bindings (aborting on match failures):
<code>function test(m : map(int, int)) =
let Some(x) = Map.lookup(m, 0)
x</code></li>
<div class="highlight"><pre><span></span><code> function test(m : map(int, int)) =
let Some(x) = Map.lookup(m, 0)
x
</code></pre></div></li>
</ul>
<h3 id="changed_7">Changed</h3>
<ul>
@@ -1521,8 +1549,9 @@ and this project adheres to <a href="https://semver.org/spec/v2.0.0.html">Semant
and verifying an Ethereum address for a message hash and a signature.</li>
<li>Sophia supports list comprehensions known from languages like Python, Haskell or Erlang.
Example syntax:
<code>[x + y | x &lt;- [1,2,3,4,5], let k = x*x, if (k &gt; 5), y &lt;- [k, k+1, k+2]]
// yields [12,13,14,20,21,22,30,31,32]</code></li>
<div class="highlight"><pre><span></span><code>[x + y | x &lt;- [1,2,3,4,5], let k = x*x, if (k &gt; 5), y &lt;- [k, k+1, k+2]]
// yields [12,13,14,20,21,22,30,31,32]
</code></pre></div></li>
<li>A new contract, and endpoint, modifier <code>payable</code> is introduced. Contracts, and enpoints,
that shall be able to receive funds should be marked as payable. <code>Address.is_payable(a)</code>
can be used to check if an (contract) address is payable or not.</li>
@@ -1560,21 +1589,24 @@ and this project adheres to <a href="https://semver.org/spec/v2.0.0.html">Semant
<h3 id="added_8">Added</h3>
<ul>
<li>New builtin function <code>require : (bool, string) =&gt; ()</code>. Defined as
<code>function require(b, err) = if(!b) abort(err)</code></li>
<div class="highlight"><pre><span></span><code>function require(b, err) = if(!b) abort(err)
</code></pre></div></li>
<li>New builtin functions
<code>Bytes.to_str : bytes(_) =&gt; string
Bytes.to_int : bytes(_) =&gt; int</code>
<div class="highlight"><pre><span></span><code>Bytes.to_str : bytes(_) =&gt; string
Bytes.to_int : bytes(_) =&gt; int
</code></pre></div>
for converting a byte array to a hex string and interpreting it as a
big-endian encoded integer respectively.</li>
</ul>
<h3 id="changed_10">Changed</h3>
<ul>
<li>Public contract functions must now be declared as <em>entrypoints</em>:
<code>contract Example =
// Exported
entrypoint exported_fun(x) = local_fun(x)
// Not exported
function local_fun(x) = x</code>
<div class="highlight"><pre><span></span><code>contract Example =
// Exported
entrypoint exported_fun(x) = local_fun(x)
// Not exported
function local_fun(x) = x
</code></pre></div>
Functions in namespaces still use <code>function</code> (and <code>private function</code> for
private functions).</li>
<li>The return type of <code>Chain.block_hash(height)</code> has changed, it used to
@@ -1699,10 +1731,12 @@ and this project adheres to <a href="https://semver.org/spec/v2.0.0.html">Semant
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
@@ -1714,10 +1748,10 @@ and this project adheres to <a href="https://semver.org/spec/v2.0.0.html">Semant
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "..", "features": ["content.tabs.link", "search.highlight", "search.share", "search.suggest"], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "../assets/javascripts/workers/search.477d984a.min.js", "version": {"provider": "mike"}}</script>
<script id="__config" type="application/json">{"base": "..", "features": ["content.tabs.link", "search.highlight", "search.share", "search.suggest"], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "../assets/javascripts/workers/search.fcfe8b6d.min.js", "version": {"provider": "mike"}}</script>
<script src="../assets/javascripts/bundle.82b56eb2.min.js"></script>
<script src="../assets/javascripts/bundle.b1047164.min.js"></script>
</body>