/usr/share/doc/libghc-monads-tf-doc/html/Control-Monad-RWS-Strict.html is in libghc-monads-tf-doc 0.1.0.3-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 | <!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.RWS.Strict</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-RWS-Strict.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Control-Monad-RWS-Strict.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">monads-tf-0.1.0.3: Monad classes, using type families</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>(c) Andy Gill 2001,
(c) Oregon Graduate Institute of Science and Technology, 2001</td></tr><tr><th>License</th><td>BSD-style (see the file LICENSE)</td></tr><tr><th>Maintainer</th><td>ross@soi.city.ac.uk</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>non-portable (type families)</td></tr><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Control.Monad.RWS.Strict</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">The RWS monad</a></li><li><a href="#g:2">The RWST monad transformer</a></li><li><a href="#g:3">Strict Reader-writer-state monads</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Strict RWS monad.</p><p>Inspired by the paper
/Functional Programming with Overloading and
Higher-Order Polymorphism/,
Mark P Jones (<a href="http://web.cecs.pdx.edu/~mpj/">http://web.cecs.pdx.edu/~mpj/</a>)
Advanced School of Functional Programming, 1995.</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:RWS">RWS</a> r w s = <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s <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:runRWS">runRWS</a> :: <a href="Control-Monad-RWS-Strict.html#t:RWS">RWS</a> r w s a -> r -> s -> (a, s, w)</li><li class="src short"><a href="#v:evalRWS">evalRWS</a> :: <a href="Control-Monad-RWS-Strict.html#t:RWS">RWS</a> r w s a -> r -> s -> (a, w)</li><li class="src short"><a href="#v:execRWS">execRWS</a> :: <a href="Control-Monad-RWS-Strict.html#t:RWS">RWS</a> r w s a -> r -> s -> (s, w)</li><li class="src short"><a href="#v:mapRWS">mapRWS</a> :: ((a, s, w) -> (b, s, w')) -> <a href="Control-Monad-RWS-Strict.html#t:RWS">RWS</a> r w s a -> <a href="Control-Monad-RWS-Strict.html#t:RWS">RWS</a> r w' s b</li><li class="src short"><a href="#v:withRWS">withRWS</a> :: (r' -> s -> (r, s)) -> <a href="Control-Monad-RWS-Strict.html#t:RWS">RWS</a> r w s a -> <a href="Control-Monad-RWS-Strict.html#t:RWS">RWS</a> r' w s a</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:RWST">RWST</a> r w s m 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> -> (<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> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> = <a href="#v:RWST">RWST</a> {<ul class="subs"><li><a href="#v:runRWST">runRWST</a> :: r -> s -> m (a, s, w)</li></ul>}</li><li class="src short"><a href="#v:evalRWST">evalRWST</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-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> r -> s -> m (a, w)</li><li class="src short"><a href="#v:execRWST">execRWST</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-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> r -> s -> m (s, w)</li><li class="src short"><a href="#v:mapRWST">mapRWST</a> :: (m (a, s, w) -> n (b, s, w')) -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w' s n b</li><li class="src short"><a href="#v:withRWST">withRWST</a> :: (r' -> s -> (r, s)) -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r' w s m a</li><li class="src short">module <a href="Control-Monad-RWS-Class.html">Control.Monad.RWS.Class</a></li><li class="src short">module <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html">Control.Monad</a></li><li class="src short">module <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad-Fix.html">Control.Monad.Fix</a></li><li class="src short">module <a href="Control-Monad-Trans.html">Control.Monad.Trans</a></li><li class="src short">module <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html">Data.Monoid</a></li></ul></div><div id="interface"><h1 id="g:1">The RWS monad</h1><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:RWS" class="def">RWS</a> r w s = <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s <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="#t:RWS" class="selflink">#</a></p><div class="doc"><p>A monad containing an environment of type <code>r</code>, output of type <code>w</code>
and an updatable state of type <code>s</code>.</p></div></div><div class="top"><p class="src"><a id="v:runRWS" class="def">runRWS</a> :: <a href="Control-Monad-RWS-Strict.html#t:RWS">RWS</a> r w s a -> r -> s -> (a, s, w) <a href="#v:runRWS" class="selflink">#</a></p><div class="doc"><p>Unwrap an RWS computation as a function.
(The inverse of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/transformers-0.5.2.0/Control-Monad-Trans-RWS-Strict.html#v:rws">rws</a></code>.)</p></div></div><div class="top"><p class="src"><a id="v:evalRWS" class="def">evalRWS</a> <a href="#v:evalRWS" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Control-Monad-RWS-Strict.html#t:RWS">RWS</a> r w s a</td><td class="doc"><p>RWS computation to execute</p></td></tr><tr><td class="src">-> r</td><td class="doc"><p>initial environment</p></td></tr><tr><td class="src">-> s</td><td class="doc"><p>initial value</p></td></tr><tr><td class="src">-> (a, w)</td><td class="doc"><p>final value and output</p></td></tr></table></div><div class="doc"><p>Evaluate a computation with the given initial state and environment,
returning the final value and output, discarding the final state.</p></div></div><div class="top"><p class="src"><a id="v:execRWS" class="def">execRWS</a> <a href="#v:execRWS" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Control-Monad-RWS-Strict.html#t:RWS">RWS</a> r w s a</td><td class="doc"><p>RWS computation to execute</p></td></tr><tr><td class="src">-> r</td><td class="doc"><p>initial environment</p></td></tr><tr><td class="src">-> s</td><td class="doc"><p>initial value</p></td></tr><tr><td class="src">-> (s, w)</td><td class="doc"><p>final state and output</p></td></tr></table></div><div class="doc"><p>Evaluate a computation with the given initial state and environment,
returning the final state and output, discarding the final value.</p></div></div><div class="top"><p class="src"><a id="v:mapRWS" class="def">mapRWS</a> :: ((a, s, w) -> (b, s, w')) -> <a href="Control-Monad-RWS-Strict.html#t:RWS">RWS</a> r w s a -> <a href="Control-Monad-RWS-Strict.html#t:RWS">RWS</a> r w' s b <a href="#v:mapRWS" class="selflink">#</a></p><div class="doc"><p>Map the return value, final state and output of a computation using
the given function.</p><ul><li><pre><code><a href="Control-Monad-RWS-Strict.html#v:runRWS">runRWS</a></code> (<code><a href="Control-Monad-RWS-Strict.html#v:mapRWS">mapRWS</a></code> f m) r s = f (<code><a href="Control-Monad-RWS-Strict.html#v:runRWS">runRWS</a></code> m r s)</pre></li></ul></div></div><div class="top"><p class="src"><a id="v:withRWS" class="def">withRWS</a> :: (r' -> s -> (r, s)) -> <a href="Control-Monad-RWS-Strict.html#t:RWS">RWS</a> r w s a -> <a href="Control-Monad-RWS-Strict.html#t:RWS">RWS</a> r' w s a <a href="#v:withRWS" class="selflink">#</a></p><div class="doc"><p><code><code><a href="Control-Monad-RWS-Strict.html#v:withRWS">withRWS</a></code> f m</code> executes action <code>m</code> with an initial environment
and state modified by applying <code>f</code>.</p><ul><li><pre><code><a href="Control-Monad-RWS-Strict.html#v:runRWS">runRWS</a></code> (<code><a href="Control-Monad-RWS-Strict.html#v:withRWS">withRWS</a></code> f m) r s = <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Tuple.html#v:uncurry">uncurry</a></code> (<code><a href="Control-Monad-RWS-Strict.html#v:runRWS">runRWS</a></code> m) (f r s)</pre></li></ul></div></div><h1 id="g:2">The RWST monad transformer</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a id="t:RWST" class="def">RWST</a> r w s m 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> -> (<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> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Kind.html#t:-42-">*</a> <a href="#t:RWST" class="selflink">#</a></p><div class="doc"><p>A monad transformer adding reading an environment of type <code>r</code>,
collecting an output of type <code>w</code> and updating a state of type <code>s</code>
to an inner monad <code>m</code>.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:RWST" class="def">RWST</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:runRWST" class="def">runRWST</a> :: r -> s -> m (a, s, w)</dfn><div class="doc empty"> </div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:RWST" class="caption collapser" onclick="toggleSection('i:RWST')">Instances</p><div id="section.i:RWST" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:RWST:MonadTrans:1" class="instance expander" onclick="toggleSection('i:id:RWST:MonadTrans:1')"></span> <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="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-RWS-Strict.html#t:RWST">RWST</a> r w s)</span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST: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-RWS-Strict.html#t:RWST">RWST</a> r w s 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:RWST:Monad:2" class="instance expander" onclick="toggleSection('i:id:RWST:Monad:2')"></span> (<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="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-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST:Monad:2" 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-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> (a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m b) -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s 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-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m b -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s 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-RWS-Strict.html#t:RWST">RWST</a> r w s 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-RWS-Strict.html#t:RWST">RWST</a> r w s 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:RWST:Functor:3" class="instance expander" onclick="toggleSection('i:id:RWST:Functor:3')"></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/ghc-doc/html/libraries/base-4.9.0.0/Data-Functor.html#t:Functor">Functor</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST:Functor:3" 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-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(<$)</a> :: a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m b -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s 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:RWST:MonadFix:4" class="instance expander" onclick="toggleSection('i:id:RWST:MonadFix:4')"></span> (<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="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-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST:MonadFix:4" 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-RWS-Strict.html#t:RWST">RWST</a> r w s m a) -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s 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:RWST:MonadFail:5" class="instance expander" onclick="toggleSection('i:id:RWST:MonadFail:5')"></span> (<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="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad-Fail.html#t:MonadFail">MonadFail</a> m) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad-Fail.html#t:MonadFail">MonadFail</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST:MonadFail:5" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</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-RWS-Strict.html#t:RWST">RWST</a> r w s 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:RWST:Applicative:6" class="instance expander" onclick="toggleSection('i:id:RWST:Applicative:6')"></span> (<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="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/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-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST:Applicative:6" 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-RWS-Strict.html#t:RWST">RWST</a> r w s m a <a href="#v:pure" class="selflink">#</a></p><p class="src"><a href="#v:-60--42--62-">(<*>)</a> :: <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m (a -> b) -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s 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-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m b -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m b <a href="#v:-42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-60--42-">(<*)</a> :: <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m b -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s 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:RWST:MonadIO:7" class="instance expander" onclick="toggleSection('i:id:RWST:MonadIO:7')"></span> (<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="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-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST:MonadIO:7" 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-RWS-Strict.html#t:RWST">RWST</a> r w s 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:RWST:Alternative:8" class="instance expander" onclick="toggleSection('i:id:RWST:Alternative:8')"></span> (<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="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/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:MonadPlus">MonadPlus</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-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST:Alternative:8" 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-RWS-Strict.html#t:RWST">RWST</a> r w s m a <a href="#v:empty" class="selflink">#</a></p><p class="src"><a href="#v:-60--124--62-">(<|>)</a> :: <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s 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-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m [a] <a href="#v:some" class="selflink">#</a></p><p class="src"><a href="#v:many">many</a> :: <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s 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:RWST:MonadPlus:9" class="instance expander" onclick="toggleSection('i:id:RWST:MonadPlus:9')"></span> (<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="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:MonadPlus">MonadPlus</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-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST:MonadPlus:9" 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-RWS-Strict.html#t:RWST">RWST</a> r w s m a <a href="#v:mzero" class="selflink">#</a></p><p class="src"><a href="#v:mplus">mplus</a> :: <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s 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:RWST:MonadCont:10" class="instance expander" onclick="toggleSection('i:id:RWST:MonadCont:10')"></span> (<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-Cont-Class.html#t:MonadCont">MonadCont</a> m) => <a href="Control-Monad-Cont-Class.html#t:MonadCont">MonadCont</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span> <a href="src/Control-Monad-Cont-Class.html#line-116" class="link">Source</a> <a href="#t:MonadCont" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST: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 -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m b) -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a) -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a <a href="src/Control-Monad-Cont-Class.html#callCC" class="link">Source</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:RWST:MonadError:11" class="instance expander" onclick="toggleSection('i:id:RWST:MonadError:11')"></span> (<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-Error-Class.html#t:MonadError">MonadError</a> m) => <a href="Control-Monad-Error-Class.html#t:MonadError">MonadError</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span> <a href="src/Control-Monad-Error-Class.html#line-141" class="link">Source</a> <a href="#t:MonadError" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST:MonadError:11" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="Control-Monad-Error-Class.html#t:ErrorType">ErrorType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m :: <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> <a href="src/Control-Monad-Error-Class.html#ErrorType" class="link">Source</a> <a href="#t:ErrorType" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:throwError">throwError</a> :: <a href="Control-Monad-Error-Class.html#t:ErrorType">ErrorType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m) -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a <a href="src/Control-Monad-Error-Class.html#throwError" class="link">Source</a> <a href="#v:throwError" class="selflink">#</a></p><p class="src"><a href="#v:catchError">catchError</a> :: <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> (<a href="Control-Monad-Error-Class.html#t:ErrorType">ErrorType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m) -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a) -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a <a href="src/Control-Monad-Error-Class.html#catchError" class="link">Source</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:RWST:MonadReader:12" class="instance expander" onclick="toggleSection('i:id:RWST:MonadReader:12')"></span> (<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="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-Reader-Class.html#t:MonadReader">MonadReader</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span> <a href="src/Control-Monad-Reader-Class.html#line-106" class="link">Source</a> <a href="#t:MonadReader" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST:MonadReader:12" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="Control-Monad-Reader-Class.html#t:EnvType">EnvType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m :: <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> <a href="src/Control-Monad-Reader-Class.html#EnvType" class="link">Source</a> <a href="#t:EnvType" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:ask">ask</a> :: <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m (<a href="Control-Monad-Reader-Class.html#t:EnvType">EnvType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)) <a href="src/Control-Monad-Reader-Class.html#ask" class="link">Source</a> <a href="#v:ask" class="selflink">#</a></p><p class="src"><a href="#v:local">local</a> :: (<a href="Control-Monad-Reader-Class.html#t:EnvType">EnvType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m) -> <a href="Control-Monad-Reader-Class.html#t:EnvType">EnvType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)) -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a <a href="src/Control-Monad-Reader-Class.html#local" class="link">Source</a> <a href="#v:local" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:RWST:MonadState:13" class="instance expander" onclick="toggleSection('i:id:RWST:MonadState:13')"></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> w) => <a href="Control-Monad-State-Class.html#t:MonadState">MonadState</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span> <a href="src/Control-Monad-State-Class.html#line-94" class="link">Source</a> <a href="#t:MonadState" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST:MonadState:13" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="Control-Monad-State-Class.html#t:StateType">StateType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m :: <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> <a href="src/Control-Monad-State-Class.html#StateType" class="link">Source</a> <a href="#t:StateType" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:get">get</a> :: <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m (<a href="Control-Monad-State-Class.html#t:StateType">StateType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)) <a href="src/Control-Monad-State-Class.html#get" class="link">Source</a> <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:put">put</a> :: <a href="Control-Monad-State-Class.html#t:StateType">StateType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m) -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m () <a href="src/Control-Monad-State-Class.html#put" class="link">Source</a> <a href="#v:put" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:RWST:MonadWriter:14" class="instance expander" onclick="toggleSection('i:id:RWST:MonadWriter:14')"></span> (<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="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-Writer-Class.html#t:MonadWriter">MonadWriter</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span> <a href="src/Control-Monad-Writer-Class.html#line-91" class="link">Source</a> <a href="#t:MonadWriter" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST:MonadWriter:14" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="Control-Monad-Writer-Class.html#t:WriterType">WriterType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m :: <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> <a href="src/Control-Monad-Writer-Class.html#WriterType" class="link">Source</a> <a href="#t:WriterType" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:tell">tell</a> :: <a href="Control-Monad-Writer-Class.html#t:WriterType">WriterType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m) -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m () <a href="src/Control-Monad-Writer-Class.html#tell" class="link">Source</a> <a href="#v:tell" class="selflink">#</a></p><p class="src"><a href="#v:listen">listen</a> :: <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m (a, <a href="Control-Monad-Writer-Class.html#t:WriterType">WriterType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)) <a href="src/Control-Monad-Writer-Class.html#listen" class="link">Source</a> <a href="#v:listen" class="selflink">#</a></p><p class="src"><a href="#v:pass">pass</a> :: <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m (a, <a href="Control-Monad-Writer-Class.html#t:WriterType">WriterType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m) -> <a href="Control-Monad-Writer-Class.html#t:WriterType">WriterType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)) -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a <a href="src/Control-Monad-Writer-Class.html#pass" class="link">Source</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:RWST:MonadRWS:15" class="instance expander" onclick="toggleSection('i:id:RWST:MonadRWS:15')"></span> (<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="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-RWS-Class.html#t:MonadRWS">MonadRWS</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span> <a href="src/Control-Monad-RWS-Class.html#line-46" class="link">Source</a> <a href="#t:MonadRWS" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST:MonadRWS:15" class="inst-details hide"></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:RWST:ErrorType:16" class="instance expander" onclick="toggleSection('i:id:RWST:ErrorType:16')"></span> <span class="keyword">type</span> <a href="Control-Monad-Error-Class.html#t:ErrorType">ErrorType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span> <a href="src/Control-Monad-Error-Class.html#line-142" class="link">Source</a> <a href="#t:ErrorType" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST:ErrorType:16" class="inst-details hide"><div class="src"><span class="keyword">type</span> <a href="Control-Monad-Error-Class.html#t:ErrorType">ErrorType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m) = <a href="Control-Monad-Error-Class.html#t:ErrorType">ErrorType</a> m</div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:RWST:EnvType:17" class="instance expander" onclick="toggleSection('i:id:RWST:EnvType:17')"></span> <span class="keyword">type</span> <a href="Control-Monad-Reader-Class.html#t:EnvType">EnvType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span> <a href="src/Control-Monad-Reader-Class.html#line-107" class="link">Source</a> <a href="#t:EnvType" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST:EnvType:17" class="inst-details hide"><div class="src"><span class="keyword">type</span> <a href="Control-Monad-Reader-Class.html#t:EnvType">EnvType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m) = r</div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:RWST:StateType:18" class="instance expander" onclick="toggleSection('i:id:RWST:StateType:18')"></span> <span class="keyword">type</span> <a href="Control-Monad-State-Class.html#t:StateType">StateType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span> <a href="src/Control-Monad-State-Class.html#line-95" class="link">Source</a> <a href="#t:StateType" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST:StateType:18" class="inst-details hide"><div class="src"><span class="keyword">type</span> <a href="Control-Monad-State-Class.html#t:StateType">StateType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m) = s</div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:RWST:WriterType:19" class="instance expander" onclick="toggleSection('i:id:RWST:WriterType:19')"></span> <span class="keyword">type</span> <a href="Control-Monad-Writer-Class.html#t:WriterType">WriterType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m)</span> <a href="src/Control-Monad-Writer-Class.html#line-92" class="link">Source</a> <a href="#t:WriterType" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:RWST:WriterType:19" class="inst-details hide"><div class="src"><span class="keyword">type</span> <a href="Control-Monad-Writer-Class.html#t:WriterType">WriterType</a> (<a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m) = w</div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:evalRWST" class="def">evalRWST</a> <a href="#v:evalRWST" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a</td><td class="doc"><p>computation to execute</p></td></tr><tr><td class="src">-> r</td><td class="doc"><p>initial environment</p></td></tr><tr><td class="src">-> s</td><td class="doc"><p>initial value</p></td></tr><tr><td class="src">-> m (a, w)</td><td class="doc"><p>computation yielding final value and output</p></td></tr></table></div><div class="doc"><p>Evaluate a computation with the given initial state and environment,
returning the final value and output, discarding the final state.</p></div></div><div class="top"><p class="src"><a id="v:execRWST" class="def">execRWST</a> <a href="#v:execRWST" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html#t:Monad">Monad</a> m</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a</td><td class="doc"><p>computation to execute</p></td></tr><tr><td class="src">-> r</td><td class="doc"><p>initial environment</p></td></tr><tr><td class="src">-> s</td><td class="doc"><p>initial value</p></td></tr><tr><td class="src">-> m (s, w)</td><td class="doc"><p>computation yielding final state and output</p></td></tr></table></div><div class="doc"><p>Evaluate a computation with the given initial state and environment,
returning the final state and output, discarding the final value.</p></div></div><div class="top"><p class="src"><a id="v:mapRWST" class="def">mapRWST</a> :: (m (a, s, w) -> n (b, s, w')) -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w' s n b <a href="#v:mapRWST" class="selflink">#</a></p><div class="doc"><p>Map the inner computation using the given function.</p><ul><li><pre><code><a href="Control-Monad-RWS-Strict.html#v:runRWST">runRWST</a></code> (<code><a href="Control-Monad-RWS-Strict.html#v:mapRWST">mapRWST</a></code> f m) r s = f (<code><a href="Control-Monad-RWS-Strict.html#v:runRWST">runRWST</a></code> m r s)</pre></li></ul></div></div><div class="top"><p class="src"><a id="v:withRWST" class="def">withRWST</a> :: (r' -> s -> (r, s)) -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r w s m a -> <a href="Control-Monad-RWS-Strict.html#t:RWST">RWST</a> r' w s m a <a href="#v:withRWST" class="selflink">#</a></p><div class="doc"><p><code><code><a href="Control-Monad-RWS-Strict.html#v:withRWST">withRWST</a></code> f m</code> executes action <code>m</code> with an initial environment
and state modified by applying <code>f</code>.</p><ul><li><pre><code><a href="Control-Monad-RWS-Strict.html#v:runRWST">runRWST</a></code> (<code><a href="Control-Monad-RWS-Strict.html#v:withRWST">withRWST</a></code> f m) r s = <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Tuple.html#v:uncurry">uncurry</a></code> (<code><a href="Control-Monad-RWS-Strict.html#v:runRWST">runRWST</a></code> m) (f r s)</pre></li></ul></div></div><h1 id="g:3">Strict Reader-writer-state monads</h1><div class="top"><p class="src">module <a href="Control-Monad-RWS-Class.html">Control.Monad.RWS.Class</a></p></div><div class="top"><p class="src">module <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad.html">Control.Monad</a></p></div><div class="top"><p class="src">module <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Control-Monad-Fix.html">Control.Monad.Fix</a></p></div><div class="top"><p class="src">module <a href="Control-Monad-Trans.html">Control.Monad.Trans</a></p></div><div class="top"><p class="src">module <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Monoid.html">Data.Monoid</a></p></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>
|