This file is indexed.

/usr/share/doc/libghc-adjunctions-doc/html/Control-Monad-Representable-State.html is in libghc-adjunctions-doc 4.3-4build4.

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
<!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.Representable.State</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-Representable-State.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Monad-Representable-State.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">adjunctions-4.3: Adjunctions and representable functors</p></div><div id="content"><div id="module-header"><table class="info"><tr><th valign="top">Copyright</th><td>(c) Edward Kmett &amp; Sjoerd Visscher 2011</td></tr><tr><th>License</th><td>BSD3</td></tr><tr><th>Maintainer</th><td>ekmett@gmail.com</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Control.Monad.Representable.State</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A generalized State monad, parameterized by a Representable functor.
 The representation of that functor serves as the state.</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">type</span> <a href="#t:State">State</a> g = <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor-Identity.html#t:Identity">Identity</a></li><li class="src short"><a href="#v:runState">runState</a> :: <a href="Data-Functor-Rep.html#t:Representable">Representable</a> g =&gt; <a href="Control-Monad-Representable-State.html#t:State">State</a> g a -&gt; <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g -&gt; (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)</li><li class="src short"><a href="#v:evalState">evalState</a> :: <a href="Data-Functor-Rep.html#t:Representable">Representable</a> g =&gt; <a href="Control-Monad-Representable-State.html#t:State">State</a> g a -&gt; <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g -&gt; a</li><li class="src short"><a href="#v:execState">execState</a> :: <a href="Data-Functor-Rep.html#t:Representable">Representable</a> g =&gt; <a href="Control-Monad-Representable-State.html#t:State">State</a> g a -&gt; <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g -&gt; <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g</li><li class="src short"><a href="#v:mapState">mapState</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> g =&gt; ((a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g) -&gt; (b, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; <a href="Control-Monad-Representable-State.html#t:State">State</a> g a -&gt; <a href="Control-Monad-Representable-State.html#t:State">State</a> g b</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:StateT">StateT</a> g m a = <a href="#v:StateT">StateT</a> {<ul class="subs"><li><a href="#v:getStateT">getStateT</a> :: g (m (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g))</li></ul>}</li><li class="src short"><a href="#v:stateT">stateT</a> :: <a href="Data-Functor-Rep.html#t:Representable">Representable</a> g =&gt; (<a href="Data-Functor-Rep.html#t:Rep">Rep</a> g -&gt; m (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a</li><li class="src short"><a href="#v:runStateT">runStateT</a> :: <a href="Data-Functor-Rep.html#t:Representable">Representable</a> g =&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g -&gt; m (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)</li><li class="src short"><a href="#v:evalStateT">evalStateT</a> :: (<a href="Data-Functor-Rep.html#t:Representable">Representable</a> g, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g -&gt; m a</li><li class="src short"><a href="#v:execStateT">execStateT</a> :: (<a href="Data-Functor-Rep.html#t:Representable">Representable</a> g, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g -&gt; m (<a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)</li><li class="src short"><a href="#v:mapStateT">mapStateT</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> g =&gt; (m (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g) -&gt; n (b, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g n b</li><li class="src short"><a href="#v:liftCallCC">liftCallCC</a> :: <a href="Data-Functor-Rep.html#t:Representable">Representable</a> g =&gt; ((((a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g) -&gt; m (b, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; m (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; m (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; ((a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a</li><li class="src short"><a href="#v:liftCallCC-39-">liftCallCC'</a> :: <a href="Data-Functor-Rep.html#t:Representable">Representable</a> g =&gt; ((((a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g) -&gt; m (b, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; m (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; m (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; ((a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a</li><li class="src short"><span class="keyword">class</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="#t:MonadState">MonadState</a> s m | m -&gt; s <span class="keyword">where</span><ul class="subs"></ul></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:State" class="def">State</a> g = <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor-Identity.html#t:Identity">Identity</a> <a href="src/Control-Monad-Representable-State.html#State" class="link">Source</a> <a href="#t:State" class="selflink">#</a></p><div class="doc"><p>A memoized state monad parameterized by a representable functor <code>g</code>, where
 the representatation of <code>g</code>, <code>Rep g</code> is the state to carry.</p><p>The <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#v:return">return</a></code> function leaves the state unchanged, while <code>&gt;&gt;=</code> uses
 the final state of the first computation as the initial state of
 the second.</p></div></div><div class="top"><p class="src"><a id="v:runState" class="def">runState</a> <a href="src/Control-Monad-Representable-State.html#runState" class="link">Source</a> <a href="#v:runState" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Functor-Rep.html#t:Representable">Representable</a> g</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Control-Monad-Representable-State.html#t:State">State</a> g a</td><td class="doc"><p>state-passing computation to execute</p></td></tr><tr><td class="src">-&gt; <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g</td><td class="doc"><p>initial state</p></td></tr><tr><td class="src">-&gt; (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)</td><td class="doc"><p>return value and final state</p></td></tr></table></div><div class="doc"><p>Unwrap a state monad computation as a function.
 (The inverse of <code><a href="Control-Monad-Representable-State.html#v:state">state</a></code>.)</p></div></div><div class="top"><p class="src"><a id="v:evalState" class="def">evalState</a> <a href="src/Control-Monad-Representable-State.html#evalState" class="link">Source</a> <a href="#v:evalState" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Functor-Rep.html#t:Representable">Representable</a> g</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Control-Monad-Representable-State.html#t:State">State</a> g a</td><td class="doc"><p>state-passing computation to execute</p></td></tr><tr><td class="src">-&gt; <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g</td><td class="doc"><p>initial value</p></td></tr><tr><td class="src">-&gt; a</td><td class="doc"><p>return value of the state computation</p></td></tr></table></div><div class="doc"><p>Evaluate a state computation with the given initial state
 and return the final value, discarding the final state.</p><ul><li><pre><code><a href="Control-Monad-Representable-State.html#v:evalState">evalState</a></code> m s = <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Tuple.html#v:fst">fst</a></code> (<code><a href="Control-Monad-Representable-State.html#v:runState">runState</a></code> m s)</pre></li></ul></div></div><div class="top"><p class="src"><a id="v:execState" class="def">execState</a> <a href="src/Control-Monad-Representable-State.html#execState" class="link">Source</a> <a href="#v:execState" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Functor-Rep.html#t:Representable">Representable</a> g</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Control-Monad-Representable-State.html#t:State">State</a> g a</td><td class="doc"><p>state-passing computation to execute</p></td></tr><tr><td class="src">-&gt; <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g</td><td class="doc"><p>initial value</p></td></tr><tr><td class="src">-&gt; <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g</td><td class="doc"><p>final state</p></td></tr></table></div><div class="doc"><p>Evaluate a state computation with the given initial state
 and return the final state, discarding the final value.</p><ul><li><pre><code><a href="Control-Monad-Representable-State.html#v:execState">execState</a></code> m s = <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Tuple.html#v:snd">snd</a></code> (<code><a href="Control-Monad-Representable-State.html#v:runState">runState</a></code> m s)</pre></li></ul></div></div><div class="top"><p class="src"><a id="v:mapState" class="def">mapState</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> g =&gt; ((a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g) -&gt; (b, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; <a href="Control-Monad-Representable-State.html#t:State">State</a> g a -&gt; <a href="Control-Monad-Representable-State.html#t:State">State</a> g b <a href="src/Control-Monad-Representable-State.html#mapState" class="link">Source</a> <a href="#v:mapState" class="selflink">#</a></p><div class="doc"><p>Map both the return value and final state of a computation using
 the given function.</p><ul><li><pre><code><a href="Control-Monad-Representable-State.html#v:runState">runState</a></code> (<code><a href="Control-Monad-Representable-State.html#v:mapState">mapState</a></code> f m) = f . <code><a href="Control-Monad-Representable-State.html#v:runState">runState</a></code> m</pre></li></ul></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a id="t:StateT" class="def">StateT</a> g m a <a href="src/Control-Monad-Representable-State.html#StateT" class="link">Source</a> <a href="#t:StateT" class="selflink">#</a></p><div class="doc"><p>A state transformer monad parameterized by:</p><ul><li><code>g</code> - A representable functor used to memoize results for a state <code>Rep g</code></li><li><code>m</code> - The inner monad.</li></ul><p>The <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#v:return">return</a></code> function leaves the state unchanged, while <code>&gt;&gt;=</code> uses
 the final state of the first computation as the initial state of
 the second.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:StateT" class="def">StateT</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:getStateT" class="def">getStateT</a> :: g (m (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g))</dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:StateT" class="caption collapser" onclick="toggleSection('i:StateT')">Instances</p><div id="section.i:StateT" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:StateT:MonadFree:1" class="instance expander" onclick="toggleSection('i:id:StateT:MonadFree:1')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> f, <a href="Data-Functor-Rep.html#t:Representable">Representable</a> g, <a href="file:///usr/share/doc/libghc-free-doc/html/Control-Monad-Free-Class.html#t:MonadFree">MonadFree</a> f m) =&gt; <a href="file:///usr/share/doc/libghc-free-doc/html/Control-Monad-Free-Class.html#t:MonadFree">MonadFree</a> f (<a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m)</span> <a href="src/Control-Monad-Representable-State.html#line-184" class="link">Source</a> <a href="#t:StateT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:StateT: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="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m 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:StateT:MonadReader:2" class="instance expander" onclick="toggleSection('i:id:StateT:MonadReader:2')"></span> (<a href="Data-Functor-Rep.html#t:Representable">Representable</a> g, <a href="Control-Monad-Representable-Reader.html#t:MonadReader">MonadReader</a> e m) =&gt; <a href="Control-Monad-Representable-Reader.html#t:MonadReader">MonadReader</a> e (<a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m)</span> <a href="src/Control-Monad-Representable-State.html#line-168" class="link">Source</a> <a href="#t:StateT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:StateT:MonadReader:2" 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-Representable-State.html#t:StateT">StateT</a> g m e <a href="#v:ask" class="selflink">#</a></p><p class="src"><a href="#v:local">local</a> :: (e -&gt; e) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a <a href="#v:local" class="selflink">#</a></p><p class="src"><a href="#v:reader">reader</a> :: (e -&gt; a) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g 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:StateT:MonadState:3" class="instance expander" onclick="toggleSection('i:id:StateT:MonadState:3')"></span> (<a href="Data-Functor-Rep.html#t:Representable">Representable</a> g, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, (~) <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> (<a href="Data-Functor-Rep.html#t:Rep">Rep</a> g) s) =&gt; <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s (<a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m)</span> <a href="src/Control-Monad-Representable-State.html#line-161" class="link">Source</a> <a href="#t:StateT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:StateT:MonadState:3" 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-Representable-State.html#t:StateT">StateT</a> g m s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -&gt; (a, s)) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g 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:StateT:MonadWriter:4" class="instance expander" onclick="toggleSection('i:id:StateT:MonadWriter:4')"></span> (<a href="Data-Functor-Rep.html#t:Representable">Representable</a> g, <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Class.html#t:MonadWriter">MonadWriter</a> w m) =&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Class.html#t:MonadWriter">MonadWriter</a> w (<a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m)</span> <a href="src/Control-Monad-Representable-State.html#line-172" class="link">Source</a> <a href="#t:StateT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:StateT:MonadWriter:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:writer">writer</a> :: (a, w) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a <a href="#v:writer" class="selflink">#</a></p><p class="src"><a href="#v:tell">tell</a> :: w -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m () <a href="#v:tell" class="selflink">#</a></p><p class="src"><a href="#v:listen">listen</a> :: <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m (a, w) <a href="#v:listen" class="selflink">#</a></p><p class="src"><a href="#v:pass">pass</a> :: <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m (a, w -&gt; w) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g 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:StateT:MonadTrans:5" class="instance expander" onclick="toggleSection('i:id:StateT:MonadTrans:5')"></span> <a href="Data-Functor-Rep.html#t:Representable">Representable</a> f =&gt; <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-Representable-State.html#t:StateT">StateT</a> f)</span> <a href="src/Control-Monad-Representable-State.html#line-158" class="link">Source</a> <a href="#t:StateT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:StateT:MonadTrans:5" 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.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> f 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:StateT:BindTrans:6" class="instance expander" onclick="toggleSection('i:id:StateT:BindTrans:6')"></span> <a href="Data-Functor-Rep.html#t:Representable">Representable</a> f =&gt; <a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Functor-Bind-Trans.html#t:BindTrans">BindTrans</a> (<a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> f)</span> <a href="src/Control-Monad-Representable-State.html#line-155" class="link">Source</a> <a href="#t:StateT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:StateT:BindTrans:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:liftB">liftB</a> :: <a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Functor-Bind.html#t:Bind">Bind</a> b =&gt; b a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> f b a <a href="#v:liftB" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:StateT:Monad:7" class="instance expander" onclick="toggleSection('i:id:StateT:Monad:7')"></span> (<a href="Data-Functor-Rep.html#t:Representable">Representable</a> g, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> (<a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m)</span> <a href="src/Control-Monad-Representable-State.html#line-149" class="link">Source</a> <a href="#t:StateT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:StateT:Monad:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-62--62--61-">(&gt;&gt;=)</a> :: <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; (a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b <a href="#v:-62--62--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62--62-">(&gt;&gt;)</a> :: <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b <a href="#v:-62--62-" class="selflink">#</a></p><p class="src"><a href="#v:return">return</a> :: a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g 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.1.0/Data-String.html#t:String">String</a> -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g 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:StateT:Functor:8" class="instance expander" onclick="toggleSection('i:id:StateT:Functor:8')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> g, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> m) =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> (<a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m)</span> <a href="src/Control-Monad-Representable-State.html#line-136" class="link">Source</a> <a href="#t:StateT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:StateT: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 -&gt; b) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(&lt;$)</a> :: a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g 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:StateT:Applicative:9" class="instance expander" onclick="toggleSection('i:id:StateT:Applicative:9')"></span> (<a href="Data-Functor-Rep.html#t:Representable">Representable</a> g, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m)</span> <a href="src/Control-Monad-Representable-State.html#line-142" class="link">Source</a> <a href="#t:StateT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:StateT:Applicative:9" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pure">pure</a> :: a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a <a href="#v:pure" class="selflink">#</a></p><p class="src"><a href="#v:-60--42--62-">(&lt;*&gt;)</a> :: <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m (a -&gt; b) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b <a href="#v:-60--42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-42--62-">(*&gt;)</a> :: <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b <a href="#v:-42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-60--42-">(&lt;*)</a> :: <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g 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:StateT:MonadCont:10" class="instance expander" onclick="toggleSection('i:id:StateT:MonadCont:10')"></span> (<a href="Data-Functor-Rep.html#t:Representable">Representable</a> g, <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Cont-Class.html#t:MonadCont">MonadCont</a> m) =&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Cont-Class.html#t:MonadCont">MonadCont</a> (<a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m)</span> <a href="src/Control-Monad-Representable-State.html#line-181" class="link">Source</a> <a href="#t:StateT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:StateT:MonadCont:10" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:callCC">callCC</a> :: ((a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g 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:StateT:Apply:11" class="instance expander" onclick="toggleSection('i:id:StateT:Apply:11')"></span> (<a href="Data-Functor-Rep.html#t:Representable">Representable</a> g, <a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Functor-Bind.html#t:Bind">Bind</a> m) =&gt; <a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Functor-Apply.html#t:Apply">Apply</a> (<a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m)</span> <a href="src/Control-Monad-Representable-State.html#line-139" class="link">Source</a> <a href="#t:StateT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:StateT:Apply:11" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-60-.-62-">(&lt;.&gt;)</a> :: <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m (a -&gt; b) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b <a href="#v:-60-.-62-" class="selflink">#</a></p><p class="src"><a href="#v:.-62-">(.&gt;)</a> :: <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b <a href="#v:.-62-" class="selflink">#</a></p><p class="src"><a href="#v:-60-.">(&lt;.)</a> :: <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g 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:StateT:Bind:12" class="instance expander" onclick="toggleSection('i:id:StateT:Bind:12')"></span> (<a href="Data-Functor-Rep.html#t:Representable">Representable</a> g, <a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Functor-Bind.html#t:Bind">Bind</a> m) =&gt; <a href="file:///usr/share/doc/libghc-semigroupoids-doc/html/Data-Functor-Bind.html#t:Bind">Bind</a> (<a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m)</span> <a href="src/Control-Monad-Representable-State.html#line-146" class="link">Source</a> <a href="#t:StateT" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:StateT:Bind:12" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-62--62--45-">(&gt;&gt;-)</a> :: <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; (a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g 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-Representable-State.html#t:StateT">StateT</a> g m (<a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a <a href="#v:join" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:stateT" class="def">stateT</a> :: <a href="Data-Functor-Rep.html#t:Representable">Representable</a> g =&gt; (<a href="Data-Functor-Rep.html#t:Rep">Rep</a> g -&gt; m (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a <a href="src/Control-Monad-Representable-State.html#stateT" class="link">Source</a> <a href="#v:stateT" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:runStateT" class="def">runStateT</a> :: <a href="Data-Functor-Rep.html#t:Representable">Representable</a> g =&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g -&gt; m (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g) <a href="src/Control-Monad-Representable-State.html#runStateT" class="link">Source</a> <a href="#v:runStateT" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:evalStateT" class="def">evalStateT</a> :: (<a href="Data-Functor-Rep.html#t:Representable">Representable</a> g, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g -&gt; m a <a href="src/Control-Monad-Representable-State.html#evalStateT" class="link">Source</a> <a href="#v:evalStateT" class="selflink">#</a></p><div class="doc"><p>Evaluate a state computation with the given initial state
 and return the final value, discarding the final state.</p><ul><li><pre><code><a href="Control-Monad-Representable-State.html#v:evalStateT">evalStateT</a></code> m s = <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#v:liftM">liftM</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Tuple.html#v:fst">fst</a></code> (<code><a href="Control-Monad-Representable-State.html#v:runStateT">runStateT</a></code> m s)</pre></li></ul></div></div><div class="top"><p class="src"><a id="v:execStateT" class="def">execStateT</a> :: (<a href="Data-Functor-Rep.html#t:Representable">Representable</a> g, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g -&gt; m (<a href="Data-Functor-Rep.html#t:Rep">Rep</a> g) <a href="src/Control-Monad-Representable-State.html#execStateT" class="link">Source</a> <a href="#v:execStateT" class="selflink">#</a></p><div class="doc"><p>Evaluate a state computation with the given initial state
 and return the final state, discarding the final value.</p><ul><li><pre><code><a href="Control-Monad-Representable-State.html#v:execStateT">execStateT</a></code> m s = <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#v:liftM">liftM</a></code> <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Tuple.html#v:snd">snd</a></code> (<code><a href="Control-Monad-Representable-State.html#v:runStateT">runStateT</a></code> m s)</pre></li></ul></div></div><div class="top"><p class="src"><a id="v:mapStateT" class="def">mapStateT</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> g =&gt; (m (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g) -&gt; n (b, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g n b <a href="src/Control-Monad-Representable-State.html#mapStateT" class="link">Source</a> <a href="#v:mapStateT" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:liftCallCC" class="def">liftCallCC</a> :: <a href="Data-Functor-Rep.html#t:Representable">Representable</a> g =&gt; ((((a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g) -&gt; m (b, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; m (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; m (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; ((a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a <a href="src/Control-Monad-Representable-State.html#liftCallCC" class="link">Source</a> <a href="#v:liftCallCC" class="selflink">#</a></p><div class="doc"><p>Uniform lifting of a <code>callCC</code> operation to the new monad.
 This version rolls back to the original state on entering the
 continuation.</p></div></div><div class="top"><p class="src"><a id="v:liftCallCC-39-" class="def">liftCallCC'</a> :: <a href="Data-Functor-Rep.html#t:Representable">Representable</a> g =&gt; ((((a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g) -&gt; m (b, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; m (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; m (a, <a href="Data-Functor-Rep.html#t:Rep">Rep</a> g)) -&gt; ((a -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m b) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m a <a href="src/Control-Monad-Representable-State.html#liftCallCC%27" class="link">Source</a> <a href="#v:liftCallCC-39-" class="selflink">#</a></p><div class="doc"><p>In-situ lifting of a <code>callCC</code> operation to the new monad.
 This version uses the current state on entering the continuation.
 It does not satisfy the laws of a monad transformer.</p></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a id="t:MonadState" class="def">MonadState</a> s m | m -&gt; s <span class="keyword">where</span> <a href="#t:MonadState" class="selflink">#</a></p><div class="doc"><p>Minimal definition is either both of <code>get</code> and <code>put</code> or just <code>state</code></p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="Control-Monad-Representable-State.html#v:state">state</a> | <a href="Control-Monad-Representable-State.html#v:get">get</a>, <a href="Control-Monad-Representable-State.html#v:put">put</a></p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a id="v:get" class="def">get</a> :: m s <a href="#v:get" class="selflink">#</a></p><div class="doc"><p>Return the state from the internals of the monad.</p></div><p class="src"><a id="v:put" class="def">put</a> :: s -&gt; m () <a href="#v:put" class="selflink">#</a></p><div class="doc"><p>Replace the state inside the monad.</p></div><p class="src"><a id="v:state" class="def">state</a> :: (s -&gt; (a, s)) -&gt; m a <a href="#v:state" class="selflink">#</a></p><div class="doc"><p>Embed a simple state action into the monad.</p></div></div><div class="subs instances"><p id="control.i:MonadState" class="caption collapser" onclick="toggleSection('i:MonadState')">Instances</p><div id="section.i:MonadState" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadState:MonadState:1" class="instance expander" onclick="toggleSection('i:ic:MonadState:MonadState:1')"></span> <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s (<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></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadState:MonadState:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</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 s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -&gt; <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 href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -&gt; (a, s)) -&gt; <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="#v:state" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadState:MonadState:2" class="instance expander" onclick="toggleSection('i:ic:MonadState:MonadState:2')"></span> <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-List.html#t:ListT">ListT</a> m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadState:MonadState:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-List.html#t:ListT">ListT</a> m s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-List.html#t:ListT">ListT</a> m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -&gt; (a, s)) -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-List.html#t:ListT">ListT</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:ic:MonadState:MonadState:3" class="instance expander" onclick="toggleSection('i:ic:MonadState:MonadState:3')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> m, <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s m) =&gt; <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s (<a href="file:///usr/share/doc/libghc-free-doc/html/Control-Monad-Free.html#t:Free">Free</a> m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadState:MonadState:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</a> :: <a href="file:///usr/share/doc/libghc-free-doc/html/Control-Monad-Free.html#t:Free">Free</a> m s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -&gt; <a href="file:///usr/share/doc/libghc-free-doc/html/Control-Monad-Free.html#t:Free">Free</a> m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -&gt; (a, s)) -&gt; <a href="file:///usr/share/doc/libghc-free-doc/html/Control-Monad-Free.html#t:Free">Free</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:ic:MonadState:MonadState:4" class="instance expander" onclick="toggleSection('i:ic:MonadState:MonadState:4')"></span> (<a href="Data-Functor-Rep.html#t:Representable">Representable</a> g, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, (~) <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Kind.html#t:-42-">*</a> (<a href="Data-Functor-Rep.html#t:Rep">Rep</a> g) s) =&gt; <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s (<a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m)</span> <a href="#t:MonadState" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadState: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-Representable-State.html#t:StateT">StateT</a> g m s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -&gt; (a, s)) -&gt; <a href="Control-Monad-Representable-State.html#t:StateT">StateT</a> g 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:ic:MonadState:MonadState:5" class="instance expander" onclick="toggleSection('i:ic:MonadState:MonadState:5')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> w, <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s m) =&gt; <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Lazy.html#t:WriterT">WriterT</a> w m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadState:MonadState:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Lazy.html#t:WriterT">WriterT</a> w m s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Lazy.html#t:WriterT">WriterT</a> w m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -&gt; (a, s)) -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Lazy.html#t:WriterT">WriterT</a> w 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:ic:MonadState:MonadState:6" class="instance expander" onclick="toggleSection('i:ic:MonadState:MonadState:6')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> w, <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s m) =&gt; <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Strict.html#t:WriterT">WriterT</a> w m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadState:MonadState:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Strict.html#t:WriterT">WriterT</a> w m s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Strict.html#t:WriterT">WriterT</a> w m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -&gt; (a, s)) -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Strict.html#t:WriterT">WriterT</a> w 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:ic:MonadState:MonadState:7" class="instance expander" onclick="toggleSection('i:ic:MonadState:MonadState:7')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Lazy.html#t:StateT">StateT</a> s m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadState:MonadState:7" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Lazy.html#t:StateT">StateT</a> s m s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Lazy.html#t:StateT">StateT</a> s m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -&gt; (a, s)) -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Lazy.html#t:StateT">StateT</a> s 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:ic:MonadState:MonadState:8" class="instance expander" onclick="toggleSection('i:ic:MonadState:MonadState:8')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> s m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadState:MonadState:8" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> s m s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> s m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -&gt; (a, s)) -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Strict.html#t:StateT">StateT</a> s 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:ic:MonadState:MonadState:9" class="instance expander" onclick="toggleSection('i:ic:MonadState:MonadState:9')"></span> <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s (<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.1.0/Data-Kind.html#t:-42-">*</a> m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadState:MonadState:9" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</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.1.0/Data-Kind.html#t:-42-">*</a> m s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -&gt; <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.1.0/Data-Kind.html#t:-42-">*</a> m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -&gt; (a, s)) -&gt; <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.1.0/Data-Kind.html#t:-42-">*</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:ic:MonadState:MonadState:10" class="instance expander" onclick="toggleSection('i:ic:MonadState:MonadState:10')"></span> <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Except.html#t:ExceptT">ExceptT</a> e m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadState:MonadState:10" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Except.html#t:ExceptT">ExceptT</a> e m s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Except.html#t:ExceptT">ExceptT</a> e m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -&gt; (a, s)) -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Except.html#t:ExceptT">ExceptT</a> e 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:ic:MonadState:MonadState:11" class="instance expander" onclick="toggleSection('i:ic:MonadState:MonadState:11')"></span> (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error-Class.html#t:Error">Error</a> e, <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s m) =&gt; <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error.html#t:ErrorT">ErrorT</a> e m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadState:MonadState:11" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error.html#t:ErrorT">ErrorT</a> e m s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error.html#t:ErrorT">ErrorT</a> e m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -&gt; (a, s)) -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error.html#t:ErrorT">ErrorT</a> e 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:ic:MonadState:MonadState:12" class="instance expander" onclick="toggleSection('i:ic:MonadState:MonadState:12')"></span> <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s (<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.1.0/Data-Kind.html#t:-42-">*</a> r m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadState:MonadState:12" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</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.1.0/Data-Kind.html#t:-42-">*</a> r m s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -&gt; <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.1.0/Data-Kind.html#t:-42-">*</a> r m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -&gt; (a, s)) -&gt; <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.1.0/Data-Kind.html#t:-42-">*</a> r 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:ic:MonadState:MonadState:13" class="instance expander" onclick="toggleSection('i:ic:MonadState:MonadState:13')"></span> <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s m =&gt; <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s (<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.1.0/Data-Kind.html#t:-42-">*</a> r m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadState:MonadState:13" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</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.1.0/Data-Kind.html#t:-42-">*</a> r m s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -&gt; <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.1.0/Data-Kind.html#t:-42-">*</a> r m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -&gt; (a, s)) -&gt; <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.1.0/Data-Kind.html#t:-42-">*</a> r 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:ic:MonadState:MonadState:14" class="instance expander" onclick="toggleSection('i:ic:MonadState:MonadState:14')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> w) =&gt; <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Lazy.html#t:RWST">RWST</a> r w s m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadState:MonadState:14" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Lazy.html#t:RWST">RWST</a> r w s m s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Lazy.html#t:RWST">RWST</a> r w s m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -&gt; (a, s)) -&gt; <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="#v:state" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:MonadState:MonadState:15" class="instance expander" onclick="toggleSection('i:ic:MonadState:MonadState:15')"></span> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Monoid.html#t:Monoid">Monoid</a> w) =&gt; <a href="Control-Monad-Representable-State.html#t:MonadState">MonadState</a> s (<a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:ic:MonadState:MonadState:15" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</a> :: <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m s <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: s -&gt; <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m () <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:state">state</a> :: (s -&gt; (a, s)) -&gt; <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="#v:state" class="selflink">#</a></p></div></div></td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>