This file is indexed.

/usr/share/doc/libghc-pipes-doc/html/Pipes.html is in libghc-pipes-doc 4.1.2-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
<!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>Pipes</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_Pipes.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Pipes.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">pipes-4.1.2: Compositional pipelines</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">Pipes</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">The Proxy Monad Transformer
</a><ul><li><a href="#g:2">Producers
</a></li><li><a href="#g:3">Consumers
</a></li><li><a href="#g:4">Pipes
</a></li></ul></li><li><a href="#g:5">ListT
</a></li><li><a href="#g:6">Utilities
</a></li><li><a href="#g:7">Re-exports
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module is the recommended entry point to the <code>pipes</code> library.
</p><p>Read <a href="Pipes-Tutorial.html">Pipes.Tutorial</a> if you want a tutorial explaining how to use this
    library.
</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:Proxy">Proxy</a> a' a b' b m r</li><li class="src short"><span class="keyword">data</span>  <a href="#t:X">X</a> </li><li class="src short"><span class="keyword">type</span> <a href="#t:Effect">Effect</a> = <a href="Pipes.html#t:Proxy">Proxy</a> <a href="Pipes.html#t:X">X</a> () () <a href="Pipes.html#t:X">X</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:Effect-39-">Effect'</a> m r = <span class="keyword">forall</span> x' x y' y.  <a href="Pipes.html#t:Proxy">Proxy</a> x' x y' y m r</li><li class="src short"><a href="#v:runEffect">runEffect</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Pipes.html#t:Effect">Effect</a> m r -&gt; m r</li><li class="src short"><span class="keyword">type</span> <a href="#t:Producer">Producer</a> b = <a href="Pipes.html#t:Proxy">Proxy</a> <a href="Pipes.html#t:X">X</a> () () b</li><li class="src short"><span class="keyword">type</span> <a href="#t:Producer-39-">Producer'</a> b m r = <span class="keyword">forall</span> x' x.  <a href="Pipes.html#t:Proxy">Proxy</a> x' x () b 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 =&gt; a -&gt; <a href="Pipes.html#t:Producer-39-">Producer'</a> a m ()</li><li class="src short"><a href="#v:for">for</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x b' b m a' -&gt; (b -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x c' c m b') -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x c' c m a'</li><li class="src short"><a href="#v:-126--62-">(~&gt;)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x b' b m a') -&gt; (b -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x c' c m b') -&gt; a -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x c' c m a'</li><li class="src short"><a href="#v:-60--126-">(&lt;~)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; (b -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x c' c m b') -&gt; (a -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x b' b m a') -&gt; a -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x c' c m a'</li><li class="src short"><span class="keyword">type</span> <a href="#t:Consumer">Consumer</a> a = <a href="Pipes.html#t:Proxy">Proxy</a> () a () <a href="Pipes.html#t:X">X</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:Consumer-39-">Consumer'</a> a m r = <span class="keyword">forall</span> y' y.  <a href="Pipes.html#t:Proxy">Proxy</a> () a y' y m r</li><li class="src short"><a href="#v:await">await</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Pipes.html#t:Consumer-39-">Consumer'</a> a m a</li><li class="src short"><a href="#v:-62--126-">(&gt;~)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Pipes.html#t:Proxy">Proxy</a> a' a y' y m b -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> () b y' y m c -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> a' a y' y m c</li><li class="src short"><a href="#v:-126--60-">(~&lt;)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Pipes.html#t:Proxy">Proxy</a> () b y' y m c -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> a' a y' y m b -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> a' a y' y m c</li><li class="src short"><span class="keyword">type</span> <a href="#t:Pipe">Pipe</a> a b = <a href="Pipes.html#t:Proxy">Proxy</a> () a () b</li><li class="src short"><a href="#v:cat">cat</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Pipes.html#t:Pipe">Pipe</a> a a m r</li><li class="src short"><a href="#v:-62--45--62-">(&gt;-&gt;)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Pipes.html#t:Proxy">Proxy</a> a' a () b m r -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> () b c' c m r -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> a' a c' c m r</li><li class="src short"><a href="#v:-60--45--60-">(&lt;-&lt;)</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Pipes.html#t:Proxy">Proxy</a> () b c' c m r -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> a' a () b m r -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> a' a c' c m r</li><li class="src short"><span class="keyword">newtype</span>  <a href="#t:ListT">ListT</a> m a = <a href="#v:Select">Select</a> {<ul class="subs"><li><a href="#v:enumerate">enumerate</a> :: <a href="Pipes.html#t:Producer">Producer</a> a m ()</li></ul>}</li><li class="src short"><a href="#v:runListT">runListT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Pipes.html#t:ListT">ListT</a> m <a href="Pipes.html#t:X">X</a> -&gt; m ()</li><li class="src short"><span class="keyword">class</span>  <a href="#t:Enumerable">Enumerable</a> t  <span class="keyword">where</span><ul class="subs"><li><a href="#v:toListT">toListT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; t m a -&gt; <a href="Pipes.html#t:ListT">ListT</a> m a</li></ul></li><li class="src short"><a href="#v:next">next</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Pipes.html#t:Producer">Producer</a> a m r -&gt; m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> r (a, <a href="Pipes.html#t:Producer">Producer</a> a m r))</li><li class="src short"><a href="#v:each">each</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-Foldable.html#t:Foldable">Foldable</a> f) =&gt; f a -&gt; <a href="Pipes.html#t:Producer-39-">Producer'</a> a m ()</li><li class="src short"><a href="#v:every">every</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="Pipes.html#t:Enumerable">Enumerable</a> t) =&gt; t m a -&gt; <a href="Pipes.html#t:Producer-39-">Producer'</a> a m ()</li><li class="src short"><a href="#v:discard">discard</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; a -&gt; m ()</li><li class="src short">module <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html">Control.Monad.IO.Class</a></li><li class="src short">module <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-Trans-Class.html">Control.Monad.Trans.Class</a></li><li class="src short">module <a href="/usr/share/doc/libghc-mmorph-doc/html/Control-Monad-Morph.html">Control.Monad.Morph</a></li><li class="src short">module <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Foldable.html">Data.Foldable</a></li></ul></div><div id="interface"><h1 id="g:1">The Proxy Monad Transformer
</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Proxy" class="def">Proxy</a> a' a b' b m r <a href="src/Pipes-Internal.html#Proxy" class="link">Source</a></p><div class="doc"><p>A <code><a href="Pipes.html#t:Proxy">Proxy</a></code> is a monad transformer that receives and sends information on both
    an upstream and downstream interface.
</p><p>The type variables signify:
</p><ul><li> <code>a'</code> and <code>a</code> - The upstream interface, where <code>(a')</code>s go out and <code>(a)</code>s
      come in
</li><li> <code>b'</code> and <code>b</code> - The downstream interface, where <code>(b)</code>s go out and <code>(b')</code>s
      come in
</li><li> <code>m </code> - The base monad
</li><li> <code>r </code> - The return value
</li></ul></div><div class="subs instances"><p id="control.i:Proxy" class="caption collapser" onclick="toggleSection('i:Proxy')">Instances</p><div id="section.i:Proxy" class="show"><table><tr><td class="src"><a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error-Class.html#t:MonadError">MonadError</a> e m =&gt; <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error-Class.html#t:MonadError">MonadError</a> e (<a href="Pipes.html#t:Proxy">Proxy</a> a' a b' b m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader-Class.html#t:MonadReader">MonadReader</a> r (<a href="Pipes.html#t:Proxy">Proxy</a> a' a b' b m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s (<a href="Pipes.html#t:Proxy">Proxy</a> a' a b' b m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Class.html#t:MonadWriter">MonadWriter</a> w (<a href="Pipes.html#t:Proxy">Proxy</a> a' a b' b m)</td><td class="doc empty">&nbsp;</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="Pipes.html#t:Proxy">Proxy</a> a' a b' b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mmorph-doc/html/Control-Monad-Morph.html#t:MMonad">MMonad</a> (<a href="Pipes.html#t:Proxy">Proxy</a> a' a b' b)</td><td class="doc empty">&nbsp;</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="Pipes.html#t:Proxy">Proxy</a> a' a b' b)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> (<a href="Pipes.html#t:Proxy">Proxy</a> a' a b' b m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> (<a href="Pipes.html#t:Proxy">Proxy</a> a' a b' b m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:MonadPlus">MonadPlus</a> m =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:MonadPlus">MonadPlus</a> (<a href="Pipes.html#t:Proxy">Proxy</a> a' a b' b m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Pipes.html#t:Proxy">Proxy</a> a' a b' b m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:MonadPlus">MonadPlus</a> m =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Alternative">Alternative</a> (<a href="Pipes.html#t:Proxy">Proxy</a> a' a b' b m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> (<a href="Pipes.html#t:Proxy">Proxy</a> a' a b' b 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:X" class="def">X</a>  <a href="src/Pipes-Internal.html#X" class="link">Source</a></p><div class="doc"><p>The empty type, used to close output ends
</p><p>When <code>Data.Void</code> is merged into <code>base</code>, this will change to:
</p><pre> type X = Void
</pre></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Effect" class="def">Effect</a> = <a href="Pipes.html#t:Proxy">Proxy</a> <a href="Pipes.html#t:X">X</a> () () <a href="Pipes.html#t:X">X</a><a href="src/Pipes-Core.html#Effect" class="link">Source</a></p><div class="doc"><p>An effect in the base monad
</p><p><code><a href="Pipes.html#t:Effect">Effect</a></code>s neither <code><a href="Pipes.html#t:await">await</a></code> nor <code><a href="Pipes.html#t:yield">yield</a></code>
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Effect-39-" class="def">Effect'</a> m r = <span class="keyword">forall</span> x' x y' y.  <a href="Pipes.html#t:Proxy">Proxy</a> x' x y' y m r<a href="src/Pipes-Core.html#Effect%27" class="link">Source</a></p><div class="doc"><p>Like <code><a href="Pipes.html#t:Effect">Effect</a></code>, but with a polymorphic type
</p></div></div><div class="top"><p class="src"><a name="v:runEffect" class="def">runEffect</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Pipes.html#t:Effect">Effect</a> m r -&gt; m r<a href="src/Pipes-Core.html#runEffect" class="link">Source</a></p><div class="doc"><p>Run a self-contained <code><a href="Pipes.html#t:Effect">Effect</a></code>, converting it back to the base monad
</p></div></div><h2 id="g:2">Producers
</h2><div class="doc"><p>Use <code><a href="Pipes.html#v:yield">yield</a></code> to produce output and (<code><a href="Pipes.html#v:-126--62-">~&gt;</a></code>) / <code><a href="Pipes.html#v:for">for</a></code> to substitute <code><a href="Pipes.html#v:yield">yield</a></code>s.
</p><p><code><a href="Pipes.html#v:yield">yield</a></code> and (<code><a href="Pipes.html#v:-126--62-">~&gt;</a></code>) obey the <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Category.html#t:Category">Category</a></code> laws:
</p><pre>
-- Substituting 'yield' with 'f' gives 'f'
<code><a href="Pipes.html#v:yield">yield</a></code> <code><a href="Pipes.html#v:-126--62-">~&gt;</a></code> f = f

-- Substituting every 'yield' with another 'yield' does nothing
f <code><a href="Pipes.html#v:-126--62-">~&gt;</a></code> <code><a href="Pipes.html#v:yield">yield</a></code> = f

-- 'yield' substitution is associative
(f <code><a href="Pipes.html#v:-126--62-">~&gt;</a></code> g) <code><a href="Pipes.html#v:-126--62-">~&gt;</a></code> h = f <code><a href="Pipes.html#v:-126--62-">~&gt;</a></code> (g <code><a href="Pipes.html#v:-126--62-">~&gt;</a></code> h)
</pre><p>These are equivalent to the following &quot;for loop laws&quot;:
</p><pre>
-- Looping over a single yield simplifies to function application
<code><a href="Pipes.html#v:for">for</a></code> (<code><a href="Pipes.html#v:yield">yield</a></code> x) f = f x

-- Re-yielding every element of a stream returns the original stream
<code><a href="Pipes.html#v:for">for</a></code> s <code><a href="Pipes.html#v:yield">yield</a></code> = s

-- Nested for loops can become a sequential <code><a href="Pipes.html#v:for">for</a></code> loops if the inner loop
-- body ignores the outer loop variable
<code><a href="Pipes.html#v:for">for</a></code> s (\a -&gt; <code><a href="Pipes.html#v:for">for</a></code> (f a) g) = <code><a href="Pipes.html#v:for">for</a></code> (<code><a href="Pipes.html#v:for">for</a></code> s f) g = <code><a href="Pipes.html#v:for">for</a></code> s (f <code><a href="Pipes.html#v:-126--62-">~&gt;</a></code> g)
</pre></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Producer" class="def">Producer</a> b = <a href="Pipes.html#t:Proxy">Proxy</a> <a href="Pipes.html#t:X">X</a> () () b<a href="src/Pipes-Core.html#Producer" class="link">Source</a></p><div class="doc"><p><code><a href="Pipes.html#t:Producer">Producer</a></code>s can only <code><a href="Pipes.html#t:yield">yield</a></code>
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Producer-39-" class="def">Producer'</a> b m r = <span class="keyword">forall</span> x' x.  <a href="Pipes.html#t:Proxy">Proxy</a> x' x () b m r<a href="src/Pipes-Core.html#Producer%27" class="link">Source</a></p><div class="doc"><p>Like <code><a href="Pipes.html#t:Producer">Producer</a></code>, but with a polymorphic type
</p></div></div><div class="top"><p class="src"><a name="v:yield" class="def">yield</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; a -&gt; <a href="Pipes.html#t:Producer-39-">Producer'</a> a m ()<a href="src/Pipes.html#yield" class="link">Source</a></p><div class="doc"><p>Produce a value
</p><pre>
<code><a href="Pipes.html#v:yield">yield</a></code> :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; a -&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code> x a m ()
</pre></div></div><div class="top"><p class="src"><a name="v:for" class="def">for</a><a href="src/Pipes.html#for" 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">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x b' b m a'</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; (b -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x c' c m b')</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x c' c m a'</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p><code>(for p body)</code> loops over <code>p</code> replacing each <code><a href="Pipes.html#v:yield">yield</a></code> with <code>body</code>.
</p><pre>
<code><a href="Pipes.html#v:for">for</a></code> :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; <code><a href="Pipes.html#t:Producer">Producer</a></code> b m r -&gt; (b -&gt; <code><a href="Pipes.html#t:Effect">Effect</a></code>       m ()) -&gt; <code><a href="Pipes.html#t:Effect">Effect</a></code>       m r
<code><a href="Pipes.html#v:for">for</a></code> :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; <code><a href="Pipes.html#t:Producer">Producer</a></code> b m r -&gt; (b -&gt; <code><a href="Pipes.html#t:Producer">Producer</a></code>   c m ()) -&gt; <code><a href="Pipes.html#t:Producer">Producer</a></code>   c m r
<code><a href="Pipes.html#v:for">for</a></code> :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code>   x b m r -&gt; (b -&gt; <code><a href="Pipes.html#t:Consumer">Consumer</a></code> x   m ()) -&gt; <code><a href="Pipes.html#t:Consumer">Consumer</a></code> x   m r
<code><a href="Pipes.html#v:for">for</a></code> :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code>   x b m r -&gt; (b -&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code>     x c m ()) -&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code>     x c m r
</pre></div></div><div class="top"><p class="src"><a name="v:-126--62-" class="def">(~&gt;)</a><a href="src/Pipes.html#~%3E" 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">&nbsp;</td></tr><tr><td class="src">=&gt; (a -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x b' b m a')</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; (b -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x c' c m b')</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; a -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x c' c m a'</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Compose loop bodies
</p><pre>
(<code><a href="Pipes.html#v:-126--62-">~&gt;</a></code>) :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; (a -&gt; <code><a href="Pipes.html#t:Producer">Producer</a></code> b m r) -&gt; (b -&gt; <code><a href="Pipes.html#t:Effect">Effect</a></code>       m ()) -&gt; (a -&gt; <code><a href="Pipes.html#t:Effect">Effect</a></code>       m r)
(<code><a href="Pipes.html#v:-126--62-">~&gt;</a></code>) :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; (a -&gt; <code><a href="Pipes.html#t:Producer">Producer</a></code> b m r) -&gt; (b -&gt; <code><a href="Pipes.html#t:Producer">Producer</a></code>   c m ()) -&gt; (a -&gt; <code><a href="Pipes.html#t:Producer">Producer</a></code>   c m r)
(<code><a href="Pipes.html#v:-126--62-">~&gt;</a></code>) :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; (a -&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code>   x b m r) -&gt; (b -&gt; <code><a href="Pipes.html#t:Consumer">Consumer</a></code> x   m ()) -&gt; (a -&gt; <code><a href="Pipes.html#t:Consumer">Consumer</a></code> x   m r)
(<code><a href="Pipes.html#v:-126--62-">~&gt;</a></code>) :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; (a -&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code>   x b m r) -&gt; (b -&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code>     x c m ()) -&gt; (a -&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code>     x c m r)
</pre></div></div><div class="top"><p class="src"><a name="v:-60--126-" class="def">(&lt;~)</a><a href="src/Pipes.html#%3C~" 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">&nbsp;</td></tr><tr><td class="src">=&gt; (b -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x c' c m b')</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; (a -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x b' b m a')</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; a -&gt; <a href="Pipes.html#t:Proxy">Proxy</a> x' x c' c m a'</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>(<code><a href="Pipes.html#v:-126--62-">~&gt;</a></code>) with the arguments flipped
</p></div></div><h2 id="g:3">Consumers
</h2><div class="doc"><p>Use <code><a href="Pipes.html#v:await">await</a></code> to request input and (<code><a href="Pipes.html#v:-62--126-">&gt;~</a></code>) to substitute <code><a href="Pipes.html#v:await">await</a></code>s.
</p><p><code><a href="Pipes.html#v:await">await</a></code> and (<code><a href="Pipes.html#v:-62--126-">&gt;~</a></code>) obey the <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Category.html#t:Category">Category</a></code> laws:
</p><pre>
-- Substituting every 'await' with another 'await' does nothing
<code><a href="Pipes.html#v:await">await</a></code> <code><a href="Pipes.html#v:-62--126-">&gt;~</a></code> f = f

-- Substituting 'await' with 'f' gives 'f'
f <code><a href="Pipes.html#v:-62--126-">&gt;~</a></code> <code><a href="Pipes.html#v:await">await</a></code> = f

-- 'await' substitution is associative
(f <code><a href="Pipes.html#v:-62--126-">&gt;~</a></code> g) <code><a href="Pipes.html#v:-62--126-">&gt;~</a></code> h = f <code><a href="Pipes.html#v:-62--126-">&gt;~</a></code> (g <code><a href="Pipes.html#v:-62--126-">&gt;~</a></code> h)
</pre></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Consumer" class="def">Consumer</a> a = <a href="Pipes.html#t:Proxy">Proxy</a> () a () <a href="Pipes.html#t:X">X</a><a href="src/Pipes-Core.html#Consumer" class="link">Source</a></p><div class="doc"><p><code><a href="Pipes.html#t:Consumer">Consumer</a></code>s can only <code><a href="Pipes.html#t:await">await</a></code>
</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Consumer-39-" class="def">Consumer'</a> a m r = <span class="keyword">forall</span> y' y.  <a href="Pipes.html#t:Proxy">Proxy</a> () a y' y m r<a href="src/Pipes-Core.html#Consumer%27" class="link">Source</a></p><div class="doc"><p>Like <code><a href="Pipes.html#t:Consumer">Consumer</a></code>, but with a polymorphic type
</p></div></div><div class="top"><p class="src"><a name="v:await" class="def">await</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Pipes.html#t:Consumer-39-">Consumer'</a> a m a<a href="src/Pipes.html#await" class="link">Source</a></p><div class="doc"><p>Consume a value
</p><pre>
<code><a href="Pipes.html#v:await">await</a></code> :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code> a y m a
</pre></div></div><div class="top"><p class="src"><a name="v:-62--126-" class="def">(&gt;~)</a><a href="src/Pipes.html#%3E~" 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">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Pipes.html#t:Proxy">Proxy</a> a' a y' y m b</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Pipes.html#t:Proxy">Proxy</a> () b y' y m c</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Pipes.html#t:Proxy">Proxy</a> a' a y' y m c</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p><code>(draw &gt;~ p)</code> loops over <code>p</code> replacing each <code><a href="Pipes.html#v:await">await</a></code> with <code>draw</code>
</p><pre>
(<code><a href="Pipes.html#v:-62--126-">&gt;~</a></code>) :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; <code><a href="Pipes.html#t:Effect">Effect</a></code>       m b -&gt; <code><a href="Pipes.html#t:Consumer">Consumer</a></code> b   m c -&gt; <code><a href="Pipes.html#t:Effect">Effect</a></code>       m c
(<code><a href="Pipes.html#v:-62--126-">&gt;~</a></code>) :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; <code><a href="Pipes.html#t:Consumer">Consumer</a></code> a   m b -&gt; <code><a href="Pipes.html#t:Consumer">Consumer</a></code> b   m c -&gt; <code><a href="Pipes.html#t:Consumer">Consumer</a></code> a   m c
(<code><a href="Pipes.html#v:-62--126-">&gt;~</a></code>) :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; <code><a href="Pipes.html#t:Producer">Producer</a></code>   y m b -&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code>     b y m c -&gt; <code><a href="Pipes.html#t:Producer">Producer</a></code>   y m c
(<code><a href="Pipes.html#v:-62--126-">&gt;~</a></code>) :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code>     a y m b -&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code>     b y m c -&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code>     a y m c
</pre></div></div><div class="top"><p class="src"><a name="v:-126--60-" class="def">(~&lt;)</a><a href="src/Pipes.html#~%3C" 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">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Pipes.html#t:Proxy">Proxy</a> () b y' y m c</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Pipes.html#t:Proxy">Proxy</a> a' a y' y m b</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Pipes.html#t:Proxy">Proxy</a> a' a y' y m c</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>(<code><a href="Pipes.html#v:-62--126-">&gt;~</a></code>) with the arguments flipped
</p></div></div><h2 id="g:4">Pipes
</h2><div class="doc"><p>Use <code><a href="Pipes.html#v:await">await</a></code> and <code><a href="Pipes.html#v:yield">yield</a></code> to build <code><a href="Pipes.html#t:Pipe">Pipe</a></code>s and (<code><a href="Pipes.html#v:-62--45--62-">&gt;-&gt;</a></code>) to connect <code><a href="Pipes.html#t:Pipe">Pipe</a></code>s.
</p><p><code><a href="Pipes.html#v:cat">cat</a></code> and (<code><a href="Pipes.html#v:-62--45--62-">&gt;-&gt;</a></code>) obey the <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Category.html#t:Category">Category</a></code> laws:
</p><pre>
-- Useless use of cat
<code><a href="Pipes.html#v:cat">cat</a></code> <code><a href="Pipes.html#v:-62--45--62-">&gt;-&gt;</a></code> f = f

-- Redirecting output to cat does nothing
f <code><a href="Pipes.html#v:-62--45--62-">&gt;-&gt;</a></code> <code><a href="Pipes.html#v:cat">cat</a></code> = f

-- The pipe operator is associative
(f <code><a href="Pipes.html#v:-62--45--62-">&gt;-&gt;</a></code> g) <code><a href="Pipes.html#v:-62--45--62-">&gt;-&gt;</a></code> h = f <code><a href="Pipes.html#v:-62--45--62-">&gt;-&gt;</a></code> (g <code><a href="Pipes.html#v:-62--45--62-">&gt;-&gt;</a></code> h)
</pre></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Pipe" class="def">Pipe</a> a b = <a href="Pipes.html#t:Proxy">Proxy</a> () a () b<a href="src/Pipes-Core.html#Pipe" class="link">Source</a></p><div class="doc"><p><code><a href="Pipes.html#t:Pipe">Pipe</a></code>s can both <code><a href="Pipes.html#t:await">await</a></code> and <code><a href="Pipes.html#t:yield">yield</a></code>
</p></div></div><div class="top"><p class="src"><a name="v:cat" class="def">cat</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Pipes.html#t:Pipe">Pipe</a> a a m r<a href="src/Pipes.html#cat" class="link">Source</a></p><div class="doc"><p>The identity <code><a href="Pipes.html#t:Pipe">Pipe</a></code>, analogous to the Unix <code>cat</code> program
</p></div></div><div class="top"><p class="src"><a name="v:-62--45--62-" class="def">(&gt;-&gt;)</a><a href="src/Pipes.html#%3E-%3E" 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">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Pipes.html#t:Proxy">Proxy</a> a' a () b m r</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Pipes.html#t:Proxy">Proxy</a> () b c' c m r</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Pipes.html#t:Proxy">Proxy</a> a' a c' c m r</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p><code><a href="Pipes.html#t:Pipe">Pipe</a></code> composition, analogous to the Unix pipe operator
</p><pre>
(<code><a href="Pipes.html#v:-62--45--62-">&gt;-&gt;</a></code>) :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; <code><a href="Pipes.html#t:Producer">Producer</a></code> b m r -&gt; <code><a href="Pipes.html#t:Consumer">Consumer</a></code> b   m r -&gt; <code><a href="Pipes.html#t:Effect">Effect</a></code>       m r
(<code><a href="Pipes.html#v:-62--45--62-">&gt;-&gt;</a></code>) :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; <code><a href="Pipes.html#t:Producer">Producer</a></code> b m r -&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code>     b c m r -&gt; <code><a href="Pipes.html#t:Producer">Producer</a></code>   c m r
(<code><a href="Pipes.html#v:-62--45--62-">&gt;-&gt;</a></code>) :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code>   a b m r -&gt; <code><a href="Pipes.html#t:Consumer">Consumer</a></code> b   m r -&gt; <code><a href="Pipes.html#t:Consumer">Consumer</a></code> a   m r
(<code><a href="Pipes.html#v:-62--45--62-">&gt;-&gt;</a></code>) :: <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a></code> m =&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code>   a b m r -&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code>     b c m r -&gt; <code><a href="Pipes.html#t:Pipe">Pipe</a></code>     a c m r
</pre></div></div><div class="top"><p class="src"><a name="v:-60--45--60-" class="def">(&lt;-&lt;)</a><a href="src/Pipes.html#%3C-%3C" 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">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="Pipes.html#t:Proxy">Proxy</a> () b c' c m r</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Pipes.html#t:Proxy">Proxy</a> a' a () b m r</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Pipes.html#t:Proxy">Proxy</a> a' a c' c m r</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>(<code><a href="Pipes.html#v:-62--45--62-">&gt;-&gt;</a></code>) with the arguments flipped
</p></div></div><h1 id="g:5">ListT
</h1><div class="top"><p class="src"><span class="keyword">newtype</span>  <a name="t:ListT" class="def">ListT</a> m a <a href="src/Pipes.html#ListT" class="link">Source</a></p><div class="doc"><p>The list monad transformer, which extends a monad with non-determinism
</p><p><code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#v:return">return</a></code> corresponds to <code><a href="Pipes.html#v:yield">yield</a></code>, yielding a single value
</p><p>(<code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#v:-62--62--61-">&gt;&gt;=</a></code>) corresponds to <code><a href="Pipes.html#v:for">for</a></code>, calling the second computation once for each
    time the first computation <code><a href="Pipes.html#v:yield">yield</a></code>s.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Select" class="def">Select</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:enumerate" class="def">enumerate</a> :: <a href="Pipes.html#t:Producer">Producer</a> a m ()</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:ListT" class="caption collapser" onclick="toggleSection('i:ListT')">Instances</p><div id="section.i:ListT" 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="Pipes.html#t:ListT">ListT</a></td><td class="doc empty">&nbsp;</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="Pipes.html#t:ListT">ListT</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Pipes.html#t:Enumerable">Enumerable</a> <a href="Pipes.html#t:ListT">ListT</a></td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error-Class.html#t:MonadError">MonadError</a> e (<a href="Pipes.html#t:ListT">ListT</a> m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader-Class.html#t:MonadReader">MonadReader</a> i m =&gt; <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Reader-Class.html#t:MonadReader">MonadReader</a> i (<a href="Pipes.html#t:ListT">ListT</a> m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-State-Class.html#t:MonadState">MonadState</a> s (<a href="Pipes.html#t:ListT">ListT</a> m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Writer-Class.html#t:MonadWriter">MonadWriter</a> w (<a href="Pipes.html#t:ListT">ListT</a> m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> (<a href="Pipes.html#t:ListT">ListT</a> m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Functor">Functor</a> (<a href="Pipes.html#t:ListT">ListT</a> m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:MonadPlus">MonadPlus</a> (<a href="Pipes.html#t:ListT">ListT</a> m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Pipes.html#t:ListT">ListT</a> m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Applicative.html#t:Alternative">Alternative</a> (<a href="Pipes.html#t:ListT">ListT</a> m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> (<a href="Pipes.html#t:ListT">ListT</a> m)</td><td class="doc empty">&nbsp;</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 =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Monoid.html#t:Monoid">Monoid</a> (<a href="Pipes.html#t:ListT">ListT</a> m a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:runListT" class="def">runListT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Pipes.html#t:ListT">ListT</a> m <a href="Pipes.html#t:X">X</a> -&gt; m ()<a href="src/Pipes.html#runListT" class="link">Source</a></p><div class="doc"><p>Run a self-contained <code><a href="Pipes.html#t:ListT">ListT</a></code> computation
</p></div></div><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:Enumerable" class="def">Enumerable</a> t  <span class="keyword">where</span><a href="src/Pipes.html#Enumerable" class="link">Source</a></p><div class="doc"><p><code><a href="Pipes.html#t:Enumerable">Enumerable</a></code> generalizes <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Foldable.html#t:Foldable">Foldable</a></code>, converting effectful
    containers to <code><a href="Pipes.html#t:ListT">ListT</a></code>s.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:toListT" class="def">toListT</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; t m a -&gt; <a href="Pipes.html#t:ListT">ListT</a> m a<a href="src/Pipes.html#toListT" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:Enumerable" class="caption collapser" onclick="toggleSection('i:Enumerable')">Instances</p><div id="section.i:Enumerable" class="show"><table><tr><td class="src"><a href="Pipes.html#t:Enumerable">Enumerable</a> <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-Trans-Maybe.html#t:MaybeT">MaybeT</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Pipes.html#t:Enumerable">Enumerable</a> <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-Trans-Identity.html#t:IdentityT">IdentityT</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Pipes.html#t:Enumerable">Enumerable</a> <a href="Pipes.html#t:ListT">ListT</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Pipes.html#t:Enumerable">Enumerable</a> (<a href="/usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error.html#t:ErrorT">ErrorT</a> e)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:6">Utilities
</h1><div class="top"><p class="src"><a name="v:next" class="def">next</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="Pipes.html#t:Producer">Producer</a> a m r -&gt; m (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> r (a, <a href="Pipes.html#t:Producer">Producer</a> a m r))<a href="src/Pipes.html#next" class="link">Source</a></p><div class="doc"><p>Consume the first value from a <code><a href="Pipes.html#t:Producer">Producer</a></code>
</p><p><code><a href="Pipes.html#v:next">next</a></code> either fails with a <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#v:Left">Left</a></code> if the <code><a href="Pipes.html#t:Producer">Producer</a></code> terminates or succeeds
    with a <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#v:Right">Right</a></code> providing the next value and the remainder of the <code><a href="Pipes.html#t:Producer">Producer</a></code>.
</p></div></div><div class="top"><p class="src"><a name="v:each" class="def">each</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-Foldable.html#t:Foldable">Foldable</a> f) =&gt; f a -&gt; <a href="Pipes.html#t:Producer-39-">Producer'</a> a m ()<a href="src/Pipes.html#each" class="link">Source</a></p><div class="doc"><p>Convert a <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Foldable.html#t:Foldable">Foldable</a></code> to a <code><a href="Pipes.html#t:Producer">Producer</a></code>
</p></div></div><div class="top"><p class="src"><a name="v:every" class="def">every</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="Pipes.html#t:Enumerable">Enumerable</a> t) =&gt; t m a -&gt; <a href="Pipes.html#t:Producer-39-">Producer'</a> a m ()<a href="src/Pipes.html#every" class="link">Source</a></p><div class="doc"><p>Convert an <code><a href="Pipes.html#t:Enumerable">Enumerable</a></code> to a <code><a href="Pipes.html#t:Producer">Producer</a></code>
</p></div></div><div class="top"><p class="src"><a name="v:discard" class="def">discard</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Control-Monad.html#t:Monad">Monad</a> m =&gt; a -&gt; m ()<a href="src/Pipes.html#discard" class="link">Source</a></p><div class="doc"><p>Discards a value
</p></div></div><h1 id="g:7">Re-exports
</h1><div class="doc"><p><a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html">Control.Monad.IO.Class</a> re-exports <code><a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a></code>.
</p><p><a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-Trans-Class.html">Control.Monad.Trans.Class</a> re-exports <code><a href="/usr/share/doc/libghc-mmorph-doc/html/Control-Monad-Morph.html#t:MonadTrans">MonadTrans</a></code>.
</p><p><a href="/usr/share/doc/libghc-mmorph-doc/html/Control-Monad-Morph.html">Control.Monad.Morph</a> re-exports <code><a href="/usr/share/doc/libghc-mmorph-doc/html/Control-Monad-Morph.html#t:MFunctor">MFunctor</a></code>.
</p><p><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Foldable.html">Data.Foldable</a> re-exports <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Foldable.html#t:Foldable">Foldable</a></code> (the class name only)
</p></div><div class="top"><p class="src">module <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-IO-Class.html">Control.Monad.IO.Class</a></p></div><div class="top"><p class="src">module <a href="/usr/share/doc/libghc-transformers-doc/html/Control-Monad-Trans-Class.html">Control.Monad.Trans.Class</a></p></div><div class="top"><p class="src">module <a href="/usr/share/doc/libghc-mmorph-doc/html/Control-Monad-Morph.html">Control.Monad.Morph</a></p></div><div class="top"><p class="src">module <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Foldable.html">Data.Foldable</a></p></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>