Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 8e73407480c13630e1be71907a07fad6 > files > 59

ghc-conduit-devel-0.2.2-1.fc15.i686.rpm

<!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>Data.Conduit</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Data-Conduit.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Conduit.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">conduit-0.2.2: Streaming data processing library.</p></div><div id="content"><div id="module-header"><p class="caption">Data.Conduit</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Types
</a><ul><li><a href="#g:2">Source
</a><ul><li><a href="#g:3">Buffering
</a></li><li><a href="#g:4">Unifying
</a></li></ul></li><li><a href="#g:5">Sink
</a></li><li><a href="#g:6">Conduit
</a></li></ul></li><li><a href="#g:7">Connect/fuse operators
</a></li><li><a href="#g:8">Utility functions
</a><ul><li><a href="#g:9">Source
</a></li><li><a href="#g:10">Sink
</a></li><li><a href="#g:11">Conduit
</a><ul><li><a href="#g:12">Sequencing
</a></li></ul></li></ul></li><li><a href="#g:13">Flushing
</a></li><li><a href="#g:14">Convenience re-exports
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>The main module, exporting types, utility functions, and fuse and connect
 operators.
</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">data</span>  <a href="#t:SourceResult">SourceResult</a> m a<ul class="subs"><li>= <a href="#v:Open">Open</a> (<a href="Data-Conduit.html#t:Source">Source</a> m a) a  </li><li>| <a href="#v:Closed">Closed</a>  </li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Source">Source</a> m a = <a href="#v:Source">Source</a> {<ul class="subs"><li><a href="#v:sourcePull">sourcePull</a> :: <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m (<a href="Data-Conduit.html#t:SourceResult">SourceResult</a> m a)</li><li><a href="#v:sourceClose">sourceClose</a> :: <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li></ul>}</li><li class="src short"><span class="keyword">data</span>  <a href="#t:BufferedSource">BufferedSource</a> m a</li><li class="src short"><a href="#v:bufferSource">bufferSource</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="Data-Conduit.html#t:Source">Source</a> m a -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m (<a href="Data-Conduit.html#t:BufferedSource">BufferedSource</a> m a)</li><li class="src short"><a href="#v:unbufferSource">unbufferSource</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="Data-Conduit.html#t:BufferedSource">BufferedSource</a> m a -&gt; <a href="Data-Conduit.html#t:Source">Source</a> m a</li><li class="src short"><a href="#v:bsourceClose">bsourceClose</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="Data-Conduit.html#t:BufferedSource">BufferedSource</a> m a -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><span class="keyword">class</span>  <a href="#t:IsSource">IsSource</a> src </li><li class="src short"><span class="keyword">data</span>  <a href="#t:SinkResult">SinkResult</a> input m output<ul class="subs"><li>= <a href="#v:Processing">Processing</a> (<a href="Data-Conduit.html#t:SinkPush">SinkPush</a> input m output) (<a href="Data-Conduit.html#t:SinkClose">SinkClose</a> m output)  </li><li>| <a href="#v:Done">Done</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> input) output  </li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Sink">Sink</a> input m output<ul class="subs"><li>= <a href="#v:SinkNoData">SinkNoData</a> output  </li><li>| <a href="#v:SinkData">SinkData</a> { <ul class="subs"><li><a href="#v:sinkPush">sinkPush</a> :: <a href="Data-Conduit.html#t:SinkPush">SinkPush</a> input m output</li><li><a href="#v:sinkClose">sinkClose</a> :: <a href="Data-Conduit.html#t:SinkClose">SinkClose</a> m output</li></ul> }</li><li>| <a href="#v:SinkLift">SinkLift</a> (<a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m (<a href="Data-Conduit.html#t:Sink">Sink</a> input m output))  </li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:SinkPush">SinkPush</a> input m output = input -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m (<a href="Data-Conduit.html#t:SinkResult">SinkResult</a> input m output)</li><li class="src short"><span class="keyword">type</span> <a href="#t:SinkClose">SinkClose</a> m output = <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m output</li><li class="src short"><span class="keyword">data</span>  <a href="#t:ConduitResult">ConduitResult</a> input m output<ul class="subs"><li>= <a href="#v:Producing">Producing</a> (<a href="Data-Conduit.html#t:Conduit">Conduit</a> input m output) [output]  </li><li>| <a href="#v:Finished">Finished</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> input) [output]  </li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Conduit">Conduit</a> input m output = <a href="#v:Conduit">Conduit</a> {<ul class="subs"><li><a href="#v:conduitPush">conduitPush</a> :: <a href="Data-Conduit.html#t:ConduitPush">ConduitPush</a> input m output</li><li><a href="#v:conduitClose">conduitClose</a> :: <a href="Data-Conduit.html#t:ConduitClose">ConduitClose</a> m output</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:ConduitPush">ConduitPush</a> input m output = input -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m (<a href="Data-Conduit.html#t:ConduitResult">ConduitResult</a> input m output)</li><li class="src short"><span class="keyword">type</span> <a href="#t:ConduitClose">ConduitClose</a> m output = <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m [output]</li><li class="src short"><a href="#v:-36--36-">($$)</a> :: (<a href="Data-Conduit.html#t:IsSource">IsSource</a> src, <a href="Data-Conduit.html#t:Resource">Resource</a> m) =&gt; src m a -&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> a m b -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m b</li><li class="src short"><a href="#v:-36--61-">($=)</a> :: (<a href="Data-Conduit.html#t:IsSource">IsSource</a> src, <a href="Data-Conduit.html#t:Resource">Resource</a> m) =&gt; src m a -&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> a m b -&gt; <a href="Data-Conduit.html#t:Source">Source</a> m b</li><li class="src short"><a href="#v:-61--36-">(=$)</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> a m b -&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> b m c -&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> a m c</li><li class="src short"><a href="#v:-61--36--61-">(=$=)</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> a m b -&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> b m c -&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> a m c</li><li class="src short"><a href="#v:sourceState">sourceState</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; state -&gt; (state -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m (<a href="Data-Conduit.html#t:SourceStateResult">SourceStateResult</a> state output)) -&gt; <a href="Data-Conduit.html#t:Source">Source</a> m output</li><li class="src short"><a href="#v:sourceStateIO">sourceStateIO</a> :: <a href="Data-Conduit.html#t:ResourceIO">ResourceIO</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> state -&gt; (state -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>) -&gt; (state -&gt; m (<a href="Data-Conduit.html#t:SourceStateResult">SourceStateResult</a> state output)) -&gt; <a href="Data-Conduit.html#t:Source">Source</a> m output</li><li class="src short"><span class="keyword">data</span>  <a href="#t:SourceStateResult">SourceStateResult</a> state output<ul class="subs"><li>= <a href="#v:StateOpen">StateOpen</a> state output  </li><li>| <a href="#v:StateClosed">StateClosed</a>  </li></ul></li><li class="src short"><a href="#v:sourceIO">sourceIO</a> :: <a href="Data-Conduit.html#t:ResourceIO">ResourceIO</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> state -&gt; (state -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>) -&gt; (state -&gt; m (<a href="Data-Conduit.html#t:SourceIOResult">SourceIOResult</a> output)) -&gt; <a href="Data-Conduit.html#t:Source">Source</a> m output</li><li class="src short"><span class="keyword">data</span>  <a href="#t:SourceIOResult">SourceIOResult</a> output<ul class="subs"><li>= <a href="#v:IOOpen">IOOpen</a> output  </li><li>| <a href="#v:IOClosed">IOClosed</a>  </li></ul></li><li class="src short"><a href="#v:transSource">transSource</a> :: (<a href="Data-Conduit.html#t:Base">Base</a> m ~ <a href="Data-Conduit.html#t:Base">Base</a> n, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; (<span class="keyword">forall</span> a.  m a -&gt; n a) -&gt; <a href="Data-Conduit.html#t:Source">Source</a> m output -&gt; <a href="Data-Conduit.html#t:Source">Source</a> n output</li><li class="src short"><a href="#v:sinkState">sinkState</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; state -&gt; (state -&gt; input -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m (<a href="Data-Conduit.html#t:SinkStateResult">SinkStateResult</a> state input output)) -&gt; (state -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m output) -&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> input m output</li><li class="src short"><span class="keyword">data</span>  <a href="#t:SinkStateResult">SinkStateResult</a> state input output<ul class="subs"><li>= <a href="#v:StateDone">StateDone</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> input) output  </li><li>| <a href="#v:StateProcessing">StateProcessing</a> state  </li></ul></li><li class="src short"><a href="#v:sinkIO">sinkIO</a> :: <a href="Data-Conduit.html#t:ResourceIO">ResourceIO</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> state -&gt; (state -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>) -&gt; (state -&gt; input -&gt; m (<a href="Data-Conduit.html#t:SinkIOResult">SinkIOResult</a> input output)) -&gt; (state -&gt; m output) -&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> input m output</li><li class="src short"><span class="keyword">data</span>  <a href="#t:SinkIOResult">SinkIOResult</a> input output<ul class="subs"><li>= <a href="#v:IODone">IODone</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> input) output  </li><li>| <a href="#v:IOProcessing">IOProcessing</a>  </li></ul></li><li class="src short"><a href="#v:transSink">transSink</a> :: (<a href="Data-Conduit.html#t:Base">Base</a> m ~ <a href="Data-Conduit.html#t:Base">Base</a> n, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; (<span class="keyword">forall</span> a.  m a -&gt; n a) -&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> input m output -&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> input n output</li><li class="src short"><a href="#v:conduitState">conduitState</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; state -&gt; (state -&gt; input -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m (<a href="Data-Conduit.html#t:ConduitStateResult">ConduitStateResult</a> state input output)) -&gt; (state -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m [output]) -&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> input m output</li><li class="src short"><span class="keyword">data</span>  <a href="#t:ConduitStateResult">ConduitStateResult</a> state input output<ul class="subs"><li>= <a href="#v:StateFinished">StateFinished</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> input) [output]  </li><li>| <a href="#v:StateProducing">StateProducing</a> state [output]  </li></ul></li><li class="src short"><a href="#v:conduitIO">conduitIO</a> :: <a href="Data-Conduit.html#t:ResourceIO">ResourceIO</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> state -&gt; (state -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>) -&gt; (state -&gt; input -&gt; m (<a href="Data-Conduit.html#t:ConduitIOResult">ConduitIOResult</a> input output)) -&gt; (state -&gt; m [output]) -&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> input m output</li><li class="src short"><span class="keyword">data</span>  <a href="#t:ConduitIOResult">ConduitIOResult</a> input output<ul class="subs"><li>= <a href="#v:IOFinished">IOFinished</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> input) [output]  </li><li>| <a href="#v:IOProducing">IOProducing</a> [output]  </li></ul></li><li class="src short"><a href="#v:transConduit">transConduit</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Conduit.html#t:Base">Base</a> m ~ <a href="Data-Conduit.html#t:Base">Base</a> n) =&gt; (<span class="keyword">forall</span> a.  m a -&gt; n a) -&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> input m output -&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> input n output</li><li class="src short"><span class="keyword">type</span> <a href="#t:SequencedSink">SequencedSink</a> state input m output = state -&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> input m (<a href="Data-Conduit.html#t:SequencedSinkResponse">SequencedSinkResponse</a> state input m output)</li><li class="src short"><a href="#v:sequenceSink">sequenceSink</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; state -&gt; <a href="Data-Conduit.html#t:SequencedSink">SequencedSink</a> state input m output -&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> input m output</li><li class="src short"><a href="#v:sequence">sequence</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> input m output -&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> input m output</li><li class="src short"><span class="keyword">data</span>  <a href="#t:SequencedSinkResponse">SequencedSinkResponse</a> state input m output<ul class="subs"><li>= <a href="#v:Emit">Emit</a> state [output]  </li><li>| <a href="#v:Stop">Stop</a>  </li><li>| <a href="#v:StartConduit">StartConduit</a> (<a href="Data-Conduit.html#t:Conduit">Conduit</a> input m output)  </li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:Flush">Flush</a> a<ul class="subs"><li>= <a href="#v:Chunk">Chunk</a> a  </li><li>| <a href="#v:Flush">Flush</a>  </li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:ResourceT">ResourceT</a> m a</li><li class="src short"><span class="keyword">class</span> (<a href="Control-Monad-Trans-Resource.html#t:HasRef">HasRef</a> (<a href="Data-Conduit.html#t:Base">Base</a> m), <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a href="#t:Resource">Resource</a> m  <span class="keyword">where</span><ul class="subs"><li><span class="keyword">type</span> <a href="#t:Base">Base</a> m :: * -&gt; *</li><li><a href="#v:resourceLiftBase">resourceLiftBase</a> ::  <a href="Data-Conduit.html#t:Base">Base</a> m a -&gt; m a</li><li><a href="#v:resourceBracket_">resourceBracket_</a> ::  <a href="Data-Conduit.html#t:Base">Base</a> m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a> -&gt; <a href="Data-Conduit.html#t:Base">Base</a> m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a> -&gt; m c -&gt; m c</li></ul></li><li class="src short"><span class="keyword">class</span> (<a href="Control-Monad-Trans-Resource.html#t:ResourceBaseIO">ResourceBaseIO</a> (<a href="Data-Conduit.html#t:Base">Base</a> m), <a href="Data-Conduit.html#t:ResourceUnsafeIO">ResourceUnsafeIO</a> m, <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> m, <a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="/usr/share/doc/ghc/html/libraries/monad-control-0.3.1/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> m) =&gt; <a href="#t:ResourceIO">ResourceIO</a> m </li><li class="src short"><span class="keyword">class</span> <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="#t:ResourceUnsafeIO">ResourceUnsafeIO</a> m </li><li class="src short"><a href="#v:runResourceT">runResourceT</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m a -&gt; m a</li><li class="src short"><span class="keyword">class</span> <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="#t:ResourceThrow">ResourceThrow</a> m  <span class="keyword">where</span><ul class="subs"><li><a href="#v:resourceThrow">resourceThrow</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Exception-Base.html#t:Exception">Exception</a> e =&gt; e -&gt; m a</li></ul></li></ul></div><div id="interface"><h1 id="g:1">Types
</h1><div class="doc"><p>The three core types to this package are <code><a href="Data-Conduit.html#t:Source">Source</a></code> (the data
 producer), <code><a href="Data-Conduit.html#t:Sink">Sink</a></code> (the data consumer), and <code><a href="Data-Conduit.html#t:Conduit">Conduit</a></code> (the data
 transformer). For all three types, a result will provide the next
 value to be used. For example, the <code>Open</code> constructor includes a new
 <code>Source</code> in it. This leads to the main invariant for all conduit code:
 these three types may <em>never</em> be reused.  While some specific values
 may work fine with reuse, the result is generally unpredictable and
 should no be relied upon.
</p><p>The user-facing API provided by the connect and fuse operators
 automatically addresses the low level details of pulling, pushing, and
 closing, and there should rarely be need to perform these actions in
 user code.
</p></div><h2 id="g:2">Source
</h2><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:SourceResult" class="def">SourceResult</a> m a <a href="src/Data-Conduit-Types-Source.html#SourceResult" class="link">Source</a></p><div class="doc"><p>Result of pulling from a source. Either a new piece of data (<code>Open</code>), or
 indicates that the source is now <code>Closed</code>.
</p><p>The <code>Open</code> constructor returns both a new value, as well as a new <code>Source</code>,
 which should be used in place of the previous <code>Source</code>.
</p><p>Since 0.2.0
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Open" class="def">Open</a> (<a href="Data-Conduit.html#t:Source">Source</a> m a) a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Closed" class="def">Closed</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:SourceResult" class="caption collapser" onclick="toggleSection('i:SourceResult')">Instances</p><div id="section.i:SourceResult" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Data-Conduit.html#t:SourceResult">SourceResult</a> m)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Source" class="def">Source</a> m a <a href="src/Data-Conduit-Types-Source.html#Source" class="link">Source</a></p><div class="doc"><p>A <code>Source</code> has two operations on it: pull some data, and close the
 <code>Source</code>. Since <code>Source</code> is built on top of <code><a href="Data-Conduit.html#t:ResourceT">ResourceT</a></code>, all acquired
 resources should be automatically released anyway. Closing a <code>Source</code> early
 is merely an optimization to free scarce resources as soon as possible.
</p><p>A <code>Source</code> is should free any resources it allocated when either
 <code>sourceClose</code> is called or a <code>Closed</code> is returned. However, based on the
 usage of <code>ResourceT</code>, this is simply an optimization.
</p><p>Since 0.2.0
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Source" class="def">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:sourcePull" class="def">sourcePull</a> :: <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m (<a href="Data-Conduit.html#t:SourceResult">SourceResult</a> m a)</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:sourceClose" class="def">sourceClose</a> :: <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Source" class="caption collapser" onclick="toggleSection('i:Source')">Instances</p><div id="section.i:Source" class="show"><table><tr><td class="src"><a href="Data-Conduit.html#t:IsSource">IsSource</a> <a href="Data-Conduit.html#t:Source">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Data-Conduit.html#t:Source">Source</a> m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Monoid.html#t:Monoid">Monoid</a> (<a href="Data-Conduit.html#t:Source">Source</a> m a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h3 id="g:3">Buffering
</h3><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:BufferedSource" class="def">BufferedSource</a> m a <a href="src/Data-Conduit.html#BufferedSource" class="link">Source</a></p><div class="doc"><p>When actually interacting with <code>Source</code>s, we sometimes want to be able to
 buffer the output, in case any intermediate steps return leftover data. A
 <code>BufferedSource</code> allows for such buffering.
</p><p>A <code>BufferedSource</code>, unlike a <code>Source</code>, is resumable, meaning it can be
 passed to multiple <code>Sink</code>s without restarting. Therefore, a <code>BufferedSource</code>
 relaxes the main invariant of this package: the same value may be used
 multiple times.
</p><p>The intention of a <code>BufferedSource</code> is to be used internally by an
 application or library, not to be part of its user-facing API. For example,
 the Warp webserver uses a <code>BufferedSource</code> internally for parsing the
 request headers, but then passes a normal <code>Source</code> to the web application
 for reading the request body.
</p><p>One caveat: while the types will allow you to use the buffered source in
 multiple threads, there is no guarantee that all <code>BufferedSource</code>s will
 handle this correctly.
</p><p>Since 0.2.0
</p></div><div class="subs instances"><p id="control.i:BufferedSource" class="caption collapser" onclick="toggleSection('i:BufferedSource')">Instances</p><div id="section.i:BufferedSource" class="show"><table><tr><td class="src"><a href="Data-Conduit.html#t:IsSource">IsSource</a> <a href="Data-Conduit.html#t:BufferedSource">BufferedSource</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:bufferSource" class="def">bufferSource</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="Data-Conduit.html#t:Source">Source</a> m a -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m (<a href="Data-Conduit.html#t:BufferedSource">BufferedSource</a> m a)<a href="src/Data-Conduit.html#bufferSource" class="link">Source</a></p><div class="doc"><p>Places the given <code>Source</code> and a buffer into a mutable variable. Note that
 you should manually call <code><a href="Data-Conduit.html#v:bsourceClose">bsourceClose</a></code> when the <code><a href="Data-Conduit.html#t:BufferedSource">BufferedSource</a></code> is no
 longer in use.
</p><p>Since 0.2.0
</p></div></div><div class="top"><p class="src"><a name="v:unbufferSource" class="def">unbufferSource</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="Data-Conduit.html#t:BufferedSource">BufferedSource</a> m a -&gt; <a href="Data-Conduit.html#t:Source">Source</a> m a<a href="src/Data-Conduit.html#unbufferSource" class="link">Source</a></p><div class="doc"><p>Turn a <code><a href="Data-Conduit.html#t:BufferedSource">BufferedSource</a></code> into a <code><a href="Data-Conduit.html#t:Source">Source</a></code>. Note that in general this will
 mean your original <code><a href="Data-Conduit.html#t:BufferedSource">BufferedSource</a></code> will be closed. Additionally, all
 leftover data from usage of the returned <code>Source</code> will be discarded. In
 other words: this is a no-going-back move.
</p><p>Note: <code>bufferSource</code> . <code>unbufferSource</code> is <em>not</em> the identity function.
</p><p>Since 0.2.0
</p></div></div><div class="top"><p class="src"><a name="v:bsourceClose" class="def">bsourceClose</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="Data-Conduit.html#t:BufferedSource">BufferedSource</a> m a -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/Data-Conduit.html#bsourceClose" class="link">Source</a></p><div class="doc"><p>Close the underlying <code><a href="Data-Conduit.html#t:Source">Source</a></code> for the given <code><a href="Data-Conduit.html#t:BufferedSource">BufferedSource</a></code>. Note
 that this function can safely be called multiple times, as it will first
 check if the <code><a href="Data-Conduit.html#t:Source">Source</a></code> was previously closed.
</p><p>Since 0.2.0
</p></div></div><h3 id="g:4">Unifying
</h3><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:IsSource" class="def">IsSource</a> src <a href="src/Data-Conduit.html#IsSource" class="link">Source</a></p><div class="doc"><p>A typeclass allowing us to unify operators for <code><a href="Data-Conduit.html#t:Source">Source</a></code> and
 <code><a href="Data-Conduit.html#t:BufferedSource">BufferedSource</a></code>.
</p><p>Since 0.2.0
</p></div><div class="subs instances"><p id="control.i:IsSource" class="caption collapser" onclick="toggleSection('i:IsSource')">Instances</p><div id="section.i:IsSource" class="show"><table><tr><td class="src"><a href="Data-Conduit.html#t:IsSource">IsSource</a> <a href="Data-Conduit.html#t:Source">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Conduit.html#t:IsSource">IsSource</a> <a href="Data-Conduit.html#t:BufferedSource">BufferedSource</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h2 id="g:5">Sink
</h2><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:SinkResult" class="def">SinkResult</a> input m output <a href="src/Data-Conduit-Types-Sink.html#SinkResult" class="link">Source</a></p><div class="doc"><p>A <code>Sink</code> ultimately returns a single output value. Each time data is
 pushed to it, a <code>Sink</code> may indicate that it is still processing data, or
 that it is done, in which case it returns some optional leftover input and
 an output value.
</p><p>The <code>Processing</code> constructors provides updated push and close functions to
 be used in place of the original <code>Sink</code>.
</p><p>Since 0.2.0
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Processing" class="def">Processing</a> (<a href="Data-Conduit.html#t:SinkPush">SinkPush</a> input m output) (<a href="Data-Conduit.html#t:SinkClose">SinkClose</a> m output)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Done" class="def">Done</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> input) output</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:SinkResult" class="caption collapser" onclick="toggleSection('i:SinkResult')">Instances</p><div id="section.i:SinkResult" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Data-Conduit.html#t:SinkResult">SinkResult</a> input m)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Sink" class="def">Sink</a> input m output <a href="src/Data-Conduit-Types-Sink.html#Sink" class="link">Source</a></p><div class="doc"><p>In general, a sink will consume data and eventually produce an output when
 it has consumed &quot;enough&quot; data. There are two caveats to that statement:
</p><ul><li> Some sinks do not actually require any data to produce an output. This is
 included with a sink in order to allow for a <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a></code> instance.
</li><li> Some sinks will consume all available data and only produce a result at
 the &quot;end&quot; of a data stream (e.g., <code>sum</code>).
</li></ul><p>To allow for the first caveat, we have the <code><a href="Data-Conduit.html#v:SinkNoData">SinkNoData</a></code> constructor. For the
 second, the <code><a href="Data-Conduit.html#v:SinkData">SinkData</a></code> constructor has two records: one for receiving more
 input, and the other to indicate the end of a stream. Note that, at the end
 of a stream, some output is required. If a specific <code><a href="Data-Conduit.html#t:Sink">Sink</a></code> implementation
 cannot always produce output, this should be indicated in its return value,
 using something like a <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a></code> or <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Either.html#t:Either">Either</a></code>.
</p><p>A <code>Sink</code> should clean up any resources it has allocated when it returns a
 value, whether that be via <code>sinkPush</code> or <code>sinkClose</code>.
</p><p>Since 0.2.0
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:SinkNoData" class="def">SinkNoData</a> output</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:SinkData" class="def">SinkData</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:sinkPush" class="def">sinkPush</a> :: <a href="Data-Conduit.html#t:SinkPush">SinkPush</a> input m output</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:sinkClose" class="def">sinkClose</a> :: <a href="Data-Conduit.html#t:SinkClose">SinkClose</a> m output</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:SinkLift" class="def">SinkLift</a> (<a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m (<a href="Data-Conduit.html#t:Sink">Sink</a> input m output))</td><td class="doc"><p>This constructor is provided to allow us to create an efficient
 <code>MonadTrans</code> instance.
</p></td></tr></table></div><div class="subs instances"><p id="control.i:Sink" class="caption collapser" onclick="toggleSection('i:Sink')">Instances</p><div id="section.i:Sink" class="show"><table><tr><td class="src">(<a href="Data-Conduit.html#t:Base">Base</a> m ~ base, <a href="Data-Conduit.html#t:Resource">Resource</a> m, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Applicative.html#t:Applicative">Applicative</a> base) =&gt; <a href="/usr/share/doc/ghc/html/libraries/transformers-base-0.4.1/Control-Monad-Base.html#t:MonadBase">MonadBase</a> base (<a href="Data-Conduit.html#t:Sink">Sink</a> input m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-Trans-Class.html#t:MonadTrans">MonadTrans</a> (<a href="Data-Conduit.html#t:Sink">Sink</a> input)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> (<a href="Data-Conduit.html#t:Sink">Sink</a> input m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Data-Conduit.html#t:Sink">Sink</a> input m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Data-Conduit.html#t:Sink">Sink</a> input m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Data-Conduit.html#t:Resource">Resource</a> m, <a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m) =&gt; <a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> (<a href="Data-Conduit.html#t:Sink">Sink</a> input m)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SinkPush" class="def">SinkPush</a> input m output = input -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m (<a href="Data-Conduit.html#t:SinkResult">SinkResult</a> input m output)<a href="src/Data-Conduit-Types-Sink.html#SinkPush" class="link">Source</a></p><div class="doc"><p>The value of the <code>sinkPush</code> record.
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SinkClose" class="def">SinkClose</a> m output = <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m output<a href="src/Data-Conduit-Types-Sink.html#SinkClose" class="link">Source</a></p><div class="doc"><p>The value of the <code>sinkClose</code> record.
</p></div></div><h2 id="g:6">Conduit
</h2><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:ConduitResult" class="def">ConduitResult</a> input m output <a href="src/Data-Conduit-Types-Conduit.html#ConduitResult" class="link">Source</a></p><div class="doc"><p>When data is pushed to a <code>Conduit</code>, it may either indicate that it is
 still producing output and provide some, or indicate that it is finished
 producing output, in which case it returns optional leftover input and some
 final output.
</p><p>The <code>Producing</code> constructor provides a new <code>Conduit</code> to be used in place of
 the previous one.
</p><p>Since 0.2.0
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Producing" class="def">Producing</a> (<a href="Data-Conduit.html#t:Conduit">Conduit</a> input m output) [output]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Finished" class="def">Finished</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> input) [output]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:ConduitResult" class="caption collapser" onclick="toggleSection('i:ConduitResult')">Instances</p><div id="section.i:ConduitResult" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Data-Conduit.html#t:ConduitResult">ConduitResult</a> input m)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Conduit" class="def">Conduit</a> input m output <a href="src/Data-Conduit-Types-Conduit.html#Conduit" class="link">Source</a></p><div class="doc"><p>A conduit has two operations: it can receive new input (a push), and can
 be closed.
</p><p>Since 0.2.0
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Conduit" class="def">Conduit</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:conduitPush" class="def">conduitPush</a> :: <a href="Data-Conduit.html#t:ConduitPush">ConduitPush</a> input m output</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:conduitClose" class="def">conduitClose</a> :: <a href="Data-Conduit.html#t:ConduitClose">ConduitClose</a> m output</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Conduit" class="caption collapser" onclick="toggleSection('i:Conduit')">Instances</p><div id="section.i:Conduit" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Data-Conduit.html#t:Conduit">Conduit</a> input m)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:ConduitPush" class="def">ConduitPush</a> input m output = input -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m (<a href="Data-Conduit.html#t:ConduitResult">ConduitResult</a> input m output)<a href="src/Data-Conduit-Types-Conduit.html#ConduitPush" class="link">Source</a></p><div class="doc"><p>The value of the <code>conduitPush</code> record.
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:ConduitClose" class="def">ConduitClose</a> m output = <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m [output]<a href="src/Data-Conduit-Types-Conduit.html#ConduitClose" class="link">Source</a></p><div class="doc"><p>The value of the <code>conduitClose</code> record.
</p></div></div><h1 id="g:7">Connect/fuse operators
</h1><div class="top"><p class="src"><a name="v:-36--36-" class="def">($$)</a> :: (<a href="Data-Conduit.html#t:IsSource">IsSource</a> src, <a href="Data-Conduit.html#t:Resource">Resource</a> m) =&gt; src m a -&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> a m b -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m b<a href="src/Data-Conduit.html#%24%24" class="link">Source</a></p><div class="doc"><p>The connect operator, which pulls data from a source and pushes to a sink.
 There are three ways this process can terminate:
</p><ol><li> In the case of a <code>SinkNoData</code> constructor, the source is not opened at
 all, and the output value is returned immediately.
</li><li> The sink returns <code>Done</code>. If the input was a <code>BufferedSource</code>, any
 leftover input is put in the buffer. For a normal <code>Source</code>, the leftover
 value is discarded, and the source is closed.
</li><li> The source return <code>Closed</code>, in which case the sink is closed.
</li></ol><p>Note that this function will automatically close any <code>Source</code>s, but will not
 close any <code>BufferedSource</code>s, allowing them to be reused.
</p><p>Since 0.2.0
</p></div></div><div class="top"><p class="src"><a name="v:-36--61-" class="def">($=)</a> :: (<a href="Data-Conduit.html#t:IsSource">IsSource</a> src, <a href="Data-Conduit.html#t:Resource">Resource</a> m) =&gt; src m a -&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> a m b -&gt; <a href="Data-Conduit.html#t:Source">Source</a> m b<a href="src/Data-Conduit.html#%24%3D" class="link">Source</a></p><div class="doc"><p>Left fuse, combining a source and a conduit together into a new source.
</p><p>Note that any <code>Source</code> passed in will be automatically closed, while a
 <code>BufferedSource</code> will be left open.
</p><p>Since 0.2.0
</p></div></div><div class="top"><p class="src"><a name="v:-61--36-" class="def">(=$)</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> a m b -&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> b m c -&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> a m c<a href="src/Data-Conduit.html#%3D%24" class="link">Source</a></p><div class="doc"><p>Right fuse, combining a conduit and a sink together into a new sink.
</p><p>Since 0.2.0
</p></div></div><div class="top"><p class="src"><a name="v:-61--36--61-" class="def">(=$=)</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> a m b -&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> b m c -&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> a m c<a href="src/Data-Conduit.html#%3D%24%3D" class="link">Source</a></p><div class="doc"><p>Middle fuse, combining two conduits together into a new conduit.
</p><p>Since 0.2.0
</p></div></div><h1 id="g:8">Utility functions
</h1><h2 id="g:9">Source
</h2><div class="top"><p class="src"><a name="v:sourceState" class="def">sourceState</a><a href="src/Data-Conduit-Util-Source.html#sourceState" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Conduit.html#t:Resource">Resource</a> m</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; state</td><td class="doc"><p>Initial state
</p></td></tr><tr><td class="src">-&gt; (state -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m (<a href="Data-Conduit.html#t:SourceStateResult">SourceStateResult</a> state output))</td><td class="doc"><p>Pull function
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Conduit.html#t:Source">Source</a> m output</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Construct a <code><a href="Data-Conduit.html#t:Source">Source</a></code> with some stateful functions. This function addresses
 threading the state value for you.
</p><p>Since 0.2.0
</p></div></div><div class="top"><p class="src"><a name="v:sourceStateIO" class="def">sourceStateIO</a><a href="src/Data-Conduit-Util-Source.html#sourceStateIO" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Conduit.html#t:ResourceIO">ResourceIO</a> m</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> state</td><td class="doc"><p>resource and/or state allocation
</p></td></tr><tr><td class="src">-&gt; (state -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</td><td class="doc"><p>resource and/or state cleanup
</p></td></tr><tr><td class="src">-&gt; (state -&gt; m (<a href="Data-Conduit.html#t:SourceStateResult">SourceStateResult</a> state output))</td><td class="doc"><p>Pull function. Note that this need not explicitly perform any cleanup.
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Conduit.html#t:Source">Source</a> m output</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>A combination of <code><a href="Data-Conduit.html#v:sourceIO">sourceIO</a></code> and <code><a href="Data-Conduit.html#v:sourceState">sourceState</a></code>.
</p><p>Since 0.2.1
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:SourceStateResult" class="def">SourceStateResult</a> state output <a href="src/Data-Conduit-Util-Source.html#SourceStateResult" class="link">Source</a></p><div class="doc"><p>The return value when pulling in the <code>sourceState</code> function. Either
 indicates no more data, or the next value and an updated state.
</p><p>Since 0.2.0
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:StateOpen" class="def">StateOpen</a> state output</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:StateClosed" class="def">StateClosed</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><a name="v:sourceIO" class="def">sourceIO</a><a href="src/Data-Conduit-Util-Source.html#sourceIO" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Conduit.html#t:ResourceIO">ResourceIO</a> m</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> state</td><td class="doc"><p>resource and/or state allocation
</p></td></tr><tr><td class="src">-&gt; (state -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</td><td class="doc"><p>resource and/or state cleanup
</p></td></tr><tr><td class="src">-&gt; (state -&gt; m (<a href="Data-Conduit.html#t:SourceIOResult">SourceIOResult</a> output))</td><td class="doc"><p>Pull function. Note that this need not explicitly perform any cleanup.
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Conduit.html#t:Source">Source</a> m output</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Construct a <code><a href="Data-Conduit.html#t:Source">Source</a></code> based on some IO actions for alloc/release.
</p><p>Since 0.2.0
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:SourceIOResult" class="def">SourceIOResult</a> output <a href="src/Data-Conduit-Util-Source.html#SourceIOResult" class="link">Source</a></p><div class="doc"><p>The return value when pulling in the <code>sourceIO</code> function. Either indicates
 no more data, or the next value.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:IOOpen" class="def">IOOpen</a> output</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:IOClosed" class="def">IOClosed</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><a name="v:transSource" class="def">transSource</a> :: (<a href="Data-Conduit.html#t:Base">Base</a> m ~ <a href="Data-Conduit.html#t:Base">Base</a> n, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; (<span class="keyword">forall</span> a.  m a -&gt; n a) -&gt; <a href="Data-Conduit.html#t:Source">Source</a> m output -&gt; <a href="Data-Conduit.html#t:Source">Source</a> n output<a href="src/Data-Conduit-Util-Source.html#transSource" class="link">Source</a></p><div class="doc"><p>Transform the monad a <code><a href="Data-Conduit.html#t:Source">Source</a></code> lives in.
</p><p>Note that this will <em>not</em> thread the individual monads together, meaning
 side effects will be lost. This function is most useful for transformers
 only providing context and not producing side-effects, such as <code>ReaderT</code>.
</p><p>Since 0.2.0
</p></div></div><h2 id="g:10">Sink
</h2><div class="top"><p class="src"><a name="v:sinkState" class="def">sinkState</a><a href="src/Data-Conduit-Util-Sink.html#sinkState" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Conduit.html#t:Resource">Resource</a> m</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; state</td><td class="doc"><p>initial state
</p></td></tr><tr><td class="src">-&gt; (state -&gt; input -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m (<a href="Data-Conduit.html#t:SinkStateResult">SinkStateResult</a> state input output))</td><td class="doc"><p>push
</p></td></tr><tr><td class="src">-&gt; (state -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m output)</td><td class="doc"><p>Close. Note that the state is not returned, as it is not needed.
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> input m output</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Construct a <code><a href="Data-Conduit.html#t:Sink">Sink</a></code> with some stateful functions. This function addresses
 threading the state value for you.
</p><p>Since 0.2.0
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:SinkStateResult" class="def">SinkStateResult</a> state input output <a href="src/Data-Conduit-Util-Sink.html#SinkStateResult" class="link">Source</a></p><div class="doc"><p>A helper type for <code>sinkState</code>, indicating the result of being pushed to.
 It can either indicate that processing is done, or to continue with the
 updated state.
</p><p>Since 0.2.0
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:StateDone" class="def">StateDone</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> input) output</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:StateProcessing" class="def">StateProcessing</a> state</td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><a name="v:sinkIO" class="def">sinkIO</a><a href="src/Data-Conduit-Util-Sink.html#sinkIO" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Conduit.html#t:ResourceIO">ResourceIO</a> m</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> state</td><td class="doc"><p>resource and/or state allocation
</p></td></tr><tr><td class="src">-&gt; (state -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</td><td class="doc"><p>resource and/or state cleanup
</p></td></tr><tr><td class="src">-&gt; (state -&gt; input -&gt; m (<a href="Data-Conduit.html#t:SinkIOResult">SinkIOResult</a> input output))</td><td class="doc"><p>push
</p></td></tr><tr><td class="src">-&gt; (state -&gt; m output)</td><td class="doc"><p>close
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> input m output</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Construct a <code><a href="Data-Conduit.html#t:Sink">Sink</a></code>. Note that your push and close functions need not
 explicitly perform any cleanup.
</p><p>Since 0.2.0
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:SinkIOResult" class="def">SinkIOResult</a> input output <a href="src/Data-Conduit-Util-Sink.html#SinkIOResult" class="link">Source</a></p><div class="doc"><p>A helper type for <code>sinkIO</code>, indicating the result of being pushed to. It
 can either indicate that processing is done, or to continue.
</p><p>Since 0.2.0
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:IODone" class="def">IODone</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> input) output</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:IOProcessing" class="def">IOProcessing</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><a name="v:transSink" class="def">transSink</a> :: (<a href="Data-Conduit.html#t:Base">Base</a> m ~ <a href="Data-Conduit.html#t:Base">Base</a> n, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; (<span class="keyword">forall</span> a.  m a -&gt; n a) -&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> input m output -&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> input n output<a href="src/Data-Conduit-Util-Sink.html#transSink" class="link">Source</a></p><div class="doc"><p>Transform the monad a <code><a href="Data-Conduit.html#t:Sink">Sink</a></code> lives in.
</p><p>See <code>transSource</code> for more information.
</p><p>Since 0.2.0
</p></div></div><h2 id="g:11">Conduit
</h2><div class="top"><p class="src"><a name="v:conduitState" class="def">conduitState</a><a href="src/Data-Conduit-Util-Conduit.html#conduitState" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Conduit.html#t:Resource">Resource</a> m</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; state</td><td class="doc"><p>initial state
</p></td></tr><tr><td class="src">-&gt; (state -&gt; input -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m (<a href="Data-Conduit.html#t:ConduitStateResult">ConduitStateResult</a> state input output))</td><td class="doc"><p>Push function.
</p></td></tr><tr><td class="src">-&gt; (state -&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m [output])</td><td class="doc"><p>Close function. The state need not be returned, since it will not be used again.
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> input m output</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Construct a <code><a href="Data-Conduit.html#t:Conduit">Conduit</a></code> with some stateful functions. This function addresses
 threading the state value for you.
</p><p>Since 0.2.0
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:ConduitStateResult" class="def">ConduitStateResult</a> state input output <a href="src/Data-Conduit-Util-Conduit.html#ConduitStateResult" class="link">Source</a></p><div class="doc"><p>A helper type for <code>conduitState</code>, indicating the result of being pushed
 to.  It can either indicate that processing is done, or to continue with the
 updated state.
</p><p>Since 0.2.0
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:StateFinished" class="def">StateFinished</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> input) [output]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:StateProducing" class="def">StateProducing</a> state [output]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:ConduitStateResult" class="caption collapser" onclick="toggleSection('i:ConduitStateResult')">Instances</p><div id="section.i:ConduitStateResult" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Data-Conduit.html#t:ConduitStateResult">ConduitStateResult</a> state input)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:conduitIO" class="def">conduitIO</a><a href="src/Data-Conduit-Util-Conduit.html#conduitIO" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Conduit.html#t:ResourceIO">ResourceIO</a> m</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> state</td><td class="doc"><p>resource and/or state allocation
</p></td></tr><tr><td class="src">-&gt; (state -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</td><td class="doc"><p>resource and/or state cleanup
</p></td></tr><tr><td class="src">-&gt; (state -&gt; input -&gt; m (<a href="Data-Conduit.html#t:ConduitIOResult">ConduitIOResult</a> input output))</td><td class="doc"><p>Push function. Note that this need not explicitly perform any cleanup.
</p></td></tr><tr><td class="src">-&gt; (state -&gt; m [output])</td><td class="doc"><p>Close function. Note that this need not explicitly perform any cleanup.
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> input m output</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Construct a <code><a href="Data-Conduit.html#t:Conduit">Conduit</a></code>.
</p><p>Since 0.2.0
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:ConduitIOResult" class="def">ConduitIOResult</a> input output <a href="src/Data-Conduit-Util-Conduit.html#ConduitIOResult" class="link">Source</a></p><div class="doc"><p>A helper type for <code>conduitIO</code>, indicating the result of being pushed to.
 It can either indicate that processing is done, or to continue.
</p><p>Since 0.2.0
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:IOFinished" class="def">IOFinished</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> input) [output]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:IOProducing" class="def">IOProducing</a> [output]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:ConduitIOResult" class="caption collapser" onclick="toggleSection('i:ConduitIOResult')">Instances</p><div id="section.i:ConduitIOResult" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Data-Conduit.html#t:ConduitIOResult">ConduitIOResult</a> input)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:transConduit" class="def">transConduit</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="Data-Conduit.html#t:Base">Base</a> m ~ <a href="Data-Conduit.html#t:Base">Base</a> n) =&gt; (<span class="keyword">forall</span> a.  m a -&gt; n a) -&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> input m output -&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> input n output<a href="src/Data-Conduit-Util-Conduit.html#transConduit" class="link">Source</a></p><div class="doc"><p>Transform the monad a <code><a href="Data-Conduit.html#t:Conduit">Conduit</a></code> lives in.
</p><p>See <code>transSource</code> for more information.
</p><p>Since 0.2.0
</p></div></div><h3 id="g:12">Sequencing
</h3><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:SequencedSink" class="def">SequencedSink</a> state input m output = state -&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> input m (<a href="Data-Conduit.html#t:SequencedSinkResponse">SequencedSinkResponse</a> state input m output)<a href="src/Data-Conduit-Util-Conduit.html#SequencedSink" class="link">Source</a></p><div class="doc"><p>Helper type for constructing a <code>Conduit</code> based on <code>Sink</code>s. This allows you
 to write higher-level code that takes advantage of existing conduits and
 sinks, and leverages a sink's monadic interface.
</p><p>Since 0.2.0
</p></div></div><div class="top"><p class="src"><a name="v:sequenceSink" class="def">sequenceSink</a><a href="src/Data-Conduit-Util-Conduit.html#sequenceSink" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Conduit.html#t:Resource">Resource</a> m</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; state</td><td class="doc"><p>initial state
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Conduit.html#t:SequencedSink">SequencedSink</a> state input m output</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> input m output</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Convert a <code><a href="Data-Conduit.html#t:SequencedSink">SequencedSink</a></code> into a <code><a href="Data-Conduit.html#t:Conduit">Conduit</a></code>.
</p><p>Since 0.2.0
</p></div></div><div class="top"><p class="src"><a name="v:sequence" class="def">sequence</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="Data-Conduit.html#t:Sink">Sink</a> input m output -&gt; <a href="Data-Conduit.html#t:Conduit">Conduit</a> input m output<a href="src/Data-Conduit-Util-Conduit.html#sequence" class="link">Source</a></p><div class="doc"><p>Specialised version of <code><a href="Data-Conduit.html#v:sequenceSink">sequenceSink</a></code>
</p><p>Note that this function will return an infinite stream if provided a
 <code>SinkNoData</code> constructor. In other words, you probably don't want to do
 <code>sequence . return</code>.
</p><p>Since 0.2.1
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:SequencedSinkResponse" class="def">SequencedSinkResponse</a> state input m output <a href="src/Data-Conduit-Util-Conduit.html#SequencedSinkResponse" class="link">Source</a></p><div class="doc"><p>Return value from a <code><a href="Data-Conduit.html#t:SequencedSink">SequencedSink</a></code>.
</p><p>Since 0.2.0
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Emit" class="def">Emit</a> state [output]</td><td class="doc"><p>Set a new state, and emit some new output.
</p></td></tr><tr><td class="src"><a name="v:Stop" class="def">Stop</a></td><td class="doc"><p>End the conduit.
</p></td></tr><tr><td class="src"><a name="v:StartConduit" class="def">StartConduit</a> (<a href="Data-Conduit.html#t:Conduit">Conduit</a> input m output)</td><td class="doc"><p>Pass control to a new conduit.
</p></td></tr></table></div></div><h1 id="g:13">Flushing
</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Flush" class="def">Flush</a> a <a href="src/Data-Conduit.html#Flush" class="link">Source</a></p><div class="doc"><p>Provide for a stream of data that can be flushed.
</p><p>A number of <code>Conduit</code>s (e.g., zlib compression) need the ability to flush
 the stream at some point. This provides a single wrapper datatype to be used
 in all such circumstances.
</p><p>Since 0.2.0
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Chunk" class="def">Chunk</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Flush" class="def">Flush</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Flush" class="caption collapser" onclick="toggleSection('i:Flush')">Instances</p><div id="section.i:Flush" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Functor">Functor</a> <a href="Data-Conduit.html#t:Flush">Flush</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Data-Conduit.html#t:Flush">Flush</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Ord.html#t:Ord">Ord</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Ord.html#t:Ord">Ord</a> (<a href="Data-Conduit.html#t:Flush">Flush</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> a =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> (<a href="Data-Conduit.html#t:Flush">Flush</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:14">Convenience re-exports
</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:ResourceT" class="def">ResourceT</a> m a <a href="src/Control-Monad-Trans-Resource.html#ResourceT" class="link">Source</a></p><div class="doc"><p>The Resource transformer. This transformer keeps track of all registered
 actions, and calls them upon exit (via <code><a href="Data-Conduit.html#v:runResourceT">runResourceT</a></code>). Actions may be
 registered via <code><a href="Control-Monad-Trans-Resource.html#v:register">register</a></code>, or resources may be allocated atomically via
 <code><a href="Control-Monad-Trans-Resource.html#v:with">with</a></code> or <code><a href="Control-Monad-Trans-Resource.html#v:withIO">withIO</a></code>. The with functions correspond closely to <code>bracket</code>.
</p><p>Releasing may be performed before exit via the <code><a href="Control-Monad-Trans-Resource.html#v:release">release</a></code> function. This is a
 highly recommended optimization, as it will ensure that scarce resources are
 freed early. Note that calling <code>release</code> will deregister the action, so that
 a release action will only ever be called once.
</p></div><div class="subs instances"><p id="control.i:ResourceT" class="caption collapser" onclick="toggleSection('i:ResourceT')">Instances</p><div id="section.i:ResourceT" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-Trans-Class.html#t:MonadTrans">MonadTrans</a> <a href="Data-Conduit.html#t:ResourceT">ResourceT</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/transformers-base-0.4.1/Control-Monad-Base.html#t:MonadBase">MonadBase</a> b m =&gt; <a href="/usr/share/doc/ghc/html/libraries/transformers-base-0.4.1/Control-Monad-Base.html#t:MonadBase">MonadBase</a> b (<a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/monad-control-0.3.1/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> b m =&gt; <a href="/usr/share/doc/ghc/html/libraries/monad-control-0.3.1/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> b (<a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> (<a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Functor">Functor</a> (<a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Typeable.html#t:Typeable1">Typeable1</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Typeable.html#t:Typeable1">Typeable1</a> (<a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m =&gt; <a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> (<a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Control-Monad-Trans-Resource.html#t:HasRef">HasRef</a> (<a href="Data-Conduit.html#t:Base">Base</a> m), <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> m) =&gt; <a name="t:Resource" class="def">Resource</a> m  <span class="keyword">where</span><a href="src/Control-Monad-Trans-Resource.html#Resource" class="link">Source</a></p><div class="doc"><p>A <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a></code> with a base that has mutable references, and allows some way to
 run base actions and clean up properly.
</p></div><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a name="t:Base" class="def">Base</a> m :: * -&gt; *<a href="src/Control-Monad-Trans-Resource.html#Base" class="link">Source</a></p><div class="doc"><p>The base monad for the current monad stack. This will usually be <code>IO</code>
 or <code>ST</code>.
</p></div></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:resourceLiftBase" class="def">resourceLiftBase</a> ::  <a href="Data-Conduit.html#t:Base">Base</a> m a -&gt; m a<a href="src/Control-Monad-Trans-Resource.html#resourceLiftBase" class="link">Source</a></p><div class="doc"><p>Run some action in the <code>Base</code> monad. This function corresponds to
 <code><a href="/usr/share/doc/ghc/html/libraries/transformers-base-0.4.1/Control-Monad-Base.html#v:liftBase">liftBase</a></code>, but due to various type issues, we need to have our own
 version here.
</p></div><p class="src"><a name="v:resourceBracket_" class="def">resourceBracket_</a><a href="src/Control-Monad-Trans-Resource.html#resourceBracket_" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Conduit.html#t:Base">Base</a> m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></td><td class="doc"><p>init
</p></td></tr><tr><td class="src">-&gt; <a href="Data-Conduit.html#t:Base">Base</a> m <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></td><td class="doc"><p>cleanup
</p></td></tr><tr><td class="src">-&gt; m c</td><td class="doc"><p>body
</p></td></tr><tr><td class="src">-&gt; m c</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Guarantee that some initialization and cleanup code is called before
 and after some action. Note that the initialization and cleanup lives in
 the base monad, while the body is in the top monad.
</p></div></div><div class="subs instances"><p id="control.i:Resource" class="caption collapser" onclick="toggleSection('i:Resource')">Instances</p><div id="section.i:Resource" class="show"><table><tr><td class="src"><a href="Data-Conduit.html#t:Resource">Resource</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/monad-control-0.3.1/Control-Monad-Trans-Control.html#t:MonadTransControl">MonadTransControl</a> t, <a href="Data-Conduit.html#t:Resource">Resource</a> m, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> (t m)) =&gt; <a href="Data-Conduit.html#t:Resource">Resource</a> (t m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Conduit.html#t:Resource">Resource</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad-ST.html#t:ST">ST</a> s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Conduit.html#t:Resource">Resource</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad-ST-Lazy.html#t:ST">ST</a> s)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> (<a href="Control-Monad-Trans-Resource.html#t:ResourceBaseIO">ResourceBaseIO</a> (<a href="Data-Conduit.html#t:Base">Base</a> m), <a href="Data-Conduit.html#t:ResourceUnsafeIO">ResourceUnsafeIO</a> m, <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> m, <a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="/usr/share/doc/ghc/html/libraries/monad-control-0.3.1/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> m) =&gt; <a name="t:ResourceIO" class="def">ResourceIO</a> m <a href="src/Control-Monad-Trans-Resource.html#ResourceIO" class="link">Source</a></p><div class="doc"><p>A <code><a href="Data-Conduit.html#t:Resource">Resource</a></code> which can safely run <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a></code> calls.
</p></div><div class="subs instances"><p id="control.i:ResourceIO" class="caption collapser" onclick="toggleSection('i:ResourceIO')">Instances</p><div id="section.i:ResourceIO" class="show"><table><tr><td class="src"><a href="Data-Conduit.html#t:ResourceIO">ResourceIO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/monad-control-0.3.1/Control-Monad-Trans-Control.html#t:MonadTransControl">MonadTransControl</a> t, <a href="Data-Conduit.html#t:ResourceIO">ResourceIO</a> m, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> (t m), <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> (t m), <a href="/usr/share/doc/ghc/html/libraries/monad-control-0.3.1/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> (t m), <a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> (t m)) =&gt; <a href="Data-Conduit.html#t:ResourceIO">ResourceIO</a> (t m)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a name="t:ResourceUnsafeIO" class="def">ResourceUnsafeIO</a> m <a href="src/Control-Monad-Trans-Resource.html#ResourceUnsafeIO" class="link">Source</a></p><div class="doc"><p>A <code><a href="Data-Conduit.html#t:Resource">Resource</a></code> based on some monad which allows running of some <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a></code>
 actions, via unsafe calls. This applies to <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a></code> and <code><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad-ST.html#t:ST">ST</a></code>, for instance.
</p></div><div class="subs instances"><p id="control.i:ResourceUnsafeIO" class="caption collapser" onclick="toggleSection('i:ResourceUnsafeIO')">Instances</p><div id="section.i:ResourceUnsafeIO" class="show"><table><tr><td class="src"><a href="Data-Conduit.html#t:ResourceUnsafeIO">ResourceUnsafeIO</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/monad-control-0.3.1/Control-Monad-Trans-Control.html#t:MonadTransControl">MonadTransControl</a> t, <a href="Data-Conduit.html#t:ResourceUnsafeIO">ResourceUnsafeIO</a> m, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad.html#t:Monad">Monad</a> (t m)) =&gt; <a href="Data-Conduit.html#t:ResourceUnsafeIO">ResourceUnsafeIO</a> (t m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Conduit.html#t:ResourceUnsafeIO">ResourceUnsafeIO</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad-ST.html#t:ST">ST</a> s)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Conduit.html#t:ResourceUnsafeIO">ResourceUnsafeIO</a> (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Monad-ST-Lazy.html#t:ST">ST</a> s)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:runResourceT" class="def">runResourceT</a> :: <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a href="Data-Conduit.html#t:ResourceT">ResourceT</a> m a -&gt; m a<a href="src/Control-Monad-Trans-Resource.html#runResourceT" class="link">Source</a></p><div class="doc"><p>Unwrap a <code><a href="Data-Conduit.html#t:ResourceT">ResourceT</a></code> transformer, and call all registered release actions.
</p><p>Note that there is some reference counting involved due to <code><a href="Control-Monad-Trans-Resource.html#v:resourceForkIO">resourceForkIO</a></code>.
 If multiple threads are sharing the same collection of resources, only the
 last call to <code>runResourceT</code> will deallocate the resources.
</p></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="Data-Conduit.html#t:Resource">Resource</a> m =&gt; <a name="t:ResourceThrow" class="def">ResourceThrow</a> m  <span class="keyword">where</span><a href="src/Control-Monad-Trans-Resource.html#ResourceThrow" class="link">Source</a></p><div class="doc"><p>A <code><a href="Data-Conduit.html#t:Resource">Resource</a></code> which can throw exceptions. Note that this does not work in a
 vanilla <code>ST</code> monad. Instead, you should use the <code><a href="Control-Monad-Trans-Resource.html#t:ExceptionT">ExceptionT</a></code> transformer on
 top of <code>ST</code>.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:resourceThrow" class="def">resourceThrow</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Control-Exception-Base.html#t:Exception">Exception</a> e =&gt; e -&gt; m a<a href="src/Control-Monad-Trans-Resource.html#resourceThrow" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:ResourceThrow" class="caption collapser" onclick="toggleSection('i:ResourceThrow')">Instances</p><div id="section.i:ResourceThrow" class="show"><table><tr><td class="src"><a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> m =&gt; <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> (<a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-Trans-Maybe.html#t:MaybeT">MaybeT</a> m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> m =&gt; <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> (<a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-Trans-List.html#t:ListT">ListT</a> m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> m =&gt; <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> (<a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-Trans-Identity.html#t:IdentityT">IdentityT</a> m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Data-Conduit.html#t:Resource">Resource</a> m, <a href="/usr/share/doc/ghc/html/libraries/monad-control-0.3.1/Control-Monad-Trans-Control.html#t:MonadBaseControl">MonadBaseControl</a> (<a href="Data-Conduit.html#t:Base">Base</a> m) m) =&gt; <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> (<a href="Control-Monad-Trans-Resource.html#t:ExceptionT">ExceptionT</a> m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Monoid.html#t:Monoid">Monoid</a> w, <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> m) =&gt; <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> (<a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-Trans-Writer-Strict.html#t:WriterT">WriterT</a> w m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Monoid.html#t:Monoid">Monoid</a> w, <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> m) =&gt; <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> (<a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-Trans-Writer-Lazy.html#t:WriterT">WriterT</a> w m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> m =&gt; <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> (<a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-Trans-State-Strict.html#t:StateT">StateT</a> s m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> m =&gt; <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> (<a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-Trans-State-Lazy.html#t:StateT">StateT</a> s m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> m =&gt; <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> (<a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-Trans-Reader.html#t:ReaderT">ReaderT</a> r m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-Trans-Error.html#t:Error">Error</a> e, <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> m) =&gt; <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> (<a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-Trans-Error.html#t:ErrorT">ErrorT</a> e m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Monoid.html#t:Monoid">Monoid</a> w, <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> m) =&gt; <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> (<a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-Trans-RWS-Strict.html#t:RWST">RWST</a> r w s m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Monoid.html#t:Monoid">Monoid</a> w, <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> m) =&gt; <a href="Data-Conduit.html#t:ResourceThrow">ResourceThrow</a> (<a href="/usr/share/doc/ghc/html/libraries/transformers-0.2.2.0/Control-Monad-Trans-RWS-Lazy.html#t:RWST">RWST</a> r w s m)</td><td class="doc empty">&nbsp;</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.9.2</p></div></body></html>