Commits

Austin Seipp  committed 5119c58

Update documentation.

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

  • Participants
  • Parent commits a247012
  • Branches gh-pages

Comments (0)

Files changed (2)

File doc/Control-Indexed-Monad.html

 </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><p>When using <code>RebindableSyntax</code> with GHC, 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. See the
+ section &quot;Using <code>do</code>-notation&quot; in the tutorial module
+ <a href="Control-Delimited-Tutorial.html">Control.Delimited.Tutorial</a>.
 </p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span>  <a href="#t:Monad-39-">Monad'</a> m  <span class="keyword">where</span><ul class="subs"><li><a href="#v:ret">ret</a> ::  t -&gt; m a a t</li><li><a href="#v:bind">bind</a> ::  m b g s -&gt; (s -&gt; m a b t) -&gt; m a g t</li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:MW">MW</a> m p q a</li><li class="src short"><a href="#v:lift">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</li><li class="src short"><a href="#v:runI">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</li><li class="src short"><a href="#v:-33--62--62--61-">(!&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</li><li class="src short"><a href="#v:-33--43--62--62-">(!+&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</li></ul></div><div id="interface"><h1 id="g:1">Parameterized monads
 </h1><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:Monad-39-" class="def">Monad'</a> m  <span class="keyword">where</span><a href="src/Control-Indexed-Monad.html#Monad%27" class="link">Source</a></p><div class="doc"><p>Parameterized monads.
 </p><p>Regular monads can be lifted into this type class using <code><a href="Control-Indexed-Monad.html#v:lift">lift</a></code>.

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

 <a name="line-9"></a><span class='hs-comment'>--</span>
 <a name="line-10"></a><span class='hs-comment'>-- Parameterized monads.</span>
 <a name="line-11"></a><span class='hs-comment'>--</span>
-<a name="line-12"></a><span class='hs-comment'>-- When using GHC with @RebindableSyntax@, it's possible to overload</span>
-<a name="line-13"></a><span class='hs-comment'>-- regular @do@-notation to use the 'Monad'' typeclass.</span>
-<a name="line-14"></a><span class='hs-comment'>--</span>
-<a name="line-15"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Indexed</span><span class='hs-varop'>.</span><span class='hs-conid'>Monad</span>
-<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>
-<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>
+<a name="line-12"></a><span class='hs-comment'>-- When using @RebindableSyntax@ with GHC, it's possible to overload</span>
+<a name="line-13"></a><span class='hs-comment'>-- regular @do@-notation to use the 'Monad'' typeclass. See the</span>
+<a name="line-14"></a><span class='hs-comment'>-- section \"Using @do@-notation\" in the tutorial module</span>
+<a name="line-15"></a><span class='hs-comment'>-- "Control.Delimited.Tutorial".</span>
+<a name="line-16"></a><span class='hs-comment'>--</span>
+<a name="line-17"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>Control</span><span class='hs-varop'>.</span><span class='hs-conid'>Indexed</span><span class='hs-varop'>.</span><span class='hs-conid'>Monad</span>
+<a name="line-18"></a>       <span class='hs-layout'>(</span> <span class='hs-comment'>-- * Parameterized monads</span>
+<a name="line-19"></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-20"></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-21"></a>
+<a name="line-22"></a>         <span class='hs-comment'>-- ** Lifting ordinary monads</span>
+<a name="line-23"></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-24"></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-25"></a>
+<a name="line-26"></a>         <span class='hs-comment'>-- * Operators</span>
+<a name="line-27"></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-28"></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-29"></a>       <span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
+<a name="line-30"></a>
+<a name="line-31"></a><span class='hs-comment'>--------------------------------------------------------------------------------</span>
+<a name="line-32"></a><span class='hs-comment'>-- Parameterized monads.</span>
+<a name="line-33"></a>
+<a name="line-34"></a><a name="Monad'"></a><span class='hs-comment'>-- | Parameterized monads.</span>
+<a name="line-35"></a><a name="Monad'"></a><span class='hs-comment'>--</span>
+<a name="line-36"></a><a name="Monad'"></a><span class='hs-comment'>-- Regular monads can be lifted into this type class using 'lift'.</span>
+<a name="line-37"></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-38"></a>  <span class='hs-comment'>-- | Parameterized 'Prelude.return'.</span>
+<a name="line-39"></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-40"></a>  <span class='hs-comment'>-- | Parameterized 'Prelude.&gt;&gt;='.</span>
+<a name="line-41"></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-42"></a>
+<a name="line-43"></a><a name="MW"></a><span class='hs-comment'>-- | This type lifts any regular monad into a parameterized monad.</span>
+<a name="line-44"></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-45"></a>
+<a name="line-46"></a><a name="lift"></a><span class='hs-comment'>-- | This method \'lifts\' a regular monad into a parameterized monad</span>
+<a name="line-47"></a><span class='hs-comment'>-- 'MW' which is an instance of 'Monad''.</span>
+<a name="line-48"></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-49"></a><span class='hs-definition'>lift</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>MW</span>
+<a name="line-50"></a>
+<a name="line-51"></a><a name="runI"></a><span class='hs-comment'>-- | This demotes a parameterized monad into a regular monad. Useful</span>
+<a name="line-52"></a><span class='hs-comment'>-- for when you're using e.g. @RebindableSyntax@ and want to do IO.</span>
+<a name="line-53"></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-54"></a><span class='hs-definition'>runI</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>unMW</span>
+<a name="line-55"></a>
+<a name="line-56"></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-57"></a><a name="instance%20Monad'%20(MW%20m)"></a><span class='hs-comment'>-- into instances of 'Monad''.</span>
+<a name="line-58"></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-59"></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-60"></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-61"></a>
+<a name="line-62"></a><a name="!%3e%3e="></a><span class='hs-comment'>-- | Infix synonym for 'bind'.</span>
+<a name="line-63"></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-64"></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-65"></a><span class='hs-keyword'>infixl</span> <span class='hs-num'>1</span> <span class='hs-varop'>!&gt;&gt;=</span>
+<a name="line-66"></a>
+<a name="line-67"></a><a name="!+%3e%3e"></a><span class='hs-comment'>-- | Defined as:</span>
+<a name="line-68"></a><span class='hs-comment'>--</span>
+<a name="line-69"></a><span class='hs-comment'>-- @m1 !+&gt;&gt; m2 = bind m1 (const m2)@</span>
+<a name="line-70"></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-71"></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-72"></a><span class='hs-keyword'>infixl</span> <span class='hs-num'>1</span> <span class='hs-varop'>!+&gt;&gt;</span>
 </pre></body>
 </html>