mirror of
https://git8.cs.fau.de/theses/bsc-leon-vatthauer.git
synced 2024-05-31 07:28:34 +02:00
43 lines
No EOL
11 KiB
HTML
43 lines
No EOL
11 KiB
HTML
<!DOCTYPE HTML>
|
||
<html><head><meta charset="utf-8"><title>Category.Monad</title><link rel="stylesheet" href="Agda.css"></head><body><pre class="Agda"><a id="1" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="74" class="Comment">-- The Agda standard library</a>
|
||
<a id="103" class="Comment">--</a>
|
||
<a id="106" class="Comment">-- Monads</a>
|
||
<a id="116" class="Comment">------------------------------------------------------------------------</a>
|
||
|
||
<a id="190" class="Comment">-- Note that currently the monad laws are not included here.</a>
|
||
|
||
<a id="252" class="Symbol">{-#</a> <a id="256" class="Keyword">OPTIONS</a> <a id="264" class="Pragma">--cubical-compatible</a> <a id="285" class="Pragma">--safe</a> <a id="292" class="Symbol">#-}</a>
|
||
|
||
<a id="297" class="Keyword">module</a> <a id="304" href="Category.Monad.html" class="Module">Category.Monad</a> <a id="319" class="Keyword">where</a>
|
||
|
||
<a id="326" class="Keyword">open</a> <a id="331" class="Keyword">import</a> <a id="338" href="Function.html" class="Module">Function</a>
|
||
<a id="347" class="Keyword">open</a> <a id="352" class="Keyword">import</a> <a id="359" href="Category.Monad.Indexed.html" class="Module">Category.Monad.Indexed</a>
|
||
<a id="382" class="Keyword">open</a> <a id="387" class="Keyword">import</a> <a id="394" href="Data.Unit.html" class="Module">Data.Unit</a>
|
||
<a id="404" class="Keyword">open</a> <a id="409" class="Keyword">import</a> <a id="416" href="Level.html" class="Module">Level</a>
|
||
|
||
<a id="423" class="Keyword">private</a>
|
||
<a id="433" class="Keyword">variable</a>
|
||
<a id="446" href="Category.Monad.html#446" class="Generalizable">f</a> <a id="448" class="Symbol">:</a> <a id="450" href="Agda.Primitive.html#591" class="Postulate">Level</a>
|
||
|
||
<a id="RawMonad"></a><a id="457" href="Category.Monad.html#457" class="Function">RawMonad</a> <a id="466" class="Symbol">:</a> <a id="468" class="Symbol">(</a><a id="469" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="473" href="Category.Monad.html#446" class="Generalizable">f</a> <a id="475" class="Symbol">→</a> <a id="477" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="481" href="Category.Monad.html#446" class="Generalizable">f</a><a id="482" class="Symbol">)</a> <a id="484" class="Symbol">→</a> <a id="486" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="490" class="Symbol">_</a>
|
||
<a id="492" href="Category.Monad.html#457" class="Function">RawMonad</a> <a id="501" href="Category.Monad.html#501" class="Bound">M</a> <a id="503" class="Symbol">=</a> <a id="505" href="Category.Monad.Indexed.html#528" class="Record">RawIMonad</a> <a id="515" class="Symbol">{</a><a id="516" class="Argument">I</a> <a id="518" class="Symbol">=</a> <a id="520" href="Agda.Builtin.Unit.html#158" class="Record">⊤</a><a id="521" class="Symbol">}</a> <a id="523" class="Symbol">(λ</a> <a id="526" href="Category.Monad.html#526" class="Bound">_</a> <a id="528" href="Category.Monad.html#528" class="Bound">_</a> <a id="530" class="Symbol">→</a> <a id="532" href="Category.Monad.html#501" class="Bound">M</a><a id="533" class="Symbol">)</a>
|
||
|
||
<a id="RawMonadT"></a><a id="536" href="Category.Monad.html#536" class="Function">RawMonadT</a> <a id="546" class="Symbol">:</a> <a id="548" class="Symbol">(</a><a id="549" href="Category.Monad.html#549" class="Bound">T</a> <a id="551" class="Symbol">:</a> <a id="553" class="Symbol">(</a><a id="554" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="558" href="Category.Monad.html#446" class="Generalizable">f</a> <a id="560" class="Symbol">→</a> <a id="562" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="566" href="Category.Monad.html#446" class="Generalizable">f</a><a id="567" class="Symbol">)</a> <a id="569" class="Symbol">→</a> <a id="571" class="Symbol">(</a><a id="572" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="576" href="Category.Monad.html#446" class="Generalizable">f</a> <a id="578" class="Symbol">→</a> <a id="580" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="584" href="Category.Monad.html#446" class="Generalizable">f</a><a id="585" class="Symbol">))</a> <a id="588" class="Symbol">→</a> <a id="590" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="594" class="Symbol">_</a>
|
||
<a id="596" href="Category.Monad.html#536" class="Function">RawMonadT</a> <a id="606" href="Category.Monad.html#606" class="Bound">T</a> <a id="608" class="Symbol">=</a> <a id="610" href="Category.Monad.Indexed.html#1349" class="Function">RawIMonadT</a> <a id="621" class="Symbol">{</a><a id="622" class="Argument">I</a> <a id="624" class="Symbol">=</a> <a id="626" href="Agda.Builtin.Unit.html#158" class="Record">⊤</a><a id="627" class="Symbol">}</a> <a id="629" class="Symbol">(λ</a> <a id="632" href="Category.Monad.html#632" class="Bound">M</a> <a id="634" href="Category.Monad.html#634" class="Bound">_</a> <a id="636" href="Category.Monad.html#636" class="Bound">_</a> <a id="638" class="Symbol">→</a> <a id="640" href="Category.Monad.html#606" class="Bound">T</a> <a id="642" class="Symbol">(</a><a id="643" href="Category.Monad.html#632" class="Bound">M</a> <a id="645" class="Symbol">_</a> <a id="647" class="Symbol">_))</a>
|
||
|
||
<a id="RawMonadZero"></a><a id="652" href="Category.Monad.html#652" class="Function">RawMonadZero</a> <a id="665" class="Symbol">:</a> <a id="667" class="Symbol">(</a><a id="668" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="672" href="Category.Monad.html#446" class="Generalizable">f</a> <a id="674" class="Symbol">→</a> <a id="676" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="680" href="Category.Monad.html#446" class="Generalizable">f</a><a id="681" class="Symbol">)</a> <a id="683" class="Symbol">→</a> <a id="685" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="689" class="Symbol">_</a>
|
||
<a id="691" href="Category.Monad.html#652" class="Function">RawMonadZero</a> <a id="704" href="Category.Monad.html#704" class="Bound">M</a> <a id="706" class="Symbol">=</a> <a id="708" href="Category.Monad.Indexed.html#1479" class="Record">RawIMonadZero</a> <a id="722" class="Symbol">{</a><a id="723" class="Argument">I</a> <a id="725" class="Symbol">=</a> <a id="727" href="Agda.Builtin.Unit.html#158" class="Record">⊤</a><a id="728" class="Symbol">}</a> <a id="730" class="Symbol">(λ</a> <a id="733" href="Category.Monad.html#733" class="Bound">_</a> <a id="735" href="Category.Monad.html#735" class="Bound">_</a> <a id="737" class="Symbol">→</a> <a id="739" href="Category.Monad.html#704" class="Bound">M</a><a id="740" class="Symbol">)</a>
|
||
|
||
<a id="RawMonadPlus"></a><a id="743" href="Category.Monad.html#743" class="Function">RawMonadPlus</a> <a id="756" class="Symbol">:</a> <a id="758" class="Symbol">(</a><a id="759" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="763" href="Category.Monad.html#446" class="Generalizable">f</a> <a id="765" class="Symbol">→</a> <a id="767" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="771" href="Category.Monad.html#446" class="Generalizable">f</a><a id="772" class="Symbol">)</a> <a id="774" class="Symbol">→</a> <a id="776" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="780" class="Symbol">_</a>
|
||
<a id="782" href="Category.Monad.html#743" class="Function">RawMonadPlus</a> <a id="795" href="Category.Monad.html#795" class="Bound">M</a> <a id="797" class="Symbol">=</a> <a id="799" href="Category.Monad.Indexed.html#1729" class="Record">RawIMonadPlus</a> <a id="813" class="Symbol">{</a><a id="814" class="Argument">I</a> <a id="816" class="Symbol">=</a> <a id="818" href="Agda.Builtin.Unit.html#158" class="Record">⊤</a><a id="819" class="Symbol">}</a> <a id="821" class="Symbol">(λ</a> <a id="824" href="Category.Monad.html#824" class="Bound">_</a> <a id="826" href="Category.Monad.html#826" class="Bound">_</a> <a id="828" class="Symbol">→</a> <a id="830" href="Category.Monad.html#795" class="Bound">M</a><a id="831" class="Symbol">)</a>
|
||
|
||
<a id="834" class="Keyword">module</a> <a id="RawMonad"></a><a id="841" href="Category.Monad.html#841" class="Module">RawMonad</a> <a id="850" class="Symbol">{</a><a id="851" href="Category.Monad.html#851" class="Bound">M</a> <a id="853" class="Symbol">:</a> <a id="855" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="859" href="Category.Monad.html#446" class="Generalizable">f</a> <a id="861" class="Symbol">→</a> <a id="863" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="867" href="Category.Monad.html#446" class="Generalizable">f</a><a id="868" class="Symbol">}</a> <a id="870" class="Symbol">(</a><a id="871" href="Category.Monad.html#871" class="Bound">Mon</a> <a id="875" class="Symbol">:</a> <a id="877" href="Category.Monad.html#457" class="Function">RawMonad</a> <a id="886" href="Category.Monad.html#851" class="Bound">M</a><a id="887" class="Symbol">)</a> <a id="889" class="Keyword">where</a>
|
||
<a id="897" class="Keyword">open</a> <a id="902" href="Category.Monad.Indexed.html#528" class="Module">RawIMonad</a> <a id="912" href="Category.Monad.html#871" class="Bound">Mon</a> <a id="916" class="Keyword">public</a>
|
||
|
||
<a id="924" class="Keyword">module</a> <a id="RawMonadZero"></a><a id="931" href="Category.Monad.html#931" class="Module">RawMonadZero</a> <a id="944" class="Symbol">{</a><a id="945" href="Category.Monad.html#945" class="Bound">M</a> <a id="947" class="Symbol">:</a> <a id="949" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="953" href="Category.Monad.html#446" class="Generalizable">f</a> <a id="955" class="Symbol">→</a> <a id="957" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="961" href="Category.Monad.html#446" class="Generalizable">f</a><a id="962" class="Symbol">}(</a><a id="964" href="Category.Monad.html#964" class="Bound">Mon</a> <a id="968" class="Symbol">:</a> <a id="970" href="Category.Monad.html#652" class="Function">RawMonadZero</a> <a id="983" href="Category.Monad.html#945" class="Bound">M</a><a id="984" class="Symbol">)</a> <a id="986" class="Keyword">where</a>
|
||
<a id="994" class="Keyword">open</a> <a id="999" href="Category.Monad.Indexed.html#1479" class="Module">RawIMonadZero</a> <a id="1013" href="Category.Monad.html#964" class="Bound">Mon</a> <a id="1017" class="Keyword">public</a>
|
||
|
||
<a id="1025" class="Keyword">module</a> <a id="RawMonadPlus"></a><a id="1032" href="Category.Monad.html#1032" class="Module">RawMonadPlus</a> <a id="1045" class="Symbol">{</a><a id="1046" href="Category.Monad.html#1046" class="Bound">M</a> <a id="1048" class="Symbol">:</a> <a id="1050" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1054" href="Category.Monad.html#446" class="Generalizable">f</a> <a id="1056" class="Symbol">→</a> <a id="1058" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1062" href="Category.Monad.html#446" class="Generalizable">f</a><a id="1063" class="Symbol">}</a> <a id="1065" class="Symbol">(</a><a id="1066" href="Category.Monad.html#1066" class="Bound">Mon</a> <a id="1070" class="Symbol">:</a> <a id="1072" href="Category.Monad.html#743" class="Function">RawMonadPlus</a> <a id="1085" href="Category.Monad.html#1046" class="Bound">M</a><a id="1086" class="Symbol">)</a> <a id="1088" class="Keyword">where</a>
|
||
<a id="1096" class="Keyword">open</a> <a id="1101" href="Category.Monad.Indexed.html#1729" class="Module">RawIMonadPlus</a> <a id="1115" href="Category.Monad.html#1066" class="Bound">Mon</a> <a id="1119" class="Keyword">public</a>
|
||
</pre></body></html> |