1. Austin Seipp
  2. hs-asai

Commits

Austin Seipp  committed a247012

Update documentation.

Signed-off-by: Austin Seipp <mad.one@gmail.com>

  • Participants
  • Parent commits c4b1311
  • Branches gh-pages

Comments (0)

Files changed (3)

File doc/Control-Indexed-Monad.html

View file
 window.onload = function () {pageLoad();setSynopsis("mini_Control-Indexed-Monad.html");};
 //]]>
 </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Indexed-Monad.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">asai-0.0.0.0: A minimal library for delimited continuations.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>mad.one@gmail.com</td></tr><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Control.Indexed.Monad</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Parameterized monads
+</a><ul><li><a href="#g:2">Lifting ordinary monads
+</a></li></ul></li><li><a href="#g:3">Operators
 </a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Parameterized monads.
 </p><p>When using GHC with <code>RebindableSyntax</code>, it's possible to overload
  regular <code>do</code>-notation to use the <code><a href="Control-Indexed-Monad.html#t:Monad-39-">Monad'</a></code> typeclass.
 </p></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:MW" class="def">MW</a> m p q a <a href="src/Control-Indexed-Monad.html#MW" class="link">Source</a></p><div class="doc"><p>This type lifts any regular monad into a parameterized monad.
 </p></div><div class="subs instances"><p id="control.i:MW" class="caption collapser" onclick="toggleSection('i:MW')">Instances</p><div id="section.i:MW" class="show"><table><tr><td class="src"><a href="/usr/local/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Control-Indexed-Monad.html#t:Monad-39-">Monad'</a> (<a href="Control-Indexed-Monad.html#t:MW">MW</a> m)</td><td class="doc"><p>This instances simply lifts regular instances of <code><a href="/usr/local/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a></code>
  into instances of <code><a href="Control-Indexed-Monad.html#t:Monad-39-">Monad'</a></code>.
-</p></td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:lift" class="def">lift</a> :: <a href="/usr/local/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m a -&gt; <a href="Control-Indexed-Monad.html#t:MW">MW</a> m p q a<a href="src/Control-Indexed-Monad.html#lift" class="link">Source</a></p><div class="doc"><p>This method 'lifts' a regular monad into a parameterized monad
+</p></td></tr></table></div></div></div><h2 id="g:2">Lifting ordinary monads
+</h2><div class="top"><p class="src"><a name="v:lift" class="def">lift</a> :: <a href="/usr/local/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m a -&gt; <a href="Control-Indexed-Monad.html#t:MW">MW</a> m p q a<a href="src/Control-Indexed-Monad.html#lift" class="link">Source</a></p><div class="doc"><p>This method 'lifts' a regular monad into a parameterized monad
  <code><a href="Control-Indexed-Monad.html#t:MW">MW</a></code> which is an instance of <code><a href="Control-Indexed-Monad.html#t:Monad-39-">Monad'</a></code>.
 </p></div></div><div class="top"><p class="src"><a name="v:runI" class="def">runI</a> :: <a href="/usr/local/share/doc/ghc/html/libraries/base-4.6.0.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Control-Indexed-Monad.html#t:MW">MW</a> m p q a -&gt; m a<a href="src/Control-Indexed-Monad.html#runI" class="link">Source</a></p><div class="doc"><p>This demotes a parameterized monad into a regular monad. Useful
  for when you're using e.g. <code>RebindableSyntax</code> and want to do IO.
-</p></div></div><div class="top"><p class="src"><a name="v:-33--62--62--61-" class="def">(!&gt;&gt;=)</a> :: <a href="Control-Indexed-Monad.html#t:Monad-39-">Monad'</a> m =&gt; m b g s -&gt; (s -&gt; m a b t) -&gt; m a g t<a href="src/Control-Indexed-Monad.html#%21%3E%3E%3D" class="link">Source</a></p><div class="doc"><p>Infix synonym for <code><a href="Control-Indexed-Monad.html#v:bind">bind</a></code>.
+</p></div></div><h1 id="g:3">Operators
+</h1><div class="top"><p class="src"><a name="v:-33--62--62--61-" class="def">(!&gt;&gt;=)</a> :: <a href="Control-Indexed-Monad.html#t:Monad-39-">Monad'</a> m =&gt; m b g s -&gt; (s -&gt; m a b t) -&gt; m a g t<a href="src/Control-Indexed-Monad.html#%21%3E%3E%3D" class="link">Source</a></p><div class="doc"><p>Infix synonym for <code><a href="Control-Indexed-Monad.html#v:bind">bind</a></code>.
 </p></div></div><div class="top"><p class="src"><a name="v:-33--43--62--62-" class="def">(!+&gt;&gt;)</a> :: <a href="Control-Indexed-Monad.html#t:Monad-39-">Monad'</a> m =&gt; m b g s -&gt; m a b t -&gt; m a g t<a href="src/Control-Indexed-Monad.html#%21%2B%3E%3E" class="link">Source</a></p><div class="doc"><p>Defined as:
 </p><pre>m1 !+&gt;&gt; m2 = bind m1 (const m2)</pre></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.1</p></div></body></html>

File doc/mini_Control-Indexed-Monad.html

View file
 window.onload = function () {pageLoad();};
 //]]>
 </script></head><body id="mini"><div id="module-header"><p class="caption">Control.Indexed.Monad</p></div><div id="interface"><h1>Parameterized monads
-</h1><div class="top"><p class="src"><span class="keyword">class</span> <a href="Control-Indexed-Monad.html#t:Monad-39-" target="main">Monad'</a> m</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="Control-Indexed-Monad.html#t:MW" target="main">MW</a> m p q a</p></div><div class="top"><p class="src"><a href="Control-Indexed-Monad.html#v:lift" target="main">lift</a></p></div><div class="top"><p class="src"><a href="Control-Indexed-Monad.html#v:runI" target="main">runI</a></p></div><div class="top"><p class="src"><a href="Control-Indexed-Monad.html#v:-33--62--62--61-" target="main">(!&gt;&gt;=)</a></p></div><div class="top"><p class="src"><a href="Control-Indexed-Monad.html#v:-33--43--62--62-" target="main">(!+&gt;&gt;)</a></p></div></div></body></html>
+</h1><div class="top"><p class="src"><span class="keyword">class</span> <a href="Control-Indexed-Monad.html#t:Monad-39-" target="main">Monad'</a> m</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="Control-Indexed-Monad.html#t:MW" target="main">MW</a> m p q a</p></div><h2>Lifting ordinary monads
+</h2><div class="top"><p class="src"><a href="Control-Indexed-Monad.html#v:lift" target="main">lift</a></p></div><div class="top"><p class="src"><a href="Control-Indexed-Monad.html#v:runI" target="main">runI</a></p></div><h1>Operators
+</h1><div class="top"><p class="src"><a href="Control-Indexed-Monad.html#v:-33--62--62--61-" target="main">(!&gt;&gt;=)</a></p></div><div class="top"><p class="src"><a href="Control-Indexed-Monad.html#v:-33--43--62--62-" target="main">(!+&gt;&gt;)</a></p></div></div></body></html>

File doc/src/Control-Indexed-Monad.html

View file
 <a name="line-16"></a>       <span class='hs-layout'>(</span> <span class='hs-comment'>-- * Parameterized monads</span>
 <a name="line-17"></a>         <span class='hs-conid'>Monad'</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span> <span class='hs-comment'>-- :: (* -&gt; * -&gt; * -&gt; *) -&gt; Constraint</span>
 <a name="line-18"></a>       <span class='hs-layout'>,</span> <span class='hs-conid'>MW</span>         <span class='hs-comment'>-- :: (* -&gt; *) -&gt; * -&gt; * -&gt; * -&gt; *</span>
-<a name="line-19"></a>       <span class='hs-layout'>,</span> <span class='hs-varid'>lift</span>       <span class='hs-comment'>-- :: Monad m =&gt; m a -&gt; MW m p q a</span>
-<a name="line-20"></a>       <span class='hs-layout'>,</span> <span class='hs-varid'>runI</span>       <span class='hs-comment'>-- :: Monad m =&gt; MW m p q a -&gt; m a</span>
-<a name="line-21"></a>       <span class='hs-layout'>,</span> <span class='hs-layout'>(</span><span class='hs-varop'>!&gt;&gt;=</span><span class='hs-layout'>)</span>     <span class='hs-comment'>-- :: Monad' m =&gt; m b g s -&gt; (s -&gt; m a b t) -&gt; m a g t</span>
-<a name="line-22"></a>       <span class='hs-layout'>,</span> <span class='hs-layout'>(</span><span class='hs-varop'>!+&gt;&gt;</span><span class='hs-layout'>)</span>     <span class='hs-comment'>-- :: Monad' m =&gt; m b g s -&gt; m a b t -&gt; m a g t</span>
-<a name="line-23"></a>       <span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
-<a name="line-24"></a>
-<a name="line-25"></a><span class='hs-comment'>--------------------------------------------------------------------------------</span>
-<a name="line-26"></a><span class='hs-comment'>-- Parameterized monads.</span>
-<a name="line-27"></a>
-<a name="line-28"></a><a name="Monad'"></a><span class='hs-comment'>-- | Parameterized monads.</span>
-<a name="line-29"></a><a name="Monad'"></a><span class='hs-comment'>--</span>
-<a name="line-30"></a><a name="Monad'"></a><span class='hs-comment'>-- Regular monads can be lifted into this type class using 'lift'.</span>
-<a name="line-31"></a><a name="Monad'"></a><span class='hs-keyword'>class</span> <span class='hs-conid'>Monad'</span> <span class='hs-varid'>m</span> <span class='hs-keyword'>where</span>
-<a name="line-32"></a>  <span class='hs-comment'>-- | Parameterized 'Prelude.return'.</span>
-<a name="line-33"></a>  <span class='hs-varid'>ret</span>  <span class='hs-keyglyph'>::</span> <span class='hs-varid'>t</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-varid'>a</span> <span class='hs-varid'>t</span>
-<a name="line-34"></a>  <span class='hs-comment'>-- | Parameterized 'Prelude.&gt;&gt;='.</span>
-<a name="line-35"></a>  <span class='hs-varid'>bind</span> <span class='hs-keyglyph'>::</span> <span class='hs-varid'>m</span> <span class='hs-varid'>b</span> <span class='hs-varid'>g</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-varid'>s</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-varid'>b</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-varid'>g</span> <span class='hs-varid'>t</span>
-<a name="line-36"></a>
-<a name="line-37"></a><a name="MW"></a><span class='hs-comment'>-- | This type lifts any regular monad into a parameterized monad.</span>
-<a name="line-38"></a><a name="MW"></a><span class='hs-keyword'>newtype</span> <span class='hs-conid'>MW</span> <span class='hs-varid'>m</span> <span class='hs-varid'>p</span> <span class='hs-varid'>q</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MW</span> <span class='hs-layout'>{</span> <span class='hs-varid'>unMW</span> <span class='hs-keyglyph'>::</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-layout'>}</span>
-<a name="line-39"></a>
-<a name="line-40"></a><a name="lift"></a><span class='hs-comment'>-- | This method \'lifts\' a regular monad into a parameterized monad</span>
-<a name="line-41"></a><span class='hs-comment'>-- 'MW' which is an instance of 'Monad''.</span>
-<a name="line-42"></a><span class='hs-definition'>lift</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Monad</span> <span class='hs-varid'>m</span> <span class='hs-keyglyph'>=&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>MW</span> <span class='hs-varid'>m</span> <span class='hs-varid'>p</span> <span class='hs-varid'>q</span> <span class='hs-varid'>a</span>
-<a name="line-43"></a><span class='hs-definition'>lift</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MW</span>
-<a name="line-44"></a>
-<a name="line-45"></a><a name="runI"></a><span class='hs-comment'>-- | This demotes a parameterized monad into a regular monad. Useful</span>
-<a name="line-46"></a><span class='hs-comment'>-- for when you're using e.g. @RebindableSyntax@ and want to do IO.</span>
-<a name="line-47"></a><span class='hs-definition'>runI</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Monad</span> <span class='hs-varid'>m</span> <span class='hs-keyglyph'>=&gt;</span> <span class='hs-conid'>MW</span> <span class='hs-varid'>m</span> <span class='hs-varid'>p</span> <span class='hs-varid'>q</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span>
-<a name="line-48"></a><span class='hs-definition'>runI</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>unMW</span>
-<a name="line-49"></a>
-<a name="line-50"></a><a name="instance%20Monad'%20(MW%20m)"></a><span class='hs-comment'>-- | This instances simply lifts regular instances of 'Monad'</span>
-<a name="line-51"></a><a name="instance%20Monad'%20(MW%20m)"></a><span class='hs-comment'>-- into instances of 'Monad''.</span>
-<a name="line-52"></a><a name="instance%20Monad'%20(MW%20m)"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>Monad</span> <span class='hs-varid'>m</span> <span class='hs-keyglyph'>=&gt;</span> <span class='hs-conid'>Monad'</span> <span class='hs-layout'>(</span><span class='hs-conid'>MW</span> <span class='hs-varid'>m</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
-<a name="line-53"></a>  <span class='hs-varid'>ret</span>         <span class='hs-varid'>x</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MW</span> <span class='hs-layout'>(</span><span class='hs-varid'>return</span> <span class='hs-varid'>x</span><span class='hs-layout'>)</span>
-<a name="line-54"></a>  <span class='hs-varid'>bind</span> <span class='hs-layout'>(</span><span class='hs-conid'>MW</span> <span class='hs-varid'>m</span><span class='hs-layout'>)</span> <span class='hs-varid'>f</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MW</span> <span class='hs-layout'>(</span><span class='hs-varid'>m</span> <span class='hs-varop'>&gt;&gt;=</span> <span class='hs-varid'>unMW</span> <span class='hs-varop'>.</span> <span class='hs-varid'>f</span><span class='hs-layout'>)</span>
-<a name="line-55"></a>
-<a name="line-56"></a><a name="!%3e%3e="></a><span class='hs-comment'>-- | Infix synonym for 'bind'.</span>
-<a name="line-57"></a><span class='hs-layout'>(</span><span class='hs-varop'>!&gt;&gt;=</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Monad'</span> <span class='hs-varid'>m</span> <span class='hs-keyglyph'>=&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>b</span> <span class='hs-varid'>g</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-varid'>s</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-varid'>b</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-varid'>g</span> <span class='hs-varid'>t</span>
-<a name="line-58"></a><a name="m"></a><span class='hs-definition'>m</span> <span class='hs-varop'>!&gt;&gt;=</span> <span class='hs-varid'>f</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>bind</span> <span class='hs-varid'>m</span> <span class='hs-varid'>f</span>
-<a name="line-59"></a><span class='hs-keyword'>infixl</span> <span class='hs-num'>1</span> <span class='hs-varop'>!&gt;&gt;=</span>
-<a name="line-60"></a>
-<a name="line-61"></a><a name="!+%3e%3e"></a><span class='hs-comment'>-- | Defined as:</span>
-<a name="line-62"></a><span class='hs-comment'>--</span>
-<a name="line-63"></a><span class='hs-comment'>-- @m1 !+&gt;&gt; m2 = bind m1 (const m2)@</span>
-<a name="line-64"></a><span class='hs-layout'>(</span><span class='hs-varop'>!+&gt;&gt;</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Monad'</span> <span class='hs-varid'>m</span> <span class='hs-keyglyph'>=&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>b</span> <span class='hs-varid'>g</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-varid'>b</span> <span class='hs-varid'>t</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-varid'>g</span> <span class='hs-varid'>t</span>
-<a name="line-65"></a><a name="m1"></a><span class='hs-definition'>m1</span> <span class='hs-varop'>!+&gt;&gt;</span> <span class='hs-varid'>m2</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>bind</span> <span class='hs-varid'>m1</span> <span class='hs-layout'>(</span><span class='hs-varid'>const</span> <span class='hs-varid'>m2</span><span class='hs-layout'>)</span>
-<a name="line-66"></a><span class='hs-keyword'>infixl</span> <span class='hs-num'>1</span> <span class='hs-varop'>!+&gt;&gt;</span>
+<a name="line-19"></a>
+<a name="line-20"></a>         <span class='hs-comment'>-- ** Lifting ordinary monads</span>
+<a name="line-21"></a>       <span class='hs-layout'>,</span> <span class='hs-varid'>lift</span>       <span class='hs-comment'>-- :: Monad m =&gt; m a -&gt; MW m p q a</span>
+<a name="line-22"></a>       <span class='hs-layout'>,</span> <span class='hs-varid'>runI</span>       <span class='hs-comment'>-- :: Monad m =&gt; MW m p q a -&gt; m a</span>
+<a name="line-23"></a>
+<a name="line-24"></a>         <span class='hs-comment'>-- * Operators</span>
+<a name="line-25"></a>       <span class='hs-layout'>,</span> <span class='hs-layout'>(</span><span class='hs-varop'>!&gt;&gt;=</span><span class='hs-layout'>)</span>     <span class='hs-comment'>-- :: Monad' m =&gt; m b g s -&gt; (s -&gt; m a b t) -&gt; m a g t</span>
+<a name="line-26"></a>       <span class='hs-layout'>,</span> <span class='hs-layout'>(</span><span class='hs-varop'>!+&gt;&gt;</span><span class='hs-layout'>)</span>     <span class='hs-comment'>-- :: Monad' m =&gt; m b g s -&gt; m a b t -&gt; m a g t</span>
+<a name="line-27"></a>       <span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
+<a name="line-28"></a>
+<a name="line-29"></a><span class='hs-comment'>--------------------------------------------------------------------------------</span>
+<a name="line-30"></a><span class='hs-comment'>-- Parameterized monads.</span>
+<a name="line-31"></a>
+<a name="line-32"></a><a name="Monad'"></a><span class='hs-comment'>-- | Parameterized monads.</span>
+<a name="line-33"></a><a name="Monad'"></a><span class='hs-comment'>--</span>
+<a name="line-34"></a><a name="Monad'"></a><span class='hs-comment'>-- Regular monads can be lifted into this type class using 'lift'.</span>
+<a name="line-35"></a><a name="Monad'"></a><span class='hs-keyword'>class</span> <span class='hs-conid'>Monad'</span> <span class='hs-varid'>m</span> <span class='hs-keyword'>where</span>
+<a name="line-36"></a>  <span class='hs-comment'>-- | Parameterized 'Prelude.return'.</span>
+<a name="line-37"></a>  <span class='hs-varid'>ret</span>  <span class='hs-keyglyph'>::</span> <span class='hs-varid'>t</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-varid'>a</span> <span class='hs-varid'>t</span>
+<a name="line-38"></a>  <span class='hs-comment'>-- | Parameterized 'Prelude.&gt;&gt;='.</span>
+<a name="line-39"></a>  <span class='hs-varid'>bind</span> <span class='hs-keyglyph'>::</span> <span class='hs-varid'>m</span> <span class='hs-varid'>b</span> <span class='hs-varid'>g</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-varid'>s</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-varid'>b</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-varid'>g</span> <span class='hs-varid'>t</span>
+<a name="line-40"></a>
+<a name="line-41"></a><a name="MW"></a><span class='hs-comment'>-- | This type lifts any regular monad into a parameterized monad.</span>
+<a name="line-42"></a><a name="MW"></a><span class='hs-keyword'>newtype</span> <span class='hs-conid'>MW</span> <span class='hs-varid'>m</span> <span class='hs-varid'>p</span> <span class='hs-varid'>q</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MW</span> <span class='hs-layout'>{</span> <span class='hs-varid'>unMW</span> <span class='hs-keyglyph'>::</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-layout'>}</span>
+<a name="line-43"></a>
+<a name="line-44"></a><a name="lift"></a><span class='hs-comment'>-- | This method \'lifts\' a regular monad into a parameterized monad</span>
+<a name="line-45"></a><span class='hs-comment'>-- 'MW' which is an instance of 'Monad''.</span>
+<a name="line-46"></a><span class='hs-definition'>lift</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Monad</span> <span class='hs-varid'>m</span> <span class='hs-keyglyph'>=&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-conid'>MW</span> <span class='hs-varid'>m</span> <span class='hs-varid'>p</span> <span class='hs-varid'>q</span> <span class='hs-varid'>a</span>
+<a name="line-47"></a><span class='hs-definition'>lift</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MW</span>
+<a name="line-48"></a>
+<a name="line-49"></a><a name="runI"></a><span class='hs-comment'>-- | This demotes a parameterized monad into a regular monad. Useful</span>
+<a name="line-50"></a><span class='hs-comment'>-- for when you're using e.g. @RebindableSyntax@ and want to do IO.</span>
+<a name="line-51"></a><span class='hs-definition'>runI</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Monad</span> <span class='hs-varid'>m</span> <span class='hs-keyglyph'>=&gt;</span> <span class='hs-conid'>MW</span> <span class='hs-varid'>m</span> <span class='hs-varid'>p</span> <span class='hs-varid'>q</span> <span class='hs-varid'>a</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span>
+<a name="line-52"></a><span class='hs-definition'>runI</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>unMW</span>
+<a name="line-53"></a>
+<a name="line-54"></a><a name="instance%20Monad'%20(MW%20m)"></a><span class='hs-comment'>-- | This instances simply lifts regular instances of 'Monad'</span>
+<a name="line-55"></a><a name="instance%20Monad'%20(MW%20m)"></a><span class='hs-comment'>-- into instances of 'Monad''.</span>
+<a name="line-56"></a><a name="instance%20Monad'%20(MW%20m)"></a><span class='hs-keyword'>instance</span> <span class='hs-conid'>Monad</span> <span class='hs-varid'>m</span> <span class='hs-keyglyph'>=&gt;</span> <span class='hs-conid'>Monad'</span> <span class='hs-layout'>(</span><span class='hs-conid'>MW</span> <span class='hs-varid'>m</span><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
+<a name="line-57"></a>  <span class='hs-varid'>ret</span>         <span class='hs-varid'>x</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MW</span> <span class='hs-layout'>(</span><span class='hs-varid'>return</span> <span class='hs-varid'>x</span><span class='hs-layout'>)</span>
+<a name="line-58"></a>  <span class='hs-varid'>bind</span> <span class='hs-layout'>(</span><span class='hs-conid'>MW</span> <span class='hs-varid'>m</span><span class='hs-layout'>)</span> <span class='hs-varid'>f</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MW</span> <span class='hs-layout'>(</span><span class='hs-varid'>m</span> <span class='hs-varop'>&gt;&gt;=</span> <span class='hs-varid'>unMW</span> <span class='hs-varop'>.</span> <span class='hs-varid'>f</span><span class='hs-layout'>)</span>
+<a name="line-59"></a>
+<a name="line-60"></a><a name="!%3e%3e="></a><span class='hs-comment'>-- | Infix synonym for 'bind'.</span>
+<a name="line-61"></a><span class='hs-layout'>(</span><span class='hs-varop'>!&gt;&gt;=</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Monad'</span> <span class='hs-varid'>m</span> <span class='hs-keyglyph'>=&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>b</span> <span class='hs-varid'>g</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-layout'>(</span><span class='hs-varid'>s</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-varid'>b</span> <span class='hs-varid'>t</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-varid'>g</span> <span class='hs-varid'>t</span>
+<a name="line-62"></a><a name="m"></a><span class='hs-definition'>m</span> <span class='hs-varop'>!&gt;&gt;=</span> <span class='hs-varid'>f</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>bind</span> <span class='hs-varid'>m</span> <span class='hs-varid'>f</span>
+<a name="line-63"></a><span class='hs-keyword'>infixl</span> <span class='hs-num'>1</span> <span class='hs-varop'>!&gt;&gt;=</span>
+<a name="line-64"></a>
+<a name="line-65"></a><a name="!+%3e%3e"></a><span class='hs-comment'>-- | Defined as:</span>
+<a name="line-66"></a><span class='hs-comment'>--</span>
+<a name="line-67"></a><span class='hs-comment'>-- @m1 !+&gt;&gt; m2 = bind m1 (const m2)@</span>
+<a name="line-68"></a><span class='hs-layout'>(</span><span class='hs-varop'>!+&gt;&gt;</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Monad'</span> <span class='hs-varid'>m</span> <span class='hs-keyglyph'>=&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>b</span> <span class='hs-varid'>g</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-varid'>b</span> <span class='hs-varid'>t</span> <span class='hs-keyglyph'>-&gt;</span> <span class='hs-varid'>m</span> <span class='hs-varid'>a</span> <span class='hs-varid'>g</span> <span class='hs-varid'>t</span>
+<a name="line-69"></a><a name="m1"></a><span class='hs-definition'>m1</span> <span class='hs-varop'>!+&gt;&gt;</span> <span class='hs-varid'>m2</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>bind</span> <span class='hs-varid'>m1</span> <span class='hs-layout'>(</span><span class='hs-varid'>const</span> <span class='hs-varid'>m2</span><span class='hs-layout'>)</span>
+<a name="line-70"></a><span class='hs-keyword'>infixl</span> <span class='hs-num'>1</span> <span class='hs-varop'>!+&gt;&gt;</span>
 </pre></body>
 </html>