Skip to content

Commit

Permalink
Update gh-pages
Browse files Browse the repository at this point in the history
Store path: /nix/store/lp7aw976ikjm7jzw20c091zynzhi3aiw-combined-docs
  • Loading branch information
hercules-ci[bot] committed Nov 21, 2024
1 parent 1f5b553 commit fceae04
Show file tree
Hide file tree
Showing 194 changed files with 18,797 additions and 19,253 deletions.
Binary file modified 01-index.tar
Binary file not shown.
Binary file modified 01-index.tar.gz
Binary file not shown.
7 changes: 4 additions & 3 deletions Concepts/GenericProgramming.html
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,11 @@ <h2 id="intro"><a class="header" href="#intro">Intro</a></h2>
<code>PlutusType</code> typeclass serves 2 purposes:</p>
<ol>
<li>Adds derivation via anyclass for Haskell ADTs</li>
<li>Manipulates given <code>PType</code> on its internal representation (provided as type <code>PInner</code>), rather than parsing/constructing the datatype back and forth.</li>
<li>Manipulates given <code>S -&gt; Type</code> on its internal representation (provided as type <code>PInner</code>),
rather than parsing/constructing the datatype back and forth.</li>
</ol>
<p>Examples on how to derive <code>PlutusType</code> to either Data or Scott encoding:</p>
<pre><code class="language-haskell">data MyType (a :: PType) (b :: PType) (s :: S)
<pre><code class="language-haskell">data MyType (a :: S -&gt; Type) (b :: S -&gt; Type) (s :: S)
= One (Term s a)
| Two (Term s b)
deriving stock Generic
Expand All @@ -266,7 +267,7 @@ <h2 id="intro"><a class="header" href="#intro">Intro</a></h2>

-- If you instead want to use data encoding, you should derive 'PlutusType' and provide data strategy:

data MyTypeD (a :: PType) (b :: PType) (s :: S)
data MyTypeD (a :: S -&gt; Type) (b :: S -&gt; Type) (s :: S)
= OneD (Term s (PDataRecord '[ "_0" ':= a ]))
| TwoD (Term s (PDataRecord '[ "_0" ':= b ]))
deriving stock Generic
Expand Down
2 changes: 1 addition & 1 deletion Run.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ <h1 class="menu-title"></h1>
import Data.Bifunctor (first)
import Data.ByteString.Short (ShortByteString)
import Data.Text (Text, pack)
import Plutarch (ClosedTerm, compile)
import Plutarch.Internal.Term (ClosedTerm, compile)
import Plutarch.Script (Script (unScript), serialiseScript)
import Plutarch.Evaluate (evalScript, applyArguments)
import PlutusLedgerApi.V1 (Data, ExBudget)
Expand Down
2 changes: 1 addition & 1 deletion Tricks/UsingHaskellLevelFunctions.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ <h1 id="when-to-use-haskell-level-functions"><a class="header" href="#when-to-us
</code></pre>
<p>Extra <code>plam</code>s and <code>#</code>s have been introduced. Really, <code>pelimList</code> could have taken a Haskell level function instead:</p>
<pre><code class="language-haskell">pelimList' ::
forall (a :: PType) (r :: PType) (s :: S).
forall (a :: S -&gt; Type) (r :: S -&gt; Type) (s :: S).
PElemConstraint PBuiltinList a
=&gt; (Term s a -&gt; Term s (PBuiltinList a) -&gt; Term s r)
-&gt; Term s r -&gt; Term s (PBuiltinList a)
Expand Down
6 changes: 3 additions & 3 deletions Typeclasses/PlutusType,PCon,PMatch.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ <h1 id="plutustype"><a class="header" href="#plutustype"><code>PlutusType</code>
<p>NOTE: It's essentially a combination of <code>PCon</code> (for term construction) and <code>PMatch</code> (for term deconstruction). Nowadays, <code>PCon</code> and <code>PMatch</code> are actually both
just an alias for <code>PlutusType</code> and you'll get a deprecation warning if you use them.</p>
</blockquote>
<pre><code class="language-hs">class PlutusType (a :: PType) where
<pre><code class="language-hs">class PlutusType (a :: S -&gt; Type) where
{-
snip
-}
Expand Down Expand Up @@ -217,7 +217,7 @@ <h1 id="plutustype"><a class="header" href="#plutustype"><code>PlutusType</code>
<h2 id="implementing-plutustype-for-your-own-types-scott-encoding"><a class="header" href="#implementing-plutustype-for-your-own-types-scott-encoding">Implementing <code>PlutusType</code> for your own types (Scott Encoding)</a></h2>
<p>If you want to represent your data type with <a href="./../Concepts/DataAndScottEncoding.html#scott-encoding">Scott encoding</a> (and therefore
don't need to make it <code>Data</code> encoded), you should simply derive it generically:</p>
<pre><code class="language-haskell">data PMyType (a :: PType) (b :: PType) (s :: S)
<pre><code class="language-haskell">data PMyType (a :: S -&gt; Type) (b :: S -&gt; Type) (s :: S)
= POne (Term s a)
| PTwo (Term s b)
deriving stock (Generic)
Expand All @@ -232,7 +232,7 @@ <h2 id="implementing-plutustype-for-your-own-types-scott-encoding"><a class="hea
<h2 id="implementing-plutustype-for-your-own-types-data-encoding"><a class="header" href="#implementing-plutustype-for-your-own-types-data-encoding">Implementing <code>PlutusType</code> for your own types (<code>Data</code> Encoding)</a></h2>
<p>If your type is supposed to be represented using <a href="./../Concepts/DataAndScottEncoding.html#data-encoding"><code>Data</code> encoding</a> instead,
you can derive <code>PlutusType</code> via <code>PlutusTypeData</code>:</p>
<pre><code class="language-haskell">data PMyTypeData (a :: PType) (b :: PType) (s :: S)
<pre><code class="language-haskell">data PMyTypeData (a :: S -&gt; Type) (b :: S -&gt; Type) (s :: S)
= POneD (Term s (PDataRecord '[ "_0" ':= a ]))
| PTwoD (Term s (PDataRecord '[ "_0" ':= b ]))
deriving stock Generic
Expand Down
2 changes: 1 addition & 1 deletion Usage/DerivingWithGenerics.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ <h1 class="menu-title"></h1>
</details>
<h1 id="deriving-typeclasses-with-generics"><a class="header" href="#deriving-typeclasses-with-generics">Deriving typeclasses with generics</a></h1>
<p>Plutarch also provides sophisticated generic deriving support for completely custom types. In particular, you can easily derive <code>PlutusType</code> for your own type:</p>
<pre><code class="language-haskell">data PMyType (a :: PType) (b :: PType) (s :: S)
<pre><code class="language-haskell">data PMyType (a :: S -&gt; Type) (b :: S -&gt; Type) (s :: S)
= POne (Term s a)
| PTwo (Term s b)
deriving stock Generic
Expand Down
2 changes: 1 addition & 1 deletion haddock/doc-index-35.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title> (Index - #)</title><link href="linuwial.css" rel="stylesheet" type="text/css" title="Linuwial" /><link rel="stylesheet" type="text/css" href="quick-jump.css" /><link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" /><script src="haddock-bundle.min.js" async="async" type="text/javascript"></script><script type="text/x-mathjax-config">MathJax.Hub.Config({ tex2jax: { processClass: "mathjax", ignoreClass: ".*" } });</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script></head><body><div id="package-header"><span class="caption empty">&nbsp;</span><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-J.html">J</a></li><li><a href="doc-index-K.html">K</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-X.html">X</a></li><li><a href="doc-index-Z.html">Z</a></li><li><a href="doc-index-58.html">:</a></li><li><a href="doc-index-33.html">!</a></li><li><a href="doc-index-35.html">#</a></li><li><a href="doc-index-36.html">$</a></li><li><a href="doc-index-37.html">%</a></li><li><a href="doc-index-38.html">&amp;</a></li><li><a href="doc-index-42.html">*</a></li><li><a href="doc-index-43.html">+</a></li><li><a href="doc-index-46.html">.</a></li><li><a href="doc-index-47.html">/</a></li><li><a href="doc-index-60.html">&lt;</a></li><li><a href="doc-index-61.html">=</a></li><li><a href="doc-index-62.html">&gt;</a></li><li><a href="doc-index-63.html">?</a></li><li><a href="doc-index-64.html">@</a></li><li><a href="doc-index-92.html">\</a></li><li><a href="doc-index-94.html">^</a></li><li><a href="doc-index-124.html">|</a></li><li><a href="doc-index-45.html">-</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - #</p><table><tr><td class="src">#</td><td class="module"><a href="./plutarch/html/Plutarch-Internal.html#v:-35-" title="Plutarch.Internal">Plutarch.Internal</a>, <a href="./plutarch/html/Plutarch.html#v:-35-" title="Plutarch">Plutarch</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#!!</td><td class="module"><a href="./plutarch/html/Plutarch-List.html#v:-35--33--33-" title="Plutarch.List">Plutarch.List</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--33--33-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#$</td><td class="module"><a href="./plutarch/html/Plutarch-Internal.html#v:-35--36-" title="Plutarch.Internal">Plutarch.Internal</a>, <a href="./plutarch/html/Plutarch.html#v:-35--36-" title="Plutarch">Plutarch</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--36-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#&amp;&amp;</td><td class="module"><a href="./plutarch/html/Plutarch-Bool.html#v:-35--38--38-" title="Plutarch.Bool">Plutarch.Bool</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--38--38-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#*</td><td class="module"><a href="./plutarch/html/Plutarch-Num.html#v:-35--42-" title="Plutarch.Num">Plutarch.Num</a></td></tr><tr><td class="src">#+</td><td class="module"><a href="./plutarch/html/Plutarch-Num.html#v:-35--43-" title="Plutarch.Num">Plutarch.Num</a></td></tr><tr><td class="src">#-</td><td class="module"><a href="./plutarch/html/Plutarch-Num.html#v:-35--45-" title="Plutarch.Num">Plutarch.Num</a></td></tr><tr><td class="src">#/</td><td class="module"><a href="./plutarch/html/Plutarch-Rational.html#v:-35--47-" title="Plutarch.Rational">Plutarch.Rational</a></td></tr><tr><td class="src">#&lt;</td><td class="module"><a href="./plutarch/html/Plutarch-Bool.html#v:-35--60-" title="Plutarch.Bool">Plutarch.Bool</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--60-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#&lt;=</td><td class="module"><a href="./plutarch/html/Plutarch-Bool.html#v:-35--60--61-" title="Plutarch.Bool">Plutarch.Bool</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--60--61-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#==</td><td class="module"><a href="./plutarch/html/Plutarch-Bool.html#v:-35--61--61-" title="Plutarch.Bool">Plutarch.Bool</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--61--61-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#&gt;</td><td class="module"><a href="./plutarch/html/Plutarch-Bool.html#v:-35--62-" title="Plutarch.Bool">Plutarch.Bool</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--62-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#&gt;=</td><td class="module"><a href="./plutarch/html/Plutarch-Bool.html#v:-35--62--61-" title="Plutarch.Bool">Plutarch.Bool</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--62--61-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#||</td><td class="module"><a href="./plutarch/html/Plutarch-Bool.html#v:-35--124--124-" title="Plutarch.Bool">Plutarch.Bool</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--124--124-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.29.2</p></div></body></html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title> (Index - #)</title><link href="linuwial.css" rel="stylesheet" type="text/css" title="Linuwial" /><link rel="stylesheet" type="text/css" href="quick-jump.css" /><link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" /><script src="haddock-bundle.min.js" async="async" type="text/javascript"></script><script type="text/x-mathjax-config">MathJax.Hub.Config({ tex2jax: { processClass: "mathjax", ignoreClass: ".*" } });</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script></head><body><div id="package-header"><span class="caption empty">&nbsp;</span><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul></div><div id="content"><div id="alphabet"><ul><li><a href="doc-index-A.html">A</a></li><li><a href="doc-index-B.html">B</a></li><li><a href="doc-index-C.html">C</a></li><li><a href="doc-index-D.html">D</a></li><li><a href="doc-index-E.html">E</a></li><li><a href="doc-index-F.html">F</a></li><li><a href="doc-index-G.html">G</a></li><li><a href="doc-index-H.html">H</a></li><li><a href="doc-index-I.html">I</a></li><li><a href="doc-index-J.html">J</a></li><li><a href="doc-index-K.html">K</a></li><li><a href="doc-index-L.html">L</a></li><li><a href="doc-index-M.html">M</a></li><li><a href="doc-index-N.html">N</a></li><li><a href="doc-index-O.html">O</a></li><li><a href="doc-index-P.html">P</a></li><li><a href="doc-index-Q.html">Q</a></li><li><a href="doc-index-R.html">R</a></li><li><a href="doc-index-S.html">S</a></li><li><a href="doc-index-T.html">T</a></li><li><a href="doc-index-U.html">U</a></li><li><a href="doc-index-V.html">V</a></li><li><a href="doc-index-W.html">W</a></li><li><a href="doc-index-X.html">X</a></li><li><a href="doc-index-Z.html">Z</a></li><li><a href="doc-index-58.html">:</a></li><li><a href="doc-index-33.html">!</a></li><li><a href="doc-index-35.html">#</a></li><li><a href="doc-index-36.html">$</a></li><li><a href="doc-index-37.html">%</a></li><li><a href="doc-index-38.html">&amp;</a></li><li><a href="doc-index-42.html">*</a></li><li><a href="doc-index-43.html">+</a></li><li><a href="doc-index-46.html">.</a></li><li><a href="doc-index-47.html">/</a></li><li><a href="doc-index-60.html">&lt;</a></li><li><a href="doc-index-61.html">=</a></li><li><a href="doc-index-62.html">&gt;</a></li><li><a href="doc-index-63.html">?</a></li><li><a href="doc-index-64.html">@</a></li><li><a href="doc-index-92.html">\</a></li><li><a href="doc-index-94.html">^</a></li><li><a href="doc-index-124.html">|</a></li><li><a href="doc-index-45.html">-</a></li><li><a href="doc-index-95.html">_</a></li><li><a href="doc-index-All.html">All</a></li></ul></div><div id="index"><p class="caption">Index - #</p><table><tr><td class="src">#</td><td class="module"><a href="./plutarch/html/Plutarch-Internal-Term.html#v:-35-" title="Plutarch.Internal.Term">Plutarch.Internal.Term</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#!!</td><td class="module"><a href="./plutarch/html/Plutarch-List.html#v:-35--33--33-" title="Plutarch.List">Plutarch.List</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--33--33-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#$</td><td class="module"><a href="./plutarch/html/Plutarch-Internal-Term.html#v:-35--36-" title="Plutarch.Internal.Term">Plutarch.Internal.Term</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--36-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#&amp;&amp;</td><td class="module"><a href="./plutarch/html/Plutarch-Bool.html#v:-35--38--38-" title="Plutarch.Bool">Plutarch.Bool</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--38--38-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#*</td><td class="module"><a href="./plutarch/html/Plutarch-Num.html#v:-35--42-" title="Plutarch.Num">Plutarch.Num</a></td></tr><tr><td class="src">#+</td><td class="module"><a href="./plutarch/html/Plutarch-Num.html#v:-35--43-" title="Plutarch.Num">Plutarch.Num</a></td></tr><tr><td class="src">#-</td><td class="module"><a href="./plutarch/html/Plutarch-Num.html#v:-35--45-" title="Plutarch.Num">Plutarch.Num</a></td></tr><tr><td class="src">#/</td><td class="module"><a href="./plutarch/html/Plutarch-Rational.html#v:-35--47-" title="Plutarch.Rational">Plutarch.Rational</a></td></tr><tr><td class="src">#&lt;</td><td class="module"><a href="./plutarch/html/Plutarch-Bool.html#v:-35--60-" title="Plutarch.Bool">Plutarch.Bool</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--60-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#&lt;=</td><td class="module"><a href="./plutarch/html/Plutarch-Bool.html#v:-35--60--61-" title="Plutarch.Bool">Plutarch.Bool</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--60--61-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#==</td><td class="module"><a href="./plutarch/html/Plutarch-Bool.html#v:-35--61--61-" title="Plutarch.Bool">Plutarch.Bool</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--61--61-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#&gt;</td><td class="module"><a href="./plutarch/html/Plutarch-Bool.html#v:-35--62-" title="Plutarch.Bool">Plutarch.Bool</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--62-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#&gt;=</td><td class="module"><a href="./plutarch/html/Plutarch-Bool.html#v:-35--62--61-" title="Plutarch.Bool">Plutarch.Bool</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--62--61-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr><tr><td class="src">#||</td><td class="module"><a href="./plutarch/html/Plutarch-Bool.html#v:-35--124--124-" title="Plutarch.Bool">Plutarch.Bool</a>, <a href="./plutarch/html/Plutarch-Prelude.html#v:-35--124--124-" title="Plutarch.Prelude">Plutarch.Prelude</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.29.2</p></div></body></html>
Loading

0 comments on commit fceae04

Please sign in to comment.