/usr/share/doc/libghc-free-doc/html/Control-Monad-Trans-Iter.html is in libghc-free-doc 4.12.4-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | <!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" /><title>Control.Monad.Trans.Iter</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Control-Monad-Trans-Iter.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Monad-Trans-Iter.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">free-4.12.4: Monads for free</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>(C) 2013 Edward Kmett</td></tr><tr><th>License</th><td>BSD-style (see the file LICENSE)</td></tr><tr><th>Maintainer</th><td>Edward Kmett <ekmett@gmail.com></td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Portability</th><td>MPTCs, fundeps</td></tr><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">Control.Monad.Trans.Iter</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">The iterative monad transformer</a></li><li><a href="#g:2">Capretta's iterative monad</a></li><li><a href="#g:3">Combinators</a></li><li><a href="#g:4">Consuming iterative monads</a></li><li><a href="#g:5">IterT ~ FreeT Identity</a></li><li><a href="#g:6">Examples</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Based on <a href="http://www.ioc.ee/~tarmo/tday-veskisilla/uustalu-slides.pdf">Capretta's Iterative Monad Transformer</a></p><p>Unlike <code>Free</code>, this is a true monad transformer.</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">newtype</span> <a href="#t:IterT">IterT</a> m a = <a href="#v:IterT">IterT</a> {<ul class="subs"><li><a href="#v:runIterT">runIterT</a> :: m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a))</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:Iter">Iter</a> = <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor-Identity.html#t:Identity">Identity</a></li><li class="src short"><a href="#v:iter">iter</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a (<a href="Control-Monad-Trans-Iter.html#t:Iter">Iter</a> a) -> <a href="Control-Monad-Trans-Iter.html#t:Iter">Iter</a> a</li><li class="src short"><a href="#v:runIter">runIter</a> :: <a href="Control-Monad-Trans-Iter.html#t:Iter">Iter</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a (<a href="Control-Monad-Trans-Iter.html#t:Iter">Iter</a> a)</li><li class="src short"><a href="#v:delay">delay</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> f, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f m) => m a -> m a</li><li class="src short"><a href="#v:hoistIterT">hoistIterT</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> n => (<span class="keyword">forall</span> a. m a -> n a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> n b</li><li class="src short"><a href="#v:liftIter">liftIter</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Trans-Iter.html#t:Iter">Iter</a> a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a</li><li class="src short"><a href="#v:cutoff">cutoff</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a)</li><li class="src short"><a href="#v:never">never</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> f, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f m) => m a</li><li class="src short"><a href="#v:untilJust">untilJust</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a</li><li class="src short"><a href="#v:interleave">interleave</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => [<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a] -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m [a]</li><li class="src short"><a href="#v:interleave_">interleave_</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => [<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a] -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m ()</li><li class="src short"><a href="#v:retract">retract</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> m a</li><li class="src short"><a href="#v:fold">fold</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => (m a -> a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> a</li><li class="src short"><a href="#v:foldM">foldM</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> n) => (m (n a) -> n a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> n a</li><li class="src short"><span class="keyword">class</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="#t:MonadFree">MonadFree</a> f m | m -> f <span class="keyword">where</span><ul class="subs"></ul></li></ul></div><div id="interface"><h1>Documentation</h1><div class="doc"><p>Functions in Haskell are meant to be pure. For example, if an expression
has type Int, there should exist a value of the type such that the expression
can be replaced by that value in any context without changing the meaning
of the program.</p><p>Some computations may perform side effects (<code>unsafePerformIO</code>), throw an
exception (using <code>error</code>); or not terminate
(<code>let infinity = 1 + infinity in infinity</code>).</p><p>While the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a></code> monad encapsulates side-effects, and the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a></code>
monad encapsulates errors, the <code><a href="Control-Monad-Trans-Iter.html#t:Iter">Iter</a></code> monad encapsulates
non-termination. The <code><a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a></code> transformer generalizes non-termination to any monadic
computation.</p><p>Computations in <code><a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a></code> (or <code><a href="Control-Monad-Trans-Iter.html#t:Iter">Iter</a></code>) can be composed in two ways:</p><ul><li><em>Sequential:</em> Using the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a></code> instance, the result of a computation
can be fed into the next.</li><li><em>Parallel:</em> Using the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:MonadPlus">MonadPlus</a></code> instance, several computations can be
executed concurrently, and the first to finish will prevail.
See also the <a href="examples/Cabbage.lhs">cabbage example</a>.</li></ul></div><h1 id="g:1">The iterative monad transformer</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a id="t:IterT" class="def">IterT</a> m a <a href="src/Control-Monad-Trans-Iter.html#IterT" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></p><div class="doc"><p>The monad supporting iteration based over a base monad <code>m</code>.</p><pre><code><a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a></code> ~ <code>FreeT</code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor-Identity.html#t:Identity">Identity</a></code>
</pre></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:IterT" class="def">IterT</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:runIterT" class="def">runIterT</a> :: m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a))</dfn><div class="doc empty"> </div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:IterT" class="caption collapser" onclick="toggleSection('i:IterT')">Instances</p><div id="section.i:IterT" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:MonadTrans:1" class="instance expander" onclick="toggleSection('i:id:IterT:MonadTrans:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-Class.html#t:MonadTrans">MonadTrans</a> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a></span> <a href="src/Control-Monad-Trans-Iter.html#line-209" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:MonadTrans:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:lift">lift</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:lift" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:MonadError:2" class="instance expander" onclick="toggleSection('i:id:IterT:MonadError:2')"></span> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error-Class.html#t:MonadError">MonadError</a> e m => <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error-Class.html#t:MonadError">MonadError</a> e (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-265" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:MonadError:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:throwError">throwError</a> :: e -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:throwError" class="selflink">#</a></p><p class="src"><a href="#v:catchError">catchError</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> (e -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:catchError" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:MonadReader:3" class="instance expander" onclick="toggleSection('i:id:IterT:MonadReader:3')"></span> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader-Class.html#t:MonadReader">MonadReader</a> e m => <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader-Class.html#t:MonadReader">MonadReader</a> e (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-231" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:MonadReader:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:ask">ask</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m e <a href="#v:ask" class="selflink">#</a></p><p class="src"><a href="#v:local">local</a> :: (e -> e) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:local" class="selflink">#</a></p><p class="src"><a href="#v:reader">reader</a> :: (e -> a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:reader" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:MonadState:4" class="instance expander" onclick="toggleSection('i:id:IterT:MonadState:4')"></span> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m => <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-255" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:MonadState:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -> (a, s)) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:state" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:MonadWriter:5" class="instance expander" onclick="toggleSection('i:id:IterT:MonadWriter:5')"></span> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Class.html#t:MonadWriter">MonadWriter</a> w m => <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Class.html#t:MonadWriter">MonadWriter</a> w (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-237" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:MonadWriter:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:writer">writer</a> :: (a, w) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:writer" class="selflink">#</a></p><p class="src"><a href="#v:tell">tell</a> :: w -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m () <a href="#v:tell" class="selflink">#</a></p><p class="src"><a href="#v:listen">listen</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m (a, w) <a href="#v:listen" class="selflink">#</a></p><p class="src"><a href="#v:pass">pass</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m (a, w -> w) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:pass" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:MonadFree:6" class="instance expander" onclick="toggleSection('i:id:IterT:MonadFree:6')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor-Identity.html#t:Identity">Identity</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-276" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:MonadFree:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor-Identity.html#t:Identity">Identity</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Monad:7" class="instance expander" onclick="toggleSection('i:id:IterT:Monad:7')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-174" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Monad:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-62--62--61-">(>>=)</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> (a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b <a href="#v:-62--62--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62--62-">(>>)</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b <a href="#v:-62--62-" class="selflink">#</a></p><p class="src"><a href="#v:return">return</a> :: a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:return" class="selflink">#</a></p><p class="src"><a href="#v:fail">fail</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:fail" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Functor:8" class="instance expander" onclick="toggleSection('i:id:IterT:Functor:8')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-164" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Functor:8" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fmap">fmap</a> :: (a -> b) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(<$)</a> :: a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:-60--36-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:MonadFix:9" class="instance expander" onclick="toggleSection('i:id:IterT:MonadFix:9')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad-Fix.html#t:MonadFix">MonadFix</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad-Fix.html#t:MonadFix">MonadFix</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-190" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:MonadFix:9" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:mfix">mfix</a> :: (a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:mfix" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Applicative:10" class="instance expander" onclick="toggleSection('i:id:IterT:Applicative:10')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-168" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Applicative:10" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pure">pure</a> :: a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:pure" class="selflink">#</a></p><p class="src"><a href="#v:-60--42--62-">(<*>)</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m (a -> b) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b <a href="#v:-60--42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-42--62-">(*>)</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b <a href="#v:-42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-60--42-">(<*)</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:-60--42-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Foldable:11" class="instance expander" onclick="toggleSection('i:id:IterT:Foldable:11')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#t:Foldable">Foldable</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Foldable.html#t:Foldable">Foldable</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-213" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Foldable:11" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fold">fold</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a> m => <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m m -> m <a href="#v:fold" class="selflink">#</a></p><p class="src"><a href="#v:foldMap">foldMap</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a> m => (a -> m) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> m <a href="#v:foldMap" class="selflink">#</a></p><p class="src"><a href="#v:foldr">foldr</a> :: (a -> b -> b) -> b -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> b <a href="#v:foldr" class="selflink">#</a></p><p class="src"><a href="#v:foldr-39-">foldr'</a> :: (a -> b -> b) -> b -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> b <a href="#v:foldr-39-" class="selflink">#</a></p><p class="src"><a href="#v:foldl">foldl</a> :: (b -> a -> b) -> b -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> b <a href="#v:foldl" class="selflink">#</a></p><p class="src"><a href="#v:foldl-39-">foldl'</a> :: (b -> a -> b) -> b -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> b <a href="#v:foldl-39-" class="selflink">#</a></p><p class="src"><a href="#v:foldr1">foldr1</a> :: (a -> a -> a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> a <a href="#v:foldr1" class="selflink">#</a></p><p class="src"><a href="#v:foldl1">foldl1</a> :: (a -> a -> a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> a <a href="#v:foldl1" class="selflink">#</a></p><p class="src"><a href="#v:toList">toList</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> [a] <a href="#v:toList" class="selflink">#</a></p><p class="src"><a href="#v:null">null</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:null" class="selflink">#</a></p><p class="src"><a href="#v:length">length</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> <a href="#v:length" class="selflink">#</a></p><p class="src"><a href="#v:elem">elem</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a => a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:elem" class="selflink">#</a></p><p class="src"><a href="#v:maximum">maximum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> a => <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> a <a href="#v:maximum" class="selflink">#</a></p><p class="src"><a href="#v:minimum">minimum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> a => <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> a <a href="#v:minimum" class="selflink">#</a></p><p class="src"><a href="#v:sum">sum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Num">Num</a> a => <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> a <a href="#v:sum" class="selflink">#</a></p><p class="src"><a href="#v:product">product</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Num">Num</a> a => <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> a <a href="#v:product" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Traversable:12" class="instance expander" onclick="toggleSection('i:id:IterT:Traversable:12')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Traversable.html#t:Traversable">Traversable</a> m) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Traversable.html#t:Traversable">Traversable</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-221" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Traversable:12" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:traverse">traverse</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f => (a -> f b) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> f (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b) <a href="#v:traverse" class="selflink">#</a></p><p class="src"><a href="#v:sequenceA">sequenceA</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Applicative.html#t:Applicative">Applicative</a> f => <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m (f a) -> f (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a) <a href="#v:sequenceA" class="selflink">#</a></p><p class="src"><a href="#v:mapM">mapM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => (a -> m b) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> m (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b) <a href="#v:mapM" class="selflink">#</a></p><p class="src"><a href="#v:sequence">sequence</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m (m a) -> m (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a) <a href="#v:sequence" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:MonadIO:13" class="instance expander" onclick="toggleSection('i:id:IterT:MonadIO:13')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-270" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:MonadIO:13" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftIO">liftIO</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:liftIO" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Alternative:14" class="instance expander" onclick="toggleSection('i:id:IterT:Alternative:14')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Applicative.html#t:Alternative">Alternative</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-194" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Alternative:14" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:empty">empty</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:empty" class="selflink">#</a></p><p class="src"><a href="#v:-60--124--62-">(<|>)</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:-60--124--62-" class="selflink">#</a></p><p class="src"><a href="#v:some">some</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m [a] <a href="#v:some" class="selflink">#</a></p><p class="src"><a href="#v:many">many</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m [a] <a href="#v:many" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:MonadPlus:15" class="instance expander" onclick="toggleSection('i:id:IterT:MonadPlus:15')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-201" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc"><p>Capretta's <code>race</code> combinator. Satisfies left catch.</p></td></tr><tr><td colspan="2"><div id="section.i:id:IterT:MonadPlus:15" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:mzero">mzero</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:mzero" class="selflink">#</a></p><p class="src"><a href="#v:mplus">mplus</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:mplus" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:MonadThrow:16" class="instance expander" onclick="toggleSection('i:id:IterT:MonadThrow:16')"></span> <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadThrow">MonadThrow</a> m => <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadThrow">MonadThrow</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-280" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:MonadThrow:16" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:throwM">throwM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:Exception">Exception</a> e => e -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:throwM" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:MonadCatch:17" class="instance expander" onclick="toggleSection('i:id:IterT:MonadCatch:17')"></span> <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadCatch">MonadCatch</a> m => <a href="file:///usr/share/doc/libghc-exceptions-doc/html/Control-Monad-Catch.html#t:MonadCatch">MonadCatch</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-284" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:MonadCatch:17" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:catch">catch</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Exception-Base.html#t:Exception">Exception</a> e => <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> (e -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:catch" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:MonadCont:18" class="instance expander" onclick="toggleSection('i:id:IterT:MonadCont:18')"></span> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Cont-Class.html#t:MonadCont">MonadCont</a> m => <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Cont-Class.html#t:MonadCont">MonadCont</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-273" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:MonadCont:18" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:callCC">callCC</a> :: ((a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:callCC" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Eq1:19" class="instance expander" onclick="toggleSection('i:id:IterT:Eq1:19')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> m, <a href="file:///usr/share/doc/libghc-prelude-extras-doc/html/Prelude-Extras.html#t:Eq1">Eq1</a> m) => <a href="file:///usr/share/doc/libghc-prelude-extras-doc/html/Prelude-Extras.html#t:Eq1">Eq1</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-136" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Eq1:19" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61--35-">(==#)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> a => <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61--35-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Ord1:20" class="instance expander" onclick="toggleSection('i:id:IterT:Ord1:20')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> m, <a href="file:///usr/share/doc/libghc-prelude-extras-doc/html/Prelude-Extras.html#t:Ord1">Ord1</a> m) => <a href="file:///usr/share/doc/libghc-prelude-extras-doc/html/Prelude-Extras.html#t:Ord1">Ord1</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-142" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Ord1:20" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare1">compare1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> a => <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="#v:compare1" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Show1:21" class="instance expander" onclick="toggleSection('i:id:IterT:Show1:21')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> m, <a href="file:///usr/share/doc/libghc-prelude-extras-doc/html/Prelude-Extras.html#t:Show1">Show1</a> m) => <a href="file:///usr/share/doc/libghc-prelude-extras-doc/html/Prelude-Extras.html#t:Show1">Show1</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-148" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Show1:21" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec1">showsPrec1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec1" class="selflink">#</a></p><p class="src"><a href="#v:showList1">showList1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> a => [<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList1" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Read1:22" class="instance expander" onclick="toggleSection('i:id:IterT:Read1:22')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> m, <a href="file:///usr/share/doc/libghc-prelude-extras-doc/html/Prelude-Extras.html#t:Read1">Read1</a> m) => <a href="file:///usr/share/doc/libghc-prelude-extras-doc/html/Prelude-Extras.html#t:Read1">Read1</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-156" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Read1:22" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec1">readsPrec1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Read.html#t:Read">Read</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a) <a href="#v:readsPrec1" class="selflink">#</a></p><p class="src"><a href="#v:readList1">readList1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Read.html#t:Read">Read</a> a => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a] <a href="#v:readList1" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Traversable1:23" class="instance expander" onclick="toggleSection('i:id:IterT:Traversable1:23')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Semigroup-Traversable-Class.html#t:Traversable1">Traversable1</a> m) => <a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Semigroup-Traversable-Class.html#t:Traversable1">Traversable1</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-225" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Traversable1:23" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:traverse1">traverse1</a> :: <a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Functor-Apply.html#t:Apply">Apply</a> f => (a -> f b) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> f (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b) <a href="#v:traverse1" class="selflink">#</a></p><p class="src"><a href="#v:sequence1">sequence1</a> :: <a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Functor-Apply.html#t:Apply">Apply</a> f => <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m (f b) -> f (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b) <a href="#v:sequence1" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Apply:24" class="instance expander" onclick="toggleSection('i:id:IterT:Apply:24')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Functor-Apply.html#t:Apply">Apply</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-182" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Apply:24" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-60-.-62-">(<.>)</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m (a -> b) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b <a href="#v:-60-.-62-" class="selflink">#</a></p><p class="src"><a href="#v:.-62-">(.>)</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b <a href="#v:.-62-" class="selflink">#</a></p><p class="src"><a href="#v:-60-.">(<.)</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:-60-." class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Bind:25" class="instance expander" onclick="toggleSection('i:id:IterT:Bind:25')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Functor-Bind.html#t:Bind">Bind</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-186" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Bind:25" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-62--62--45-">(>>-)</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> (a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b <a href="#v:-62--62--45-" class="selflink">#</a></p><p class="src"><a href="#v:join">join</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:join" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Foldable1:26" class="instance expander" onclick="toggleSection('i:id:IterT:Foldable1:26')"></span> <a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Semigroup-Foldable-Class.html#t:Foldable1">Foldable1</a> m => <a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Semigroup-Foldable-Class.html#t:Foldable1">Foldable1</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Trans-Iter.html#line-217" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Foldable1:26" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fold1">fold1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Semigroup.html#t:Semigroup">Semigroup</a> m => <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m m -> m <a href="#v:fold1" class="selflink">#</a></p><p class="src"><a href="#v:foldMap1">foldMap1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Semigroup.html#t:Semigroup">Semigroup</a> m => (a -> m) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> m <a href="#v:foldMap1" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Eq:27" class="instance expander" onclick="toggleSection('i:id:IterT:Eq:27')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> (m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a))) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a)</span> <a href="src/Control-Monad-Trans-Iter.html#line-139" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Eq:27" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Data:28" class="instance expander" onclick="toggleSection('i:id:IterT:Data:28')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>) m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> (m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a))), <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> a) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a)</span> <a href="src/Control-Monad-Trans-Iter.html#line-440" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Data:28" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:gfoldl">gfoldl</a> :: (<span class="keyword">forall</span> d b. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => c (d -> b) -> d -> c b) -> (<span class="keyword">forall</span> g. g -> c g) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> c (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a) <a href="#v:gfoldl" class="selflink">#</a></p><p class="src"><a href="#v:gunfold">gunfold</a> :: (<span class="keyword">forall</span> b r. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> b => c (b -> r) -> c r) -> (<span class="keyword">forall</span> r. r -> c r) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Constr">Constr</a> -> c (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a) <a href="#v:gunfold" class="selflink">#</a></p><p class="src"><a href="#v:toConstr">toConstr</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Constr">Constr</a> <a href="#v:toConstr" class="selflink">#</a></p><p class="src"><a href="#v:dataTypeOf">dataTypeOf</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:DataType">DataType</a> <a href="#v:dataTypeOf" class="selflink">#</a></p><p class="src"><a href="#v:dataCast1">dataCast1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>) t => (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => c (t d)) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (c (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a)) <a href="#v:dataCast1" class="selflink">#</a></p><p class="src"><a href="#v:dataCast2">dataCast2</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a>) t => (<span class="keyword">forall</span> d e. (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> e) => c (t d e)) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> (c (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a)) <a href="#v:dataCast2" class="selflink">#</a></p><p class="src"><a href="#v:gmapT">gmapT</a> :: (<span class="keyword">forall</span> b. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> b => b -> b) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:gmapT" class="selflink">#</a></p><p class="src"><a href="#v:gmapQl">gmapQl</a> :: (r -> r' -> r) -> r -> (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => d -> r') -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> r <a href="#v:gmapQl" class="selflink">#</a></p><p class="src"><a href="#v:gmapQr">gmapQr</a> :: (r' -> r -> r) -> r -> (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => d -> r') -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> r <a href="#v:gmapQr" class="selflink">#</a></p><p class="src"><a href="#v:gmapQ">gmapQ</a> :: (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => d -> u) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> [u] <a href="#v:gmapQ" class="selflink">#</a></p><p class="src"><a href="#v:gmapQi">gmapQi</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => d -> u) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> u <a href="#v:gmapQi" class="selflink">#</a></p><p class="src"><a href="#v:gmapM">gmapM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => d -> m d) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> m (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a) <a href="#v:gmapM" class="selflink">#</a></p><p class="src"><a href="#v:gmapMp">gmapMp</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> m => (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => d -> m d) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> m (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a) <a href="#v:gmapMp" class="selflink">#</a></p><p class="src"><a href="#v:gmapMo">gmapMo</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> m => (<span class="keyword">forall</span> d. <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Data.html#t:Data">Data</a> d => d -> m d) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> m (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a) <a href="#v:gmapMo" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Ord:29" class="instance expander" onclick="toggleSection('i:id:IterT:Ord:29')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> (m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a))) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ord">Ord</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a)</span> <a href="src/Control-Monad-Trans-Iter.html#line-145" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Ord:29" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(<)</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(<=)</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(>)</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(>=)</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:min" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Read:30" class="instance expander" onclick="toggleSection('i:id:IterT:Read:30')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Read.html#t:Read">Read</a> (m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a))) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Read.html#t:Read">Read</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a)</span> <a href="src/Control-Monad-Trans-Iter.html#line-160" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Read:30" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a) <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> [<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a] <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a) <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a] <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Show:31" class="instance expander" onclick="toggleSection('i:id:IterT:Show:31')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> (m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a))) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a)</span> <a href="src/Control-Monad-Trans-Iter.html#line-152" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Show:31" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:IterT:Monoid:32" class="instance expander" onclick="toggleSection('i:id:IterT:Monoid:32')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a> a) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a)</span> <a href="src/Control-Monad-Trans-Iter.html#line-391" class="link">Source</a> <a href="#t:IterT" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:IterT:Monoid:32" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:mempty">mempty</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:mempty" class="selflink">#</a></p><p class="src"><a href="#v:mappend">mappend</a> :: <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:mappend" class="selflink">#</a></p><p class="src"><a href="#v:mconcat">mconcat</a> :: [<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a] -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="#v:mconcat" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><h1 id="g:2">Capretta's iterative monad</h1><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Iter" class="def">Iter</a> = <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor-Identity.html#t:Identity">Identity</a> <a href="src/Control-Monad-Trans-Iter.html#Iter" class="link">Source</a> <a href="#t:Iter" class="selflink">#</a></p><div class="doc"><p>Plain iterative computations.</p></div></div><div class="top"><p class="src"><a id="v:iter" class="def">iter</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a (<a href="Control-Monad-Trans-Iter.html#t:Iter">Iter</a> a) -> <a href="Control-Monad-Trans-Iter.html#t:Iter">Iter</a> a <a href="src/Control-Monad-Trans-Iter.html#iter" class="link">Source</a> <a href="#v:iter" class="selflink">#</a></p><div class="doc"><p>Builds an iterative computation from one first step.</p><pre>runIter . iter == id</pre></div></div><div class="top"><p class="src"><a id="v:runIter" class="def">runIter</a> :: <a href="Control-Monad-Trans-Iter.html#t:Iter">Iter</a> a -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> a (<a href="Control-Monad-Trans-Iter.html#t:Iter">Iter</a> a) <a href="src/Control-Monad-Trans-Iter.html#runIter" class="link">Source</a> <a href="#v:runIter" class="selflink">#</a></p><div class="doc"><p>Executes the first step of an iterative computation</p><pre>iter . runIter == id</pre></div></div><h1 id="g:3">Combinators</h1><div class="top"><p class="src"><a id="v:delay" class="def">delay</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> f, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f m) => m a -> m a <a href="src/Control-Monad-Trans-Iter.html#delay" class="link">Source</a> <a href="#v:delay" class="selflink">#</a></p><div class="doc"><p>Adds an extra layer to a free monad value.</p><p>In particular, for the iterative monad <code><a href="Control-Monad-Trans-Iter.html#t:Iter">Iter</a></code>, this makes the
computation require one more step, without changing its final
result.</p><pre>runIter (delay ma) == Right ma</pre></div></div><div class="top"><p class="src"><a id="v:hoistIterT" class="def">hoistIterT</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> n => (<span class="keyword">forall</span> a. m a -> n a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m b -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> n b <a href="src/Control-Monad-Trans-Iter.html#hoistIterT" class="link">Source</a> <a href="#v:hoistIterT" class="selflink">#</a></p><div class="doc"><p>Lift a monad homomorphism from <code>m</code> to <code>n</code> into a Monad homomorphism from <code><code><a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a></code> m</code> to <code><code><a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a></code> n</code>.</p></div></div><div class="top"><p class="src"><a id="v:liftIter" class="def">liftIter</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Trans-Iter.html#t:Iter">Iter</a> a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="src/Control-Monad-Trans-Iter.html#liftIter" class="link">Source</a> <a href="#v:liftIter" class="selflink">#</a></p><div class="doc"><p>Lifts a plain, non-terminating computation into a richer environment.
<code><a href="Control-Monad-Trans-Iter.html#v:liftIter">liftIter</a></code> is a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a></code> homomorphism.</p></div></div><div class="top"><p class="src"><a id="v:cutoff" class="def">cutoff</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Prelude.html#t:Integer">Integer</a> -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) <a href="src/Control-Monad-Trans-Iter.html#cutoff" class="link">Source</a> <a href="#v:cutoff" class="selflink">#</a></p><div class="doc"><p>Cuts off an iterative computation after a given number of
steps. If the number of steps is 0 or less, no computation nor
monadic effects will take place.</p><p>The step where the final value is produced also counts towards the limit.</p><p>Some examples (<code>n ≥ 0</code>):</p><pre><code><a href="Control-Monad-Trans-Iter.html#v:cutoff">cutoff</a></code> 0 _ ≡ <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:return">return</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code>
<code><a href="Control-Monad-Trans-Iter.html#v:cutoff">cutoff</a></code> (n+1) <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Function.html#v:.">.</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:return">return</a></code> ≡ <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:return">return</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Function.html#v:.">.</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Just">Just</a></code>
<code><a href="Control-Monad-Trans-Iter.html#v:cutoff">cutoff</a></code> (n+1) <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Function.html#v:.">.</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-Class.html#v:lift">lift</a></code> ≡ <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-Class.html#v:lift">lift</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Function.html#v:.">.</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:liftM">liftM</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Just">Just</a></code>
<code><a href="Control-Monad-Trans-Iter.html#v:cutoff">cutoff</a></code> (n+1) <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Function.html#v:.">.</a></code> <code><a href="Control-Monad-Trans-Iter.html#v:delay">delay</a></code> ≡ <code><a href="Control-Monad-Trans-Iter.html#v:delay">delay</a></code> . <code><a href="Control-Monad-Trans-Iter.html#v:cutoff">cutoff</a></code> n
<code><a href="Control-Monad-Trans-Iter.html#v:cutoff">cutoff</a></code> n <code><a href="Control-Monad-Trans-Iter.html#v:never">never</a></code> ≡ <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:iterate">iterate</a></code> <code><a href="Control-Monad-Trans-Iter.html#v:delay">delay</a></code> (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:return">return</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code>) <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-OldList.html#v:-33--33-">!!</a></code> n
</pre><p>Calling <code><code><a href="Control-Monad-Trans-Iter.html#v:retract">retract</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Function.html#v:.">.</a></code> <code><a href="Control-Monad-Trans-Iter.html#v:cutoff">cutoff</a></code> n</code> is always terminating, provided each of the
steps in the iteration is terminating.</p></div></div><div class="top"><p class="src"><a id="v:never" class="def">never</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> f, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f m) => m a <a href="src/Control-Monad-Trans-Iter.html#never" class="link">Source</a> <a href="#v:never" class="selflink">#</a></p><div class="doc"><p>A computation that never terminates</p></div></div><div class="top"><p class="src"><a id="v:untilJust" class="def">untilJust</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="src/Control-Monad-Trans-Iter.html#untilJust" class="link">Source</a> <a href="#v:untilJust" class="selflink">#</a></p><div class="doc"><p>Repeatedly run a computation until it produces a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#v:Just">Just</a></code> value.
This can be useful when paired with a monad that has side effects.</p><p>For example, we may have <code>genId :: IO (Maybe Id)</code> that uses a random
number generator to allocate ids, but fails if it finds a collision.
We can repeatedly run this with</p><pre><code><a href="Control-Monad-Trans-Iter.html#v:retract">retract</a></code> (<code><a href="Control-Monad-Trans-Iter.html#v:untilJust">untilJust</a></code> genId) :: IO Id
</pre></div></div><div class="top"><p class="src"><a id="v:interleave" class="def">interleave</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => [<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a] -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m [a] <a href="src/Control-Monad-Trans-Iter.html#interleave" class="link">Source</a> <a href="#v:interleave" class="selflink">#</a></p><div class="doc"><p>Interleaves the steps of a finite list of iterative computations, and
collects their results.</p><p>The resulting computation has as many steps as the longest computation
in the list.</p></div></div><div class="top"><p class="src"><a id="v:interleave_" class="def">interleave_</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => [<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a] -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m () <a href="src/Control-Monad-Trans-Iter.html#interleave_" class="link">Source</a> <a href="#v:interleave_" class="selflink">#</a></p><div class="doc"><p>Interleaves the steps of a finite list of computations, and discards their
results.</p><p>The resulting computation has as many steps as the longest computation
in the list.</p><p>Equivalent to <code><code>void</code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Function.html#v:.">.</a></code> <code><a href="Control-Monad-Trans-Iter.html#v:interleave">interleave</a></code></code>.</p></div></div><h1 id="g:4">Consuming iterative monads</h1><div class="top"><p class="src"><a id="v:retract" class="def">retract</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> m a <a href="src/Control-Monad-Trans-Iter.html#retract" class="link">Source</a> <a href="#v:retract" class="selflink">#</a></p><div class="doc"><p><code><a href="Control-Monad-Trans-Iter.html#v:retract">retract</a></code> is the left inverse of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-Class.html#v:lift">lift</a></code></p><pre><code><a href="Control-Monad-Trans-Iter.html#v:retract">retract</a></code> . <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-Class.html#v:lift">lift</a></code> = <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Function.html#v:id">id</a></code>
</pre></div></div><div class="top"><p class="src"><a id="v:fold" class="def">fold</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => (m a -> a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> a <a href="src/Control-Monad-Trans-Iter.html#fold" class="link">Source</a> <a href="#v:fold" class="selflink">#</a></p><div class="doc"><p>Tear down a <code>Free</code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a></code> using iteration.</p></div></div><div class="top"><p class="src"><a id="v:foldM" class="def">foldM</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> n) => (m (n a) -> n a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a -> n a <a href="src/Control-Monad-Trans-Iter.html#foldM" class="link">Source</a> <a href="#v:foldM" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Control-Monad-Trans-Iter.html#v:fold">fold</a></code> with monadic result.</p></div></div><h1 id="g:5">IterT ~ FreeT Identity</h1><div class="top"><p class="src"><span class="keyword">class</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a id="t:MonadFree" class="def">MonadFree</a> f m | m -> f <span class="keyword">where</span> <a href="src/Control-Monad-Free-Class.html#MonadFree" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></p><div class="doc"><p>Monads provide substitution (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#v:fmap">fmap</a></code>) and renormalization (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:join">join</a></code>):</p><pre>m <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:-62--62--61-">>>=</a></code> f = <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:join">join</a></code> (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#v:fmap">fmap</a></code> f m)</pre><p>A free <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a></code> is one that does no work during the normalization step beyond simply grafting the two monadic values together.</p><p><code>[]</code> is not a free <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a></code> (in this sense) because <code><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:join">join</a></code> [[a]]</code> smashes the lists flat.</p><p>On the other hand, consider:</p><pre>data Tree a = Bin (Tree a) (Tree a) | Tip a
</pre><pre>instance <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a></code> Tree where
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:return">return</a></code> = Tip
Tip a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:-62--62--61-">>>=</a></code> f = f a
Bin l r <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:-62--62--61-">>>=</a></code> f = Bin (l <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:-62--62--61-">>>=</a></code> f) (r <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:-62--62--61-">>>=</a></code> f)
</pre><p>This <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a></code> is the free <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a></code> of Pair:</p><pre>data Pair a = Pair a a
</pre><p>And we could make an instance of <code><a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a></code> for it directly:</p><pre>instance <code><a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a></code> Pair Tree where
<code><a href="Control-Monad-Trans-Iter.html#v:wrap">wrap</a></code> (Pair l r) = Bin l r
</pre><p>Or we could choose to program with <code><code><a href="Control-Monad-Free.html#v:Free">Free</a></code> Pair</code> instead of <code>Tree</code>
and thereby avoid having to define our own <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a></code> instance.</p><p>Moreover, <a href="Control-Monad-Free-Church.html">Control.Monad.Free.Church</a> provides a <code><a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a></code>
instance that can improve the <em>asymptotic</em> complexity of code that
constructs free monads by effectively reassociating the use of
(<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#v:-62--62--61-">>>=</a></code>). You may also want to take a look at the <code>kan-extensions</code>
package (<a href="http://hackage.haskell.org/package/kan-extensions">http://hackage.haskell.org/package/kan-extensions</a>).</p><p>See <code><a href="Control-Monad-Free.html#v:Free">Free</a></code> for a more formal definition of the free <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a></code>
for a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a></code>.</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a id="v:wrap" class="def">wrap</a> :: f (m a) -> m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p><div class="doc"><p>Add a layer.</p><pre>wrap (fmap f x) ≡ wrap (fmap return x) >>= f
</pre></div><p class="src"><a id="v:wrap" class="def">wrap</a> :: (m ~ t n, <a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-Class.html#t:MonadTrans">MonadTrans</a> t, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f n, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f) => f (m a) -> m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p><div class="doc"><p>Add a layer.</p><pre>wrap (fmap f x) ≡ wrap (fmap return x) >>= f
</pre></div></div><div class="subs instances"><p id="control.i:MonadFree" class="caption collapser" onclick="toggleSection('i:MonadFree')">Instances</p><div id="section.i:MonadFree" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:1" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:1')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f m) => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-List.html#t:ListT">ListT</a> m)</span> <a href="src/Control-Monad-Free-Class.html#line-142" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-List.html#t:ListT">ListT</a> m a) -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-List.html#t:ListT">ListT</a> m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:2" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:2')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f m) => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f (<a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-Maybe.html#t:MaybeT">MaybeT</a> m)</span> <a href="src/Control-Monad-Free-Class.html#line-136" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: f (<a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-Maybe.html#t:MaybeT">MaybeT</a> m a) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-Maybe.html#t:MaybeT">MaybeT</a> m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:3" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f (<a href="Control-Monad-Free.html#t:Free">Free</a> f)</span> <a href="src/Control-Monad-Free-Class.html#line-287" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: f (<a href="Control-Monad-Free.html#t:Free">Free</a> f a) -> <a href="Control-Monad-Free.html#t:Free">Free</a> f a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:4" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f (<a href="Control-Monad-Free-Church.html#t:F">F</a> f)</span> <a href="src/Control-Monad-Free-Class.html#line-143" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: f (<a href="Control-Monad-Free-Church.html#t:F">F</a> f a) -> <a href="Control-Monad-Free-Church.html#t:F">F</a> f a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:5" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:5')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor-Identity.html#t:Identity">Identity</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m)</span> <a href="src/Control-Monad-Free-Class.html#line-276" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor-Identity.html#t:Identity">Identity</a> (<a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a) -> <a href="Control-Monad-Trans-Iter.html#t:IterT">IterT</a> m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:6" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:6')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f m) => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Except.html#t:ExceptT">ExceptT</a> e m)</span> <a href="src/Control-Monad-Free-Class.html#line-148" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Except.html#t:ExceptT">ExceptT</a> e m a) -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Except.html#t:ExceptT">ExceptT</a> e m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:7" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:7')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f m, <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error-Class.html#t:Error">Error</a> e) => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error.html#t:ErrorT">ErrorT</a> e m)</span> <a href="src/Control-Monad-Free-Class.html#line-145" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error.html#t:ErrorT">ErrorT</a> e m a) -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error.html#t:ErrorT">ErrorT</a> e m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:8" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:8')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f m) => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f (<a href="file:///usr/share/doc/libghc-comonad-doc/html/Control-Comonad-Trans-Identity.html#t:IdentityT">IdentityT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> m)</span> <a href="src/Control-Monad-Free-Class.html#line-139" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:8" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: f (<a href="file:///usr/share/doc/libghc-comonad-doc/html/Control-Comonad-Trans-Identity.html#t:IdentityT">IdentityT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> m a) -> <a href="file:///usr/share/doc/libghc-comonad-doc/html/Control-Comonad-Trans-Identity.html#t:IdentityT">IdentityT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:9" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:9')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a> w) => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Strict.html#t:WriterT">WriterT</a> w m)</span> <a href="src/Control-Monad-Free-Class.html#line-127" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:9" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Strict.html#t:WriterT">WriterT</a> w m a) -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Strict.html#t:WriterT">WriterT</a> w m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:10" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:10')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a> w) => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Lazy.html#t:WriterT">WriterT</a> w m)</span> <a href="src/Control-Monad-Free-Class.html#line-124" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:10" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Lazy.html#t:WriterT">WriterT</a> w m a) -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Lazy.html#t:WriterT">WriterT</a> w m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:11" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:11')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f m) => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> s m)</span> <a href="src/Control-Monad-Free-Class.html#line-118" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:11" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> s m a) -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> s m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:12" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:12')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f m) => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Lazy.html#t:StateT">StateT</a> s m)</span> <a href="src/Control-Monad-Free-Class.html#line-115" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:12" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Lazy.html#t:StateT">StateT</a> s m a) -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Lazy.html#t:StateT">StateT</a> s m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:13" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:13')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m) => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f (<a href="Control-Monad-Trans-Free.html#t:FreeT">FreeT</a> f m)</span> <a href="src/Control-Monad-Free-Class.html#line-294" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:13" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: f (<a href="Control-Monad-Trans-Free.html#t:FreeT">FreeT</a> f m a) -> <a href="Control-Monad-Trans-Free.html#t:FreeT">FreeT</a> f m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:14" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:14')"></span> <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f (<a href="Control-Monad-Trans-Free-Church.html#t:FT">FT</a> f m)</span> <a href="src/Control-Monad-Free-Class.html#line-106" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:14" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: f (<a href="Control-Monad-Trans-Free-Church.html#t:FT">FT</a> f m a) -> <a href="Control-Monad-Trans-Free-Church.html#t:FT">FT</a> f m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:15" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:15')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f m) => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Cont.html#t:ContT">ContT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> r m)</span> <a href="src/Control-Monad-Free-Class.html#line-121" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:15" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Cont.html#t:ContT">ContT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> r m a) -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Cont.html#t:ContT">ContT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> r m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:16" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:16')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f m) => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader.html#t:ReaderT">ReaderT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> e m)</span> <a href="src/Control-Monad-Free-Class.html#line-112" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:16" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader.html#t:ReaderT">ReaderT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> e m a) -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader.html#t:ReaderT">ReaderT</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> e m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:17" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:17')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a> w) => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Lazy.html#t:RWST">RWST</a> r w s m)</span> <a href="src/Control-Monad-Free-Class.html#line-133" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:17" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Lazy.html#t:RWST">RWST</a> r w s m a) -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Lazy.html#t:RWST">RWST</a> r w s m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadFree:MonadFree:18" class="instance expander" onclick="toggleSection('i:ic:MonadFree:MonadFree:18')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> f, <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html#t:Monoid">Monoid</a> w) => <a href="Control-Monad-Trans-Iter.html#t:MonadFree">MonadFree</a> f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span> <a href="src/Control-Monad-Free-Class.html#line-130" class="link">Source</a> <a href="#t:MonadFree" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:MonadFree:MonadFree:18" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:wrap">wrap</a> :: f (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a) -> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a <a href="src/Control-Monad-Free-Class.html#wrap" class="link">Source</a> <a href="#v:wrap" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><h1 id="g:6">Examples</h1><div class="doc"><ul><li><a href="examples/MandelbrotIter.lhs">Rendering the Mandelbrot set</a></li><li><a href="examples/Cabbage.lhs">The wolf, the sheep and the cabbage</a></li></ul></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>
|