/usr/share/doc/libghc-conduit-doc/html/Data-Conduit-Internal.html is in libghc-conduit-doc 1.0.13-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | <!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.Internal</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-Internal.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Conduit-Internal.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-1.0.13: Streaming data processing library.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Data.Conduit.Internal</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Types
</a></li><li><a href="#g:2">Primitives
</a></li><li><a href="#g:3">Finalization
</a></li><li><a href="#g:4">Composition
</a></li><li><a href="#g:5">Generalizing
</a></li><li><a href="#g:6">Exceptions
</a></li><li><a href="#g:7">Utilities
</a></li></ul></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:Pipe">Pipe</a> l i o u m r<ul class="subs"><li>= <a href="#v:HaveOutput">HaveOutput</a> (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r) (m ()) o </li><li>| <a href="#v:NeedInput">NeedInput</a> (i -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r) (u -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r) </li><li>| <a href="#v:Done">Done</a> r </li><li>| <a href="#v:PipeM">PipeM</a> (m (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r)) </li><li>| <a href="#v:Leftover">Leftover</a> (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r) l </li></ul></li><li class="src short"><span class="keyword">newtype</span> <a href="#t:ConduitM">ConduitM</a> i o m r = <a href="#v:ConduitM">ConduitM</a> {<ul class="subs"><li><a href="#v:unConduitM">unConduitM</a> :: <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> i i o () m r</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:Source">Source</a> m o = <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> () o m ()</li><li class="src short"><span class="keyword">type</span> <a href="#t:Producer">Producer</a> m o = <span class="keyword">forall</span> i. <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m ()</li><li class="src short"><span class="keyword">type</span> <a href="#t:Sink">Sink</a> i = <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i <a href="/usr/share/doc/libghc-void-doc/html/Data-Void.html#t:Void">Void</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:Consumer">Consumer</a> i m r = <span class="keyword">forall</span> o. <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m r</li><li class="src short"><span class="keyword">type</span> <a href="#t:Conduit">Conduit</a> i m o = <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m ()</li><li class="src short"><span class="keyword">data</span> <a href="#t:ResumableSource">ResumableSource</a> m o = <a href="#v:ResumableSource">ResumableSource</a> (<a href="Data-Conduit-Internal.html#t:Source">Source</a> m o) (m ())</li><li class="src short"><a href="#v:await">await</a> :: <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> i)</li><li class="src short"><a href="#v:awaitE">awaitE</a> :: <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> u i)</li><li class="src short"><a href="#v:awaitForever">awaitForever</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => (i -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o r m r') -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o r m r</li><li class="src short"><a href="#v:yield">yield</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => o -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m ()</li><li class="src short"><a href="#v:yieldOr">yieldOr</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => o -> m () -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m ()</li><li class="src short"><a href="#v:leftover">leftover</a> :: l -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m ()</li><li class="src short"><a href="#v:bracketP">bracketP</a> :: <a href="Data-Conduit.html#t:MonadResource">MonadResource</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> a -> (a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()) -> (a -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r) -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r</li><li class="src short"><a href="#v:addCleanup">addCleanup</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> m ()) -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r</li><li class="src short"><a href="#v:idP">idP</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a a r m r</li><li class="src short"><a href="#v:pipe">pipe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a b r0 m r1 -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> <a href="/usr/share/doc/libghc-void-doc/html/Data-Void.html#t:Void">Void</a> b c r1 m r2 -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a c r0 m r2</li><li class="src short"><a href="#v:pipeL">pipeL</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a b r0 m r1 -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> b b c r1 m r2 -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a c r0 m r2</li><li class="src short"><a href="#v:connectResume">connectResume</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:ResumableSource">ResumableSource</a> m o -> <a href="Data-Conduit-Internal.html#t:Sink">Sink</a> o m r -> m (<a href="Data-Conduit-Internal.html#t:ResumableSource">ResumableSource</a> m o, r)</li><li class="src short"><a href="#v:runPipe">runPipe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> <a href="/usr/share/doc/libghc-void-doc/html/Data-Void.html#t:Void">Void</a> () <a href="/usr/share/doc/libghc-void-doc/html/Data-Void.html#t:Void">Void</a> () m r -> m r</li><li class="src short"><a href="#v:injectLeftovers">injectLeftovers</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> i i o u m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r</li><li class="src short"><a href="#v:-62--43--62-">(>+>)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a b r0 m r1 -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> <a href="/usr/share/doc/libghc-void-doc/html/Data-Void.html#t:Void">Void</a> b c r1 m r2 -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a c r0 m r2</li><li class="src short"><a href="#v:-60--43--60-">(<+<)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> <a href="/usr/share/doc/libghc-void-doc/html/Data-Void.html#t:Void">Void</a> b c r1 m r2 -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a b r0 m r1 -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a c r0 m r2</li><li class="src short"><a href="#v:sourceToPipe">sourceToPipe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Source">Source</a> m o -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m ()</li><li class="src short"><a href="#v:sinkToPipe">sinkToPipe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Sink">Sink</a> i m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r</li><li class="src short"><a href="#v:conduitToPipe">conduitToPipe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Conduit">Conduit</a> i m o -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m ()</li><li class="src short"><a href="#v:toProducer">toProducer</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Source">Source</a> m a -> <a href="Data-Conduit-Internal.html#t:Producer">Producer</a> m a</li><li class="src short"><a href="#v:toConsumer">toConsumer</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Sink">Sink</a> a m b -> <a href="Data-Conduit-Internal.html#t:Consumer">Consumer</a> a m b</li><li class="src short"><a href="#v:catchP">catchP</a> :: (<a href="Data-Conduit.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> m, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:Exception">Exception</a> e) => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r -> (e -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r) -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r</li><li class="src short"><a href="#v:handleP">handleP</a> :: (<a href="Data-Conduit.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> m, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:Exception">Exception</a> e) => (e -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r) -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r</li><li class="src short"><a href="#v:tryP">tryP</a> :: (<a href="Data-Conduit.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> m, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:Exception">Exception</a> e) => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> e r)</li><li class="src short"><a href="#v:catchC">catchC</a> :: (<a href="Data-Conduit.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> m, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:Exception">Exception</a> e) => <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m r -> (e -> <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m r) -> <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m r</li><li class="src short"><a href="#v:handleC">handleC</a> :: (<a href="Data-Conduit.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> m, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:Exception">Exception</a> e) => (e -> <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m r) -> <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m r -> <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m r</li><li class="src short"><a href="#v:tryC">tryC</a> :: (<a href="Data-Conduit.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> m, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:Exception">Exception</a> e) => <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m r -> <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> e r)</li><li class="src short"><a href="#v:transPipe">transPipe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => (<span class="keyword">forall</span> a. m a -> n a) -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u n r</li><li class="src short"><a href="#v:mapOutput">mapOutput</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => (o1 -> o2) -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o1 u m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o2 u m r</li><li class="src short"><a href="#v:mapOutputMaybe">mapOutputMaybe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => (o1 -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> o2) -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o1 u m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o2 u m r</li><li class="src short"><a href="#v:mapInput">mapInput</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => (i1 -> i2) -> (l2 -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> l1) -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l2 i2 o u m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l1 i1 o u m r</li><li class="src short"><a href="#v:sourceList">sourceList</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => [a] -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i a u m ()</li><li class="src short"><a href="#v:withUpstream">withUpstream</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m (u, r)</li><li class="src short"><a href="#v:unwrapResumable">unwrapResumable</a> :: <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="Data-Conduit-Internal.html#t:ResumableSource">ResumableSource</a> m o -> m (<a href="Data-Conduit-Internal.html#t:Source">Source</a> m o, m ())</li><li class="src short"><a href="#v:enumFromTo">enumFromTo</a> :: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Enum">Enum</a> o, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> o, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m) => o -> o -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m ()</li><li class="src short"><a href="#v:zipSinks">zipSinks</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Sink">Sink</a> i m r -> <a href="Data-Conduit-Internal.html#t:Sink">Sink</a> i m r' -> <a href="Data-Conduit-Internal.html#t:Sink">Sink</a> i m (r, r')</li><li class="src short"><a href="#v:zipSources">zipSources</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Source">Source</a> m a -> <a href="Data-Conduit-Internal.html#t:Source">Source</a> m b -> <a href="Data-Conduit-Internal.html#t:Source">Source</a> m (a, b)</li><li class="src short"><a href="#v:zipSourcesApp">zipSourcesApp</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Source">Source</a> m (a -> b) -> <a href="Data-Conduit-Internal.html#t:Source">Source</a> m a -> <a href="Data-Conduit-Internal.html#t:Source">Source</a> m b</li></ul></div><div id="interface"><h1 id="g:1">Types
</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Pipe" class="def">Pipe</a> l i o u m r <a href="src/Data-Conduit-Internal.html#Pipe" class="link">Source</a></p><div class="doc"><p>The underlying datatype for all the types in this package. In has six
type parameters:
</p><ul><li> <em>l</em> is the type of values that may be left over from this <code>Pipe</code>. A <code>Pipe</code>
with no leftovers would use <code>Void</code> here, and one with leftovers would use
the same type as the <em>i</em> parameter. Leftovers are automatically provided to
the next <code>Pipe</code> in the monadic chain.
</li><li> <em>i</em> is the type of values for this <code>Pipe</code>'s input stream.
</li><li> <em>o</em> is the type of values for this <code>Pipe</code>'s output stream.
</li><li> <em>u</em> is the result type from the upstream <code>Pipe</code>.
</li><li> <em>m</em> is the underlying monad.
</li><li> <em>r</em> is the result type.
</li></ul><p>A basic intuition is that every <code>Pipe</code> produces a stream of output values
(<em>o</em>), and eventually indicates that this stream is terminated by sending a
result (<em>r</em>). On the receiving end of a <code>Pipe</code>, these become the <em>i</em> and <em>u</em>
parameters.
</p><p>Since 0.5.0
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:HaveOutput" class="def">HaveOutput</a> (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r) (m ()) o</td><td class="doc"><p>Provide new output to be sent downstream. This constructor has three
fields: the next <code>Pipe</code> to be used, a finalization function, and the
output value.
</p></td></tr><tr><td class="src"><a name="v:NeedInput" class="def">NeedInput</a> (i -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r) (u -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r)</td><td class="doc"><p>Request more input from upstream. The first field takes a new input
value and provides a new <code>Pipe</code>. The second takes an upstream result
value, which indicates that upstream is producing no more results.
</p></td></tr><tr><td class="src"><a name="v:Done" class="def">Done</a> r</td><td class="doc"><p>Processing with this <code>Pipe</code> is complete, providing the final result.
</p></td></tr><tr><td class="src"><a name="v:PipeM" class="def">PipeM</a> (m (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r))</td><td class="doc"><p>Require running of a monadic action to get the next <code>Pipe</code>.
</p></td></tr><tr><td class="src"><a name="v:Leftover" class="def">Leftover</a> (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r) l</td><td class="doc"><p>Return leftover input, which should be provided to future operations.
</p></td></tr></table></div><div class="subs instances"><p id="control.i:Pipe" class="caption collapser" onclick="toggleSection('i:Pipe')">Instances</p><div id="section.i:Pipe" class="show"><table><tr><td class="src"><a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Class.html#t:MonadRWS">MonadRWS</a> r w s m => <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Class.html#t:MonadRWS">MonadRWS</a> r w s (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-transformers-base-doc/html/Control-Monad-Base.html#t:MonadBase">MonadBase</a> base m => <a href="/usr/share/doc/libghc-transformers-base-doc/html/Control-Monad-Base.html#t:MonadBase">MonadBase</a> base (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error-Class.html#t:MonadError">MonadError</a> e m => <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error-Class.html#t:MonadError">MonadError</a> e (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader-Class.html#t:MonadReader">MonadReader</a> r m => <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader-Class.html#t:MonadReader">MonadReader</a> r (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m => <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Class.html#t:MonadWriter">MonadWriter</a> w m => <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Class.html#t:MonadWriter">MonadWriter</a> w (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mmorph-doc/html/Control-Monad-Morph.html#t:MFunctor">MFunctor</a> (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u)</td><td class="doc"><p>Since 1.0.4
</p></td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mmorph-doc/html/Control-Monad-Morph.html#t:MonadTrans">MonadTrans</a> (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Conduit.html#t:MonadResource">MonadResource</a> m => <a href="Data-Conduit.html#t:MonadResource">MonadResource</a> (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Conduit.html#t:MonadThrow">MonadThrow</a> m => <a href="Data-Conduit.html#t:MonadThrow">MonadThrow</a> (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadActive">MonadActive</a> m => <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadActive">MonadActive</a> (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:Monoid">Monoid</a> (<a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m ())</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:ConduitM" class="def">ConduitM</a> i o m r <a href="src/Data-Conduit-Internal.html#ConduitM" class="link">Source</a></p><div class="doc"><p>Core datatype of the conduit package. This type represents a general
component which can consume a stream of input values <code>i</code>, produce a stream
of output values <code>o</code>, perform actions in the <code>m</code> monad, and produce a final
result <code>r</code>. The type synonyms provided here are simply wrappers around this
type.
</p><p>Since 1.0.0
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ConduitM" class="def">ConduitM</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:unConduitM" class="def">unConduitM</a> :: <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> i i o () m r</dt><dd class="doc empty"> </dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:ConduitM" class="caption collapser" onclick="toggleSection('i:ConduitM')">Instances</p><div id="section.i:ConduitM" class="show"><table><tr><td class="src"><a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Class.html#t:MonadRWS">MonadRWS</a> r w s m => <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-RWS-Class.html#t:MonadRWS">MonadRWS</a> r w s (<a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-transformers-base-doc/html/Control-Monad-Base.html#t:MonadBase">MonadBase</a> base m => <a href="/usr/share/doc/libghc-transformers-base-doc/html/Control-Monad-Base.html#t:MonadBase">MonadBase</a> base (<a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error-Class.html#t:MonadError">MonadError</a> e m => <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error-Class.html#t:MonadError">MonadError</a> e (<a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader-Class.html#t:MonadReader">MonadReader</a> r m => <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader-Class.html#t:MonadReader">MonadReader</a> r (<a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s m => <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s (<a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Class.html#t:MonadWriter">MonadWriter</a> w m => <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Class.html#t:MonadWriter">MonadWriter</a> w (<a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mmorph-doc/html/Control-Monad-Morph.html#t:MFunctor">MFunctor</a> (<a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mmorph-doc/html/Control-Monad-Morph.html#t:MonadTrans">MonadTrans</a> (<a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> (<a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> (<a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> (<a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Conduit.html#t:MonadResource">MonadResource</a> m => <a href="Data-Conduit.html#t:MonadResource">MonadResource</a> (<a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Data-Conduit.html#t:MonadThrow">MonadThrow</a> m => <a href="Data-Conduit.html#t:MonadThrow">MonadThrow</a> (<a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadActive">MonadActive</a> m => <a href="/usr/share/doc/libghc-resourcet-doc/html/Control-Monad-Trans-Resource.html#t:MonadActive">MonadActive</a> (<a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m)</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:Monoid">Monoid</a> (<a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m ())</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Source" class="def">Source</a> m o = <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> () o m ()<a href="src/Data-Conduit-Internal.html#Source" class="link">Source</a></p><div class="doc"><p>Provides a stream of output values, without consuming any input or
producing a final result.
</p><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Producer" class="def">Producer</a> m o = <span class="keyword">forall</span> i. <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m ()<a href="src/Data-Conduit-Internal.html#Producer" class="link">Source</a></p><div class="doc"><p>A component which produces a stream of output values, regardless of the
input stream. A <code>Producer</code> is a generalization of a <code>Source</code>, and can be
used as either a <code>Source</code> or a <code>Conduit</code>.
</p><p>Since 1.0.0
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Sink" class="def">Sink</a> i = <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i <a href="/usr/share/doc/libghc-void-doc/html/Data-Void.html#t:Void">Void</a><a href="src/Data-Conduit-Internal.html#Sink" class="link">Source</a></p><div class="doc"><p>Consumes a stream of input values and produces a final result, without
producing any output.
</p><pre> type Sink i m r = ConduitM i Void m r
</pre><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Consumer" class="def">Consumer</a> i m r = <span class="keyword">forall</span> o. <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m r<a href="src/Data-Conduit-Internal.html#Consumer" class="link">Source</a></p><div class="doc"><p>A component which consumes a stream of input values and produces a final
result, regardless of the output stream. A <code>Consumer</code> is a generalization of
a <code>Sink</code>, and can be used as either a <code>Sink</code> or a <code>Conduit</code>.
</p><p>Since 1.0.0
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Conduit" class="def">Conduit</a> i m o = <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m ()<a href="src/Data-Conduit-Internal.html#Conduit" class="link">Source</a></p><div class="doc"><p>Consumes a stream of input values and produces a stream of output values,
without producing a final result.
</p><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ResumableSource" class="def">ResumableSource</a> m o <a href="src/Data-Conduit-Internal.html#ResumableSource" class="link">Source</a></p><div class="doc"><p>A <code>Source</code> which has been started, but has not yet completed.
</p><p>This type contains both the current state of the <code>Source</code>, and the finalizer
to be run to close it.
</p><p>Since 0.5.0
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ResumableSource" class="def">ResumableSource</a> (<a href="Data-Conduit-Internal.html#t:Source">Source</a> m o) (m ())</td><td class="doc empty"> </td></tr></table></div><div class="subs instances"><p id="control.i:ResumableSource" class="caption collapser" onclick="toggleSection('i:ResumableSource')">Instances</p><div id="section.i:ResumableSource" class="show"><table><tr><td class="src"><a href="/usr/share/doc/libghc-mmorph-doc/html/Control-Monad-Morph.html#t:MFunctor">MFunctor</a> <a href="Data-Conduit-Internal.html#t:ResumableSource">ResumableSource</a></td><td class="doc"><p>Since 1.0.13
</p></td></tr></table></div></div></div><h1 id="g:2">Primitives
</h1><div class="top"><p class="src"><a name="v:await" class="def">await</a> :: <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> i)<a href="src/Data-Conduit-Internal.html#await" class="link">Source</a></p><div class="doc"><p>Wait for a single input value from upstream.
</p><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><a name="v:awaitE" class="def">awaitE</a> :: <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> u i)<a href="src/Data-Conduit-Internal.html#awaitE" class="link">Source</a></p><div class="doc"><p>This is similar to <code>await</code>, but will return the upstream result value as
<code>Left</code> if available.
</p><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><a name="v:awaitForever" class="def">awaitForever</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => (i -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o r m r') -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o r m r<a href="src/Data-Conduit-Internal.html#awaitForever" class="link">Source</a></p><div class="doc"><p>Wait for input forever, calling the given inner <code>Pipe</code> for each piece of
new input. Returns the upstream result type.
</p><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><a name="v:yield" class="def">yield</a><a href="src/Data-Conduit-Internal.html#yield" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m</td><td class="doc empty"> </td></tr><tr><td class="src">=> o</td><td class="doc"><p>output value
</p></td></tr><tr><td class="src">-> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m ()</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Send a single output value downstream. If the downstream <code>Pipe</code>
terminates, this <code>Pipe</code> will terminate as well.
</p><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><a name="v:yieldOr" class="def">yieldOr</a><a href="src/Data-Conduit-Internal.html#yieldOr" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m</td><td class="doc empty"> </td></tr><tr><td class="src">=> o</td><td class="doc empty"> </td></tr><tr><td class="src">-> m ()</td><td class="doc"><p>finalizer
</p></td></tr><tr><td class="src">-> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m ()</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Similar to <code>yield</code>, but additionally takes a finalizer to be run if the
downstream <code>Pipe</code> terminates.
</p><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><a name="v:leftover" class="def">leftover</a> :: l -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m ()<a href="src/Data-Conduit-Internal.html#leftover" class="link">Source</a></p><div class="doc"><p>Provide a single piece of leftover input to be consumed by the next pipe
in the current monadic binding.
</p><p><em>Note</em>: it is highly encouraged to only return leftover values from input
already consumed from upstream.
</p><p>Since 0.5.0
</p></div></div><h1 id="g:3">Finalization
</h1><div class="top"><p class="src"><a name="v:bracketP" class="def">bracketP</a> :: <a href="Data-Conduit.html#t:MonadResource">MonadResource</a> m => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> a -> (a -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> ()) -> (a -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r) -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r<a href="src/Data-Conduit-Internal.html#bracketP" class="link">Source</a></p><div class="doc"><p>Perform some allocation and run an inner <code>Pipe</code>. Two guarantees are given
about resource finalization:
</p><ol><li> It will be <em>prompt</em>. The finalization will be run as early as possible.
</li><li> It is exception safe. Due to usage of <code>resourcet</code>, the finalization will
be run in the event of any exceptions.
</li></ol><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><a name="v:addCleanup" class="def">addCleanup</a><a href="src/Data-Conduit-Internal.html#addCleanup" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m</td><td class="doc empty"> </td></tr><tr><td class="src">=> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -> m ())</td><td class="doc"><p><code>True</code> if <code>Pipe</code> ran to completion, <code>False</code> for early termination.
</p></td></tr><tr><td class="src">-> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Add some code to be run when the given <code>Pipe</code> cleans up.
</p><p>Since 0.4.1
</p></div></div><h1 id="g:4">Composition
</h1><div class="top"><p class="src"><a name="v:idP" class="def">idP</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a a r m r<a href="src/Data-Conduit-Internal.html#idP" class="link">Source</a></p><div class="doc"><p>The identity <code>Pipe</code>.
</p><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><a name="v:pipe" class="def">pipe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a b r0 m r1 -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> <a href="/usr/share/doc/libghc-void-doc/html/Data-Void.html#t:Void">Void</a> b c r1 m r2 -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a c r0 m r2<a href="src/Data-Conduit-Internal.html#pipe" class="link">Source</a></p><div class="doc"><p>Compose a left and right pipe together into a complete pipe. The left pipe
will be automatically closed when the right pipe finishes.
</p><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><a name="v:pipeL" class="def">pipeL</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a b r0 m r1 -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> b b c r1 m r2 -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a c r0 m r2<a href="src/Data-Conduit-Internal.html#pipeL" class="link">Source</a></p><div class="doc"><p>Same as <code><a href="Data-Conduit-Internal.html#v:pipe">pipe</a></code>, but automatically applies <code><a href="Data-Conduit-Internal.html#v:injectLeftovers">injectLeftovers</a></code> to the right <code>Pipe</code>.
</p><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><a name="v:connectResume" class="def">connectResume</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:ResumableSource">ResumableSource</a> m o -> <a href="Data-Conduit-Internal.html#t:Sink">Sink</a> o m r -> m (<a href="Data-Conduit-Internal.html#t:ResumableSource">ResumableSource</a> m o, r)<a href="src/Data-Conduit-Internal.html#connectResume" class="link">Source</a></p><div class="doc"><p>Connect a <code>Source</code> to a <code>Sink</code> until the latter closes. Returns both the
most recent state of the <code>Source</code> and the result of the <code>Sink</code>.
</p><p>We use a <code>ResumableSource</code> to keep track of the most recent finalizer
provided by the <code>Source</code>.
</p><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><a name="v:runPipe" class="def">runPipe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> <a href="/usr/share/doc/libghc-void-doc/html/Data-Void.html#t:Void">Void</a> () <a href="/usr/share/doc/libghc-void-doc/html/Data-Void.html#t:Void">Void</a> () m r -> m r<a href="src/Data-Conduit-Internal.html#runPipe" class="link">Source</a></p><div class="doc"><p>Run a pipeline until processing completes.
</p><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><a name="v:injectLeftovers" class="def">injectLeftovers</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> i i o u m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r<a href="src/Data-Conduit-Internal.html#injectLeftovers" class="link">Source</a></p><div class="doc"><p>Transforms a <code>Pipe</code> that provides leftovers to one which does not,
allowing it to be composed.
</p><p>This function will provide any leftover values within this <code>Pipe</code> to any
calls to <code>await</code>. If there are more leftover values than are demanded, the
remainder are discarded.
</p><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><a name="v:-62--43--62-" class="def">(>+>)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a b r0 m r1 -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> <a href="/usr/share/doc/libghc-void-doc/html/Data-Void.html#t:Void">Void</a> b c r1 m r2 -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a c r0 m r2<a href="src/Data-Conduit-Internal.html#%3E%2B%3E" class="link">Source</a></p><div class="doc"><p>Fuse together two <code>Pipe</code>s, connecting the output from the left to the
input of the right.
</p><p>Notice that the <em>leftover</em> parameter for the <code>Pipe</code>s must be <code>Void</code>. This
ensures that there is no accidental data loss of leftovers during fusion. If
you have a <code>Pipe</code> with leftovers, you must first call <code><a href="Data-Conduit-Internal.html#v:injectLeftovers">injectLeftovers</a></code>.
</p><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><a name="v:-60--43--60-" class="def">(<+<)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> <a href="/usr/share/doc/libghc-void-doc/html/Data-Void.html#t:Void">Void</a> b c r1 m r2 -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a b r0 m r1 -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l a c r0 m r2<a href="src/Data-Conduit-Internal.html#%3C%2B%3C" class="link">Source</a></p><div class="doc"><p>Same as <code><a href="Data-Conduit-Internal.html#v:-62--43--62-">>+></a></code>, but reverse the order of the arguments.
</p><p>Since 0.5.0
</p></div></div><h1 id="g:5">Generalizing
</h1><div class="top"><p class="src"><a name="v:sourceToPipe" class="def">sourceToPipe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Source">Source</a> m o -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m ()<a href="src/Data-Conduit-Internal.html#sourceToPipe" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:sinkToPipe" class="def">sinkToPipe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Sink">Sink</a> i m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r<a href="src/Data-Conduit-Internal.html#sinkToPipe" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:conduitToPipe" class="def">conduitToPipe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Conduit">Conduit</a> i m o -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m ()<a href="src/Data-Conduit-Internal.html#conduitToPipe" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:toProducer" class="def">toProducer</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Source">Source</a> m a -> <a href="Data-Conduit-Internal.html#t:Producer">Producer</a> m a<a href="src/Data-Conduit-Internal.html#toProducer" class="link">Source</a></p><div class="doc"><p>Generalize a <code><a href="Data-Conduit-Internal.html#t:Source">Source</a></code> to a <code><a href="Data-Conduit-Internal.html#t:Producer">Producer</a></code>.
</p><p>Since 1.0.0
</p></div></div><div class="top"><p class="src"><a name="v:toConsumer" class="def">toConsumer</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Sink">Sink</a> a m b -> <a href="Data-Conduit-Internal.html#t:Consumer">Consumer</a> a m b<a href="src/Data-Conduit-Internal.html#toConsumer" class="link">Source</a></p><div class="doc"><p>Generalize a <code><a href="Data-Conduit-Internal.html#t:Sink">Sink</a></code> to a <code><a href="Data-Conduit-Internal.html#t:Consumer">Consumer</a></code>.
</p><p>Since 1.0.0
</p></div></div><h1 id="g:6">Exceptions
</h1><div class="top"><p class="src"><a name="v:catchP" class="def">catchP</a> :: (<a href="Data-Conduit.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> m, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:Exception">Exception</a> e) => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r -> (e -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r) -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r<a href="src/Data-Conduit-Internal.html#catchP" class="link">Source</a></p><div class="doc"><p>See <code><a href="Data-Conduit-Internal.html#v:catchC">catchC</a></code> for more details.
</p><p>Since 1.0.11
</p></div></div><div class="top"><p class="src"><a name="v:handleP" class="def">handleP</a> :: (<a href="Data-Conduit.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> m, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:Exception">Exception</a> e) => (e -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r) -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r<a href="src/Data-Conduit-Internal.html#handleP" class="link">Source</a></p><div class="doc"><p>The same as <code>flip catchP</code>.
</p><p>Since 1.0.11
</p></div></div><div class="top"><p class="src"><a name="v:tryP" class="def">tryP</a> :: (<a href="Data-Conduit.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> m, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:Exception">Exception</a> e) => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> e r)<a href="src/Data-Conduit-Internal.html#tryP" class="link">Source</a></p><div class="doc"><p>See <code><a href="Data-Conduit-Internal.html#v:tryC">tryC</a></code> for more details.
</p><p>Since 1.0.11
</p></div></div><div class="top"><p class="src"><a name="v:catchC" class="def">catchC</a> :: (<a href="Data-Conduit.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> m, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:Exception">Exception</a> e) => <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m r -> (e -> <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m r) -> <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m r<a href="src/Data-Conduit-Internal.html#catchC" class="link">Source</a></p><div class="doc"><p>Catch all exceptions thrown by the current component of the pipeline.
</p><p>Note: this will <em>not</em> catch exceptions thrown by other components! For
example, if an exception is thrown in a <code>Source</code> feeding to a <code>Sink</code>, and
the <code>Sink</code> uses <code>catchC</code>, the exception will <em>not</em> be caught.
</p><p>Due to this behavior (as well as lack of async exception handling), you
should not try to implement combinators such as <code>onException</code> in terms of this
primitive function.
</p><p>Note also that the exception handling will <em>not</em> be applied to any
finalizers generated by this conduit.
</p><p>Since 1.0.11
</p></div></div><div class="top"><p class="src"><a name="v:handleC" class="def">handleC</a> :: (<a href="Data-Conduit.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> m, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:Exception">Exception</a> e) => (e -> <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m r) -> <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m r -> <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m r<a href="src/Data-Conduit-Internal.html#handleC" class="link">Source</a></p><div class="doc"><p>The same as <code>flip catchC</code>.
</p><p>Since 1.0.11
</p></div></div><div class="top"><p class="src"><a name="v:tryC" class="def">tryC</a> :: (<a href="Data-Conduit.html#t:MonadBaseControl">MonadBaseControl</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/System-IO.html#t:IO">IO</a> m, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Exception-Base.html#t:Exception">Exception</a> e) => <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m r -> <a href="Data-Conduit-Internal.html#t:ConduitM">ConduitM</a> i o m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> e r)<a href="src/Data-Conduit-Internal.html#tryC" class="link">Source</a></p><div class="doc"><p>A version of <code>try</code> for use within a pipeline. See the comments in <code>catchC</code>
for more details.
</p><p>Since 1.0.11
</p></div></div><h1 id="g:7">Utilities
</h1><div class="top"><p class="src"><a name="v:transPipe" class="def">transPipe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => (<span class="keyword">forall</span> a. m a -> n a) -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u n r<a href="src/Data-Conduit-Internal.html#transPipe" class="link">Source</a></p><div class="doc"><p>Transform the monad that a <code>Pipe</code> lives in.
</p><p>Note that the monad transforming function will be run multiple times,
resulting in unintuitive behavior in some cases. For a fuller treatment,
please see:
</p><p><a href="https://github.com/snoyberg/conduit/wiki/Dealing-with-monad-transformers">https://github.com/snoyberg/conduit/wiki/Dealing-with-monad-transformers</a>
</p><p>This function is just a synonym for <code><a href="/usr/share/doc/libghc-mmorph-doc/html/Control-Monad-Morph.html#v:hoist">hoist</a></code>.
</p><p>Since 0.4.0
</p></div></div><div class="top"><p class="src"><a name="v:mapOutput" class="def">mapOutput</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => (o1 -> o2) -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o1 u m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o2 u m r<a href="src/Data-Conduit-Internal.html#mapOutput" class="link">Source</a></p><div class="doc"><p>Apply a function to all the output values of a <code>Pipe</code>.
</p><p>This mimics the behavior of <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#v:fmap">fmap</a></code> for a <code><a href="Data-Conduit-Internal.html#t:Source">Source</a></code> and <code><a href="Data-Conduit-Internal.html#t:Conduit">Conduit</a></code> in pre-0.4
days.
</p><p>Since 0.4.1
</p></div></div><div class="top"><p class="src"><a name="v:mapOutputMaybe" class="def">mapOutputMaybe</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => (o1 -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> o2) -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o1 u m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o2 u m r<a href="src/Data-Conduit-Internal.html#mapOutputMaybe" class="link">Source</a></p><div class="doc"><p>Same as <code><a href="Data-Conduit-Internal.html#v:mapOutput">mapOutput</a></code>, but use a function that returns <code>Maybe</code> values.
</p><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><a name="v:mapInput" class="def">mapInput</a><a href="src/Data-Conduit-Internal.html#mapInput" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m</td><td class="doc empty"> </td></tr><tr><td class="src">=> (i1 -> i2)</td><td class="doc"><p>map initial input to new input
</p></td></tr><tr><td class="src">-> (l2 -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> l1)</td><td class="doc"><p>map new leftovers to initial leftovers
</p></td></tr><tr><td class="src">-> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l2 i2 o u m r</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l1 i1 o u m r</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Apply a function to all the input values of a <code>Pipe</code>.
</p><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><a name="v:sourceList" class="def">sourceList</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => [a] -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i a u m ()<a href="src/Data-Conduit-Internal.html#sourceList" class="link">Source</a></p><div class="doc"><p>Convert a list into a source.
</p><p>Since 0.3.0
</p></div></div><div class="top"><p class="src"><a name="v:withUpstream" class="def">withUpstream</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m r -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m (u, r)<a href="src/Data-Conduit-Internal.html#withUpstream" class="link">Source</a></p><div class="doc"><p>Returns a tuple of the upstream and downstream results. Note that this
will force consumption of the entire input stream.
</p><p>Since 0.5.0
</p></div></div><div class="top"><p class="src"><a name="v:unwrapResumable" class="def">unwrapResumable</a> :: <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="Data-Conduit-Internal.html#t:ResumableSource">ResumableSource</a> m o -> m (<a href="Data-Conduit-Internal.html#t:Source">Source</a> m o, m ())<a href="src/Data-Conduit-Internal.html#unwrapResumable" class="link">Source</a></p><div class="doc"><p>Unwraps a <code>ResumableSource</code> into a <code>Source</code> and a finalizer.
</p><p>A <code>ResumableSource</code> represents a <code>Source</code> which has already been run, and
therefore has a finalizer registered. As a result, if we want to turn it
into a regular <code>Source</code>, we need to ensure that the finalizer will be run
appropriately. By appropriately, I mean:
</p><ul><li> If a new finalizer is registered, the old one should not be called.
</li><li> If the old one is called, it should not be called again.
</li></ul><p>This function returns both a <code>Source</code> and a finalizer which ensures that the
above two conditions hold. Once you call that finalizer, the <code>Source</code> is
invalidated and cannot be used.
</p><p>Since 0.5.2
</p></div></div><div class="top"><p class="src"><a name="v:enumFromTo" class="def">enumFromTo</a> :: (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Enum">Enum</a> o, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> o, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m) => o -> o -> <a href="Data-Conduit-Internal.html#t:Pipe">Pipe</a> l i o u m ()<a href="src/Data-Conduit-Internal.html#enumFromTo" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:zipSinks" class="def">zipSinks</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Sink">Sink</a> i m r -> <a href="Data-Conduit-Internal.html#t:Sink">Sink</a> i m r' -> <a href="Data-Conduit-Internal.html#t:Sink">Sink</a> i m (r, r')<a href="src/Data-Conduit-Internal.html#zipSinks" class="link">Source</a></p><div class="doc"><p>Combines two sinks. The new sink will complete when both input sinks have
completed.
</p><p>Any leftovers are discarded.
</p><p>Since 0.4.1
</p></div></div><div class="top"><p class="src"><a name="v:zipSources" class="def">zipSources</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Source">Source</a> m a -> <a href="Data-Conduit-Internal.html#t:Source">Source</a> m b -> <a href="Data-Conduit-Internal.html#t:Source">Source</a> m (a, b)<a href="src/Data-Conduit-Internal.html#zipSources" class="link">Source</a></p><div class="doc"><p>Combines two sources. The new source will stop producing once either
source has been exhausted.
</p><p>Since 1.0.13
</p></div></div><div class="top"><p class="src"><a name="v:zipSourcesApp" class="def">zipSourcesApp</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m => <a href="Data-Conduit-Internal.html#t:Source">Source</a> m (a -> b) -> <a href="Data-Conduit-Internal.html#t:Source">Source</a> m a -> <a href="Data-Conduit-Internal.html#t:Source">Source</a> m b<a href="src/Data-Conduit-Internal.html#zipSourcesApp" class="link">Source</a></p><div class="doc"><p>Combines two sources. The new source will stop producing once either
source has been exhausted.
</p><p>Since 1.0.13
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>
|