/usr/share/doc/libghc-pipes-bytestring-doc/html/Pipes-ByteString.html is in libghc-pipes-bytestring-doc 2.1.6-1build3.
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 | <!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.ByteString</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Pipes-ByteString.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Pipes-ByteString.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-bytestring-2.1.6: ByteString support for pipes</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Trustworthy</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Pipes.ByteString</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Producers</a></li><li><a href="#g:2">Servers</a></li><li><a href="#g:3">Consumers</a></li><li><a href="#g:4">Pipes</a></li><li><a href="#g:5">Folds</a></li><li><a href="#g:6">Parsing</a></li><li><a href="#g:7">Parsing Lenses</a></li><li><a href="#g:8">Transforming Byte Streams</a></li><li><a href="#g:9">FreeT Transformations</a></li><li><a href="#g:10">Re-exports</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>This module provides <code>pipes</code> utilities for "byte streams", which are
streams of strict <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></code>s chunks. Use byte streams to interact
with both <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a></code>s and lazy <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></code>s.</p><p>To stream to or from <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a></code>s, use <code><a href="Pipes-ByteString.html#v:fromHandle">fromHandle</a></code> or <code><a href="Pipes-ByteString.html#v:toHandle">toHandle</a></code>. For
example, the following program copies data from one file to another:</p><pre>import Pipes
import qualified Pipes.ByteString as P
import System.IO
main =
withFile "inFile.txt" ReadMode $ \hIn ->
withFile "outFile.txt" WriteMode $ \hOut ->
runEffect $ P.fromHandle hIn >-> P.toHandle hOut</pre><p>You can stream to and from <code><a href="Pipes-ByteString.html#v:stdin">stdin</a></code> and <code><a href="Pipes-ByteString.html#v:stdout">stdout</a></code> using the predefined <code><a href="Pipes-ByteString.html#v:stdin">stdin</a></code>
and <code><a href="Pipes-ByteString.html#v:stdout">stdout</a></code> pipes, like in the following "echo" program:</p><pre>main = runEffect $ P.stdin >-> P.stdout</pre><p>You can also translate pure lazy <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></code>s to and from pipes:</p><pre>import qualified Data.ByteString.Lazy.Char8 as BL
main = runEffect $ P.fromLazy (BL.pack "Hello, world!\n") >-> P.stdout</pre><p>In addition, this module provides many functions equivalent to lazy
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></code> functions so that you can transform or fold byte streams. For
example, to stream only the first three lines of <code><a href="Pipes-ByteString.html#v:stdin">stdin</a></code> to <code><a href="Pipes-ByteString.html#v:stdout">stdout</a></code> you
would write:</p><pre>import Lens.Family (over)
import Pipes
import qualified Pipes.ByteString as PB
import Pipes.Group (takes)
main = runEffect $ over PB.lines (takes 3) PB.stdin >-> PB.stdout</pre><p>The above program will never bring more than one chunk (~ 32 KB) into
memory, no matter how long the lines are.</p><p>Note that functions in this library are designed to operate on streams that
are insensitive to chunk boundaries. This means that they may freely split
chunks into smaller chunks and <em>discard empty chunks</em>. However, they will
<em>never concatenate chunks</em> in order to provide strict upper bounds on memory
usage.</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"><a href="#v:fromLazy">fromLazy</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer-39-">Producer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m ()</li><li class="src short"><a href="#v:stdin">stdin</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer-39-">Producer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m ()</li><li class="src short"><a href="#v:fromHandle">fromHandle</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer-39-">Producer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m ()</li><li class="src short"><a href="#v:hGetSome">hGetSome</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer-39-">Producer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m ()</li><li class="src short"><a href="#v:hGetNonBlocking">hGetNonBlocking</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer-39-">Producer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m ()</li><li class="src short"><a href="#v:hGet">hGet</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer-39-">Producer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m ()</li><li class="src short"><a href="#v:hGetRange">hGetRange</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer-39-">Producer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m ()</li><li class="src short"><a href="#v:hGetSomeN">hGetSomeN</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Server-39-">Server'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m ()</li><li class="src short"><a href="#v:hGetN">hGetN</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Server-39-">Server'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m ()</li><li class="src short"><a href="#v:stdout">stdout</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Consumer-39-">Consumer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m ()</li><li class="src short"><a href="#v:toHandle">toHandle</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Consumer-39-">Consumer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r</li><li class="src short"><a href="#v:map">map</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Pipe">Pipe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r</li><li class="src short"><a href="#v:concatMap">concatMap</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Pipe">Pipe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r</li><li class="src short"><a href="#v:take">take</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> n) => n -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Pipe">Pipe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m ()</li><li class="src short"><a href="#v:takeWhile">takeWhile</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Pipe">Pipe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m ()</li><li class="src short"><a href="#v:filter">filter</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Pipe">Pipe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r</li><li class="src short"><a href="#v:elemIndices">elemIndices</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> n) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Pipe">Pipe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> n m r</li><li class="src short"><a href="#v:findIndices">findIndices</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> n) => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Pipe">Pipe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> n m r</li><li class="src short"><a href="#v:scan">scan</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Pipe">Pipe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r</li><li class="src short"><a href="#v:toLazy">toLazy</a> :: <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor-Identity.html#t:Identity">Identity</a> () -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:toLazyM">toLazyM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:toLazyM-39-">toLazyM'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m a -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a>, a)</li><li class="src short"><a href="#v:foldBytes">foldBytes</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (x -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> x) -> x -> (x -> r) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m r</li><li class="src short"><a href="#v:head">head</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>)</li><li class="src short"><a href="#v:last">last</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>)</li><li class="src short"><a href="#v:null">null</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:length">length</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> n) => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m n</li><li class="src short"><a href="#v:any">any</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:all">all</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:maximum">maximum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>)</li><li class="src short"><a href="#v:minimum">minimum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>)</li><li class="src short"><a href="#v:elem">elem</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:notElem">notElem</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:find">find</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>)</li><li class="src short"><a href="#v:index">index</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> n) => n -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>)</li><li class="src short"><a href="#v:elemIndex">elemIndex</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> n) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> n)</li><li class="src short"><a href="#v:findIndex">findIndex</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> n) => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> n)</li><li class="src short"><a href="#v:count">count</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> n) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m n</li><li class="src short"><a href="#v:nextByte">nextByte</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>, <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r))</li><li class="src short"><a href="#v:drawByte">drawByte</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-parse-doc/html/Pipes-Parse.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>)</li><li class="src short"><a href="#v:unDrawByte">unDrawByte</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/libghc-pipes-parse-doc/html/Pipes-Parse.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m ()</li><li class="src short"><a href="#v:peekByte">peekByte</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-parse-doc/html/Pipes-Parse.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>)</li><li class="src short"><a href="#v:isEndOfBytes">isEndOfBytes</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-parse-doc/html/Pipes-Parse.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:splitAt">splitAt</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> n) => n -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x))</li><li class="src short"><a href="#v:span">span</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x))</li><li class="src short"><a href="#v:break">break</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x))</li><li class="src short"><a href="#v:breakOn">breakOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x))</li><li class="src short"><a href="#v:groupBy">groupBy</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x))</li><li class="src short"><a href="#v:group">group</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x))</li><li class="src short"><a href="#v:word">word</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x))</li><li class="src short"><a href="#v:line">line</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x))</li><li class="src short"><a href="#v:drop">drop</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> n) => n -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r</li><li class="src short"><a href="#v:dropWhile">dropWhile</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r</li><li class="src short"><a href="#v:intersperse">intersperse</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r</li><li class="src short"><a href="#v:pack">pack</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x)</li><li class="src short"><a href="#v:unpack">unpack</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> m x)</li><li class="src short"><a href="#v:chunksOf-39-">chunksOf'</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> n) => n -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r</li><li class="src short"><a href="#v:chunksOf">chunksOf</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> n) => n -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x)</li><li class="src short"><a href="#v:splitsWith">splitsWith</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x -> FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x</li><li class="src short"><a href="#v:splits">splits</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x)</li><li class="src short"><a href="#v:splitOn">splitOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x)</li><li class="src short"><a href="#v:groupsBy">groupsBy</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x)</li><li class="src short"><a href="#v:groups">groups</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x)</li><li class="src short"><a href="#v:lines">lines</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x)</li><li class="src short"><a href="#v:unlines">unlines</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => Lens' (FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x)</li><li class="src short"><a href="#v:words">words</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x -> FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x</li><li class="src short"><a href="#v:unwords">unwords</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x</li><li class="src short">module <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html">Data.ByteString</a></li><li class="src short">module <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html">Data.Word</a></li><li class="src short">module <a href="file:///usr/share/doc/libghc-pipes-group-doc/html/Pipes-Group.html">Pipes.Group</a></li><li class="src short">module <a href="file:///usr/share/doc/libghc-pipes-parse-doc/html/Pipes-Parse.html">Pipes.Parse</a></li></ul></div><div id="interface"><h1 id="g:1">Producers</h1><div class="top"><p class="src"><a id="v:fromLazy" class="def">fromLazy</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer-39-">Producer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () <a href="src/Pipes-ByteString.html#fromLazy" class="link">Source</a> <a href="#v:fromLazy" class="selflink">#</a></p><div class="doc"><p>Convert a lazy <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></code> into a <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a></code> of strict <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></code>s</p></div></div><div class="top"><p class="src"><a id="v:stdin" class="def">stdin</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer-39-">Producer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () <a href="src/Pipes-ByteString.html#stdin" class="link">Source</a> <a href="#v:stdin" class="selflink">#</a></p><div class="doc"><p>Stream bytes from <code><a href="Pipes-ByteString.html#v:stdin">stdin</a></code></p></div></div><div class="top"><p class="src"><a id="v:fromHandle" class="def">fromHandle</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer-39-">Producer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () <a href="src/Pipes-ByteString.html#fromHandle" class="link">Source</a> <a href="#v:fromHandle" class="selflink">#</a></p><div class="doc"><p>Convert a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a></code> into a byte stream using a default chunk size</p></div></div><div class="top"><p class="src"><a id="v:hGetSome" class="def">hGetSome</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer-39-">Producer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () <a href="src/Pipes-ByteString.html#hGetSome" class="link">Source</a> <a href="#v:hGetSome" class="selflink">#</a></p><div class="doc"><p>Convert a handle into a byte stream using a maximum chunk size</p><p><code><a href="Pipes-ByteString.html#v:hGetSome">hGetSome</a></code> forwards input immediately as it becomes available, splitting the
input into multiple chunks if it exceeds the maximum chunk size.</p></div></div><div class="top"><p class="src"><a id="v:hGetNonBlocking" class="def">hGetNonBlocking</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer-39-">Producer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () <a href="src/Pipes-ByteString.html#hGetNonBlocking" class="link">Source</a> <a href="#v:hGetNonBlocking" class="selflink">#</a></p><div class="doc"><p>Convert a handle into a byte stream using a fixed chunk size</p><p>Similar to <code><a href="Pipes-ByteString.html#v:hGet">hGet</a></code> except that it will never block waiting for data
to become available.</p></div></div><div class="top"><p class="src"><a id="v:hGet" class="def">hGet</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer-39-">Producer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () <a href="src/Pipes-ByteString.html#hGet" class="link">Source</a> <a href="#v:hGet" class="selflink">#</a></p><div class="doc"><p>Convert a handle into a byte stream using a fixed chunk size</p><p><code><a href="Pipes-ByteString.html#v:hGet">hGet</a></code> waits until exactly the requested number of bytes are available for
each chunk.</p></div></div><div class="top"><p class="src"><a id="v:hGetRange" class="def">hGetRange</a> <a href="src/Pipes-ByteString.html#hGetRange" class="link">Source</a> <a href="#v:hGetRange" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Offset</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Size</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a></td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer-39-">Producer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m ()</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Like <code><a href="Pipes-ByteString.html#v:hGet">hGet</a></code> but with an extra parameter specifying an initial handle offset</p></div></div><h1 id="g:2">Servers</h1><div class="top"><p class="src"><a id="v:hGetSomeN" class="def">hGetSomeN</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Server-39-">Server'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () <a href="src/Pipes-ByteString.html#hGetSomeN" class="link">Source</a> <a href="#v:hGetSomeN" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Pipes-ByteString.html#v:hGetSome">hGetSome</a></code>, except you can vary the maximum chunk size for each request</p></div></div><div class="top"><p class="src"><a id="v:hGetN" class="def">hGetN</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Server-39-">Server'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () <a href="src/Pipes-ByteString.html#hGetN" class="link">Source</a> <a href="#v:hGetN" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Pipes-ByteString.html#v:hGet">hGet</a></code>, except you can vary the chunk size for each request</p></div></div><h1 id="g:3">Consumers</h1><div class="top"><p class="src"><a id="v:stdout" class="def">stdout</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Consumer-39-">Consumer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () <a href="src/Pipes-ByteString.html#stdout" class="link">Source</a> <a href="#v:stdout" class="selflink">#</a></p><div class="doc"><p>Stream bytes to <code><a href="Pipes-ByteString.html#v:stdout">stdout</a></code></p><p>Unlike <code><a href="Pipes-ByteString.html#v:toHandle">toHandle</a></code>, <code><a href="Pipes-ByteString.html#v:stdout">stdout</a></code> gracefully terminates on a broken output pipe.</p></div></div><div class="top"><p class="src"><a id="v:toHandle" class="def">toHandle</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Consumer-39-">Consumer'</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r <a href="src/Pipes-ByteString.html#toHandle" class="link">Source</a> <a href="#v:toHandle" class="selflink">#</a></p><div class="doc"><p>Convert a byte stream into a <code>Handle</code></p><pre>p >-> toHandle handle = for p (liftIO . hPutStr handle)</pre></div></div><h1 id="g:4">Pipes</h1><div class="top"><p class="src"><a id="v:map" class="def">map</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Pipe">Pipe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r <a href="src/Pipes-ByteString.html#map" class="link">Source</a> <a href="#v:map" class="selflink">#</a></p><div class="doc"><p>Apply a transformation to each <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code> in the stream</p></div></div><div class="top"><p class="src"><a id="v:concatMap" class="def">concatMap</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Pipe">Pipe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r <a href="src/Pipes-ByteString.html#concatMap" class="link">Source</a> <a href="#v:concatMap" class="selflink">#</a></p><div class="doc"><p>Map a function over the byte stream and concatenate the results</p></div></div><div class="top"><p class="src"><a id="v:take" class="def">take</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> n) => n -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Pipe">Pipe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () <a href="src/Pipes-ByteString.html#take" class="link">Source</a> <a href="#v:take" class="selflink">#</a></p><div class="doc"><p><code>(take n)</code> only allows <code>n</code> bytes to pass</p></div></div><div class="top"><p class="src"><a id="v:takeWhile" class="def">takeWhile</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Pipe">Pipe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () <a href="src/Pipes-ByteString.html#takeWhile" class="link">Source</a> <a href="#v:takeWhile" class="selflink">#</a></p><div class="doc"><p>Take bytes until they fail the predicate</p></div></div><div class="top"><p class="src"><a id="v:filter" class="def">filter</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Pipe">Pipe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r <a href="src/Pipes-ByteString.html#filter" class="link">Source</a> <a href="#v:filter" class="selflink">#</a></p><div class="doc"><p>Only allows <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code>s to pass if they satisfy the predicate</p></div></div><div class="top"><p class="src"><a id="v:elemIndices" class="def">elemIndices</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> n) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Pipe">Pipe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> n m r <a href="src/Pipes-ByteString.html#elemIndices" class="link">Source</a> <a href="#v:elemIndices" class="selflink">#</a></p><div class="doc"><p>Stream all indices whose elements match the given <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code></p></div></div><div class="top"><p class="src"><a id="v:findIndices" class="def">findIndices</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> n) => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Pipe">Pipe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> n m r <a href="src/Pipes-ByteString.html#findIndices" class="link">Source</a> <a href="#v:findIndices" class="selflink">#</a></p><div class="doc"><p>Stream all indices whose elements satisfy the given predicate</p></div></div><div class="top"><p class="src"><a id="v:scan" class="def">scan</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>) -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Pipe">Pipe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r <a href="src/Pipes-ByteString.html#scan" class="link">Source</a> <a href="#v:scan" class="selflink">#</a></p><div class="doc"><p>Strict left scan over the bytes</p></div></div><h1 id="g:5">Folds</h1><div class="top"><p class="src"><a id="v:toLazy" class="def">toLazy</a> :: <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor-Identity.html#t:Identity">Identity</a> () -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> <a href="src/Pipes-ByteString.html#toLazy" class="link">Source</a> <a href="#v:toLazy" class="selflink">#</a></p><div class="doc"><p>Fold a pure <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a></code> of strict <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></code>s into a lazy
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></code></p></div></div><div class="top"><p class="src"><a id="v:toLazyM" class="def">toLazyM</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> <a href="src/Pipes-ByteString.html#toLazyM" class="link">Source</a> <a href="#v:toLazyM" class="selflink">#</a></p><div class="doc"><p>Fold an effectful <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a></code> of strict <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></code>s into a lazy
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></code></p><p>Note: <code><a href="Pipes-ByteString.html#v:toLazyM">toLazyM</a></code> is not an idiomatic use of <code>pipes</code>, but I provide it for
simple testing purposes. Idiomatic <code>pipes</code> style consumes the chunks
immediately as they are generated instead of loading them all into memory.</p></div></div><div class="top"><p class="src"><a id="v:toLazyM-39-" class="def">toLazyM'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m a -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a>, a) <a href="src/Pipes-ByteString.html#toLazyM%27" class="link">Source</a> <a href="#v:toLazyM-39-" class="selflink">#</a></p><div class="doc"><p>Fold an effectful <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a></code> of strict <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></code>s into a lazy
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></code> alongside the return value</p><p>Note: <code><a href="Pipes-ByteString.html#v:toLazyM-39-">toLazyM'</a></code> is not an idiomatic use of <code>pipes</code>, but I provide it for
simple testing purposes. Idiomatic <code>pipes</code> style consumes the chunks
immediately as they are generated instead of loading them all into memory.</p></div></div><div class="top"><p class="src"><a id="v:foldBytes" class="def">foldBytes</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (x -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> x) -> x -> (x -> r) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m r <a href="src/Pipes-ByteString.html#foldBytes" class="link">Source</a> <a href="#v:foldBytes" class="selflink">#</a></p><div class="doc"><p>Reduce the stream of bytes using a strict left fold</p><p>Note: It's more efficient to use folds from <code>Control.Foldl.ByteString</code> in
conjunction with <code>Pipes.Prelude.<code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Prelude.html#v:fold">fold</a></code></code> when possible</p></div></div><div class="top"><p class="src"><a id="v:head" class="def">head</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>) <a href="src/Pipes-ByteString.html#head" class="link">Source</a> <a href="#v:head" class="selflink">#</a></p><div class="doc"><p>Retrieve the first <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code></p></div></div><div class="top"><p class="src"><a id="v:last" class="def">last</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>) <a href="src/Pipes-ByteString.html#last" class="link">Source</a> <a href="#v:last" class="selflink">#</a></p><div class="doc"><p>Retrieve the last <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code></p></div></div><div class="top"><p class="src"><a id="v:null" class="def">null</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Pipes-ByteString.html#null" class="link">Source</a> <a href="#v:null" class="selflink">#</a></p><div class="doc"><p>Determine if the stream is empty</p></div></div><div class="top"><p class="src"><a id="v:length" class="def">length</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> n) => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m n <a href="src/Pipes-ByteString.html#length" class="link">Source</a> <a href="#v:length" class="selflink">#</a></p><div class="doc"><p>Count the number of bytes</p></div></div><div class="top"><p class="src"><a id="v:any" class="def">any</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Pipes-ByteString.html#any" class="link">Source</a> <a href="#v:any" class="selflink">#</a></p><div class="doc"><p>Fold that returns whether <code><a href="M.html#v:Any">Any</a></code> received <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code>s satisfy the predicate</p></div></div><div class="top"><p class="src"><a id="v:all" class="def">all</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Pipes-ByteString.html#all" class="link">Source</a> <a href="#v:all" class="selflink">#</a></p><div class="doc"><p>Fold that returns whether <code><a href="M.html#v:All">All</a></code> received <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code>s satisfy the predicate</p></div></div><div class="top"><p class="src"><a id="v:maximum" class="def">maximum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>) <a href="src/Pipes-ByteString.html#maximum" class="link">Source</a> <a href="#v:maximum" class="selflink">#</a></p><div class="doc"><p>Return the maximum <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code> within a byte stream</p></div></div><div class="top"><p class="src"><a id="v:minimum" class="def">minimum</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>) <a href="src/Pipes-ByteString.html#minimum" class="link">Source</a> <a href="#v:minimum" class="selflink">#</a></p><div class="doc"><p>Return the minimum <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code> within a byte stream</p></div></div><div class="top"><p class="src"><a id="v:elem" class="def">elem</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Pipes-ByteString.html#elem" class="link">Source</a> <a href="#v:elem" class="selflink">#</a></p><div class="doc"><p>Determine whether any element in the byte stream matches the given <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code></p></div></div><div class="top"><p class="src"><a id="v:notElem" class="def">notElem</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Pipes-ByteString.html#notElem" class="link">Source</a> <a href="#v:notElem" class="selflink">#</a></p><div class="doc"><p>Determine whether all elements in the byte stream do not match the given
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code></p></div></div><div class="top"><p class="src"><a id="v:find" class="def">find</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>) <a href="src/Pipes-ByteString.html#find" class="link">Source</a> <a href="#v:find" class="selflink">#</a></p><div class="doc"><p>Find the first element in the stream that matches the predicate</p></div></div><div class="top"><p class="src"><a id="v:index" class="def">index</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> n) => n -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>) <a href="src/Pipes-ByteString.html#index" class="link">Source</a> <a href="#v:index" class="selflink">#</a></p><div class="doc"><p>Index into a byte stream</p></div></div><div class="top"><p class="src"><a id="v:elemIndex" class="def">elemIndex</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> n) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> n) <a href="src/Pipes-ByteString.html#elemIndex" class="link">Source</a> <a href="#v:elemIndex" class="selflink">#</a></p><div class="doc"><p>Find the index of an element that matches the given <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code></p></div></div><div class="top"><p class="src"><a id="v:findIndex" class="def">findIndex</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> n) => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> n) <a href="src/Pipes-ByteString.html#findIndex" class="link">Source</a> <a href="#v:findIndex" class="selflink">#</a></p><div class="doc"><p>Store the first index of an element that satisfies the predicate</p></div></div><div class="top"><p class="src"><a id="v:count" class="def">count</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Num">Num</a> n) => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () -> m n <a href="src/Pipes-ByteString.html#count" class="link">Source</a> <a href="#v:count" class="selflink">#</a></p><div class="doc"><p>Store a tally of how many elements match the given <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code></p></div></div><h1 id="g:6">Parsing</h1><div class="doc"><p>The following parsing utilities are single-byte analogs of the ones found
in <code>pipes-parse</code>.</p></div><div class="top"><p class="src"><a id="v:nextByte" class="def">nextByte</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r -> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#t:Either">Either</a> r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>, <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r)) <a href="src/Pipes-ByteString.html#nextByte" class="link">Source</a> <a href="#v:nextByte" class="selflink">#</a></p><div class="doc"><p>Consume the first byte from a byte stream</p><p><code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes.html#v:next">next</a></code> either fails with a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#v:Left">Left</a></code> if the <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a></code> has no more bytes or
succeeds with a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Either.html#v:Right">Right</a></code> providing the next byte and the remainder of the
<code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:drawByte" class="def">drawByte</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-parse-doc/html/Pipes-Parse.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>) <a href="src/Pipes-ByteString.html#drawByte" class="link">Source</a> <a href="#v:drawByte" class="selflink">#</a></p><div class="doc"><p>Draw one <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code> from the underlying <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a></code>, returning <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code> if the
<code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a></code> is empty</p></div></div><div class="top"><p class="src"><a id="v:unDrawByte" class="def">unDrawByte</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/libghc-pipes-parse-doc/html/Pipes-Parse.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m () <a href="src/Pipes-ByteString.html#unDrawByte" class="link">Source</a> <a href="#v:unDrawByte" class="selflink">#</a></p><div class="doc"><p>Push back a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code> onto the underlying <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a></code></p></div></div><div class="top"><p class="src"><a id="v:peekByte" class="def">peekByte</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-parse-doc/html/Pipes-Parse.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a>) <a href="src/Pipes-ByteString.html#peekByte" class="link">Source</a> <a href="#v:peekByte" class="selflink">#</a></p><div class="doc"><p><code><a href="Pipes-ByteString.html#v:peekByte">peekByte</a></code> checks the first <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code> in the stream, but uses <code><a href="Pipes-ByteString.html#v:unDrawByte">unDrawByte</a></code> to
push the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code> back</p><pre>peekByte = do
x <- drawByte
case x of
Nothing -> return ()
Just w8 -> unDrawByte w8
return x</pre></div></div><div class="top"><p class="src"><a id="v:isEndOfBytes" class="def">isEndOfBytes</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-parse-doc/html/Pipes-Parse.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Pipes-ByteString.html#isEndOfBytes" class="link">Source</a> <a href="#v:isEndOfBytes" class="selflink">#</a></p><div class="doc"><p>Check if the underlying <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a></code> has no more bytes</p><p>Note that this will skip over empty <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></code> chunks, unlike
<code><a href="file:///usr/share/doc/libghc-pipes-parse-doc/html/Pipes-Parse.html#v:isEndOfInput">isEndOfInput</a></code> from <code>pipes-parse</code>.</p><pre>isEndOfBytes = liftM isNothing peekByte</pre></div></div><h1 id="g:7">Parsing Lenses</h1><div class="top"><p class="src"><a id="v:splitAt" class="def">splitAt</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> n) => n -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x)) <a href="src/Pipes-ByteString.html#splitAt" class="link">Source</a> <a href="#v:splitAt" class="selflink">#</a></p><div class="doc"><p>Improper lens that splits a <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a></code> after the given number of bytes</p></div></div><div class="top"><p class="src"><a id="v:span" class="def">span</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x)) <a href="src/Pipes-ByteString.html#span" class="link">Source</a> <a href="#v:span" class="selflink">#</a></p><div class="doc"><p>Improper lens that splits after the longest consecutive group of bytes that
satisfy the given predicate</p></div></div><div class="top"><p class="src"><a id="v:break" class="def">break</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x)) <a href="src/Pipes-ByteString.html#break" class="link">Source</a> <a href="#v:break" class="selflink">#</a></p><div class="doc"><p>Improper lens that splits after the longest consecutive group of bytes that
fail the given predicate</p></div></div><div class="top"><p class="src"><a id="v:breakOn" class="def">breakOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x)) <a href="src/Pipes-ByteString.html#breakOn" class="link">Source</a> <a href="#v:breakOn" class="selflink">#</a></p><div class="doc"><p>Improper lens that splits at the first occurrence of the pattern.</p></div></div><div class="top"><p class="src"><a id="v:groupBy" class="def">groupBy</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x)) <a href="src/Pipes-ByteString.html#groupBy" class="link">Source</a> <a href="#v:groupBy" class="selflink">#</a></p><div class="doc"><p>Improper lens that splits after the first group of matching bytes, as
defined by the given equality predicate</p></div></div><div class="top"><p class="src"><a id="v:group" class="def">group</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x)) <a href="src/Pipes-ByteString.html#group" class="link">Source</a> <a href="#v:group" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Pipes-ByteString.html#v:groupBy">groupBy</a></code>, where the equality predicate is (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#v:-61--61-">==</a></code>)</p></div></div><div class="top"><p class="src"><a id="v:word" class="def">word</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x)) <a href="src/Pipes-ByteString.html#word" class="link">Source</a> <a href="#v:word" class="selflink">#</a></p><div class="doc"><p>Improper lens that splits a <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a></code> after the first word</p><p>Unlike <code><a href="Pipes-ByteString.html#v:words">words</a></code>, this does not drop leading whitespace</p><p>Note: This function is purely for demonstration purposes since it assumes a
particular encoding. You should prefer the <code><a href="Data-Text.html#v:Text">Text</a></code> equivalent of
this function from the <code>pipes-text</code> library.</p></div></div><div class="top"><p class="src"><a id="v:line" class="def">line</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x)) <a href="src/Pipes-ByteString.html#line" class="link">Source</a> <a href="#v:line" class="selflink">#</a></p><div class="doc"><p>Improper lens that splits a <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a></code> after the first line</p><p>Unlike <code><a href="Pipes-ByteString.html#v:lines">lines</a></code>, this does not consume the newline marker, which is stored
within the inner <code><a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a></code></p><p>Note: This function is purely for demonstration purposes since it assumes a
particular encoding. You should prefer the <code><a href="Data-Text.html#v:Text">Text</a></code> equivalent of
this function from the <code>pipes-text</code> library.</p></div></div><h1 id="g:8">Transforming Byte Streams</h1><div class="top"><p class="src"><a id="v:drop" class="def">drop</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> n) => n -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r <a href="src/Pipes-ByteString.html#drop" class="link">Source</a> <a href="#v:drop" class="selflink">#</a></p><div class="doc"><p><code>(drop n)</code> drops the first <code>n</code> bytes</p></div></div><div class="top"><p class="src"><a id="v:dropWhile" class="def">dropWhile</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r <a href="src/Pipes-ByteString.html#dropWhile" class="link">Source</a> <a href="#v:dropWhile" class="selflink">#</a></p><div class="doc"><p>Drop bytes until they fail the predicate</p></div></div><div class="top"><p class="src"><a id="v:intersperse" class="def">intersperse</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r <a href="src/Pipes-ByteString.html#intersperse" class="link">Source</a> <a href="#v:intersperse" class="selflink">#</a></p><div class="doc"><p>Intersperse a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code> in between the bytes of the byte stream</p></div></div><div class="top"><p class="src"><a id="v:pack" class="def">pack</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) <a href="src/Pipes-ByteString.html#pack" class="link">Source</a> <a href="#v:pack" class="selflink">#</a></p><div class="doc"><p>Improper lens from unpacked <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code>s to packaged <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></code>s</p></div></div><div class="top"><p class="src"><a id="v:unpack" class="def">unpack</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> m x) <a href="src/Pipes-ByteString.html#unpack" class="link">Source</a> <a href="#v:unpack" class="selflink">#</a></p><div class="doc"><p>Improper lens from packed <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></code>s to unpacked <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code>s</p></div></div><div class="top"><p class="src"><a id="v:chunksOf-39-" class="def">chunksOf'</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> n) => n -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m r <a href="src/Pipes-ByteString.html#chunksOf%27" class="link">Source</a> <a href="#v:chunksOf-39-" class="selflink">#</a></p><div class="doc"><p>Group byte stream chunks into chunks of fixed length</p><p>Note: This is the <em>only</em> function in this API that concatenates
<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></code> chunks, which requires allocating new <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></code>s</p></div></div><h1 id="g:9">FreeT Transformations</h1><div class="top"><p class="src"><a id="v:chunksOf" class="def">chunksOf</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Prelude.html#t:Integral">Integral</a> n) => n -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x) <a href="src/Pipes-ByteString.html#chunksOf" class="link">Source</a> <a href="#v:chunksOf" class="selflink">#</a></p><div class="doc"><p>Split a byte stream into <code>FreeT</code>-delimited byte streams of fixed size</p></div></div><div class="top"><p class="src"><a id="v:splitsWith" class="def">splitsWith</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x -> FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x <a href="src/Pipes-ByteString.html#splitsWith" class="link">Source</a> <a href="#v:splitsWith" class="selflink">#</a></p><div class="doc"><p>Split a byte stream into groups separated by bytes that satisfy the
predicate</p></div></div><div class="top"><p class="src"><a id="v:splits" class="def">splits</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x) <a href="src/Pipes-ByteString.html#splits" class="link">Source</a> <a href="#v:splits" class="selflink">#</a></p><div class="doc"><p>Split a byte stream into groups separated by the given byte</p></div></div><div class="top"><p class="src"><a id="v:splitOn" class="def">splitOn</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x) <a href="src/Pipes-ByteString.html#splitOn" class="link">Source</a> <a href="#v:splitOn" class="selflink">#</a></p><div class="doc"><p>Split a byte stream into groups separated by the given <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></code></p></div></div><div class="top"><p class="src"><a id="v:groupsBy" class="def">groupsBy</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -> Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x) <a href="src/Pipes-ByteString.html#groupsBy" class="link">Source</a> <a href="#v:groupsBy" class="selflink">#</a></p><div class="doc"><p>Isomorphism between a byte stream and groups of identical bytes using the
supplied equality predicate</p></div></div><div class="top"><p class="src"><a id="v:groups" class="def">groups</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x) <a href="src/Pipes-ByteString.html#groups" class="link">Source</a> <a href="#v:groups" class="selflink">#</a></p><div class="doc"><p>Like <code><a href="Pipes-ByteString.html#v:groupsBy">groupsBy</a></code>, where the equality predicate is (<code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Eq.html#v:-61--61-">==</a></code>)</p></div></div><div class="top"><p class="src"><a id="v:lines" class="def">lines</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => Lens' (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) (FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x) <a href="src/Pipes-ByteString.html#lines" class="link">Source</a> <a href="#v:lines" class="selflink">#</a></p><div class="doc"><p>Improper lens between a bytestream and its lines</p><p>Note: This function is purely for demonstration purposes since it assumes a
particular encoding. You should prefer the <code><a href="Data-Text.html#v:Text">Text</a></code> equivalent of
this function from the <code>pipes-text</code> library.</p></div></div><div class="top"><p class="src"><a id="v:unlines" class="def">unlines</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => Lens' (FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x) (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x) <a href="src/Pipes-ByteString.html#unlines" class="link">Source</a> <a href="#v:unlines" class="selflink">#</a></p><div class="doc"><p>Improper lens between lines and a bytestream</p><p>Note: This function is purely for demonstration purposes since it assumes a
particular encoding. You should prefer the <code><a href="Data-Text.html#v:Text">Text</a></code> equivalent of
this function from the <code>pipes-text</code> library.</p></div></div><div class="top"><p class="src"><a id="v:words" class="def">words</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x -> FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x <a href="src/Pipes-ByteString.html#words" class="link">Source</a> <a href="#v:words" class="selflink">#</a></p><div class="doc"><p>Convert a bytestream to delimited words</p><p>Note: This function is purely for demonstration purposes since it assumes a
particular encoding. You should prefer the <code><a href="Data-Text.html#v:Text">Text</a></code> equivalent of
this function from the <code>pipes-text</code> library.</p></div></div><div class="top"><p class="src"><a id="v:unwords" class="def">unwords</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> m => FreeT (<a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m) m x -> <a href="file:///usr/share/doc/libghc-pipes-doc/html/Pipes-Core.html#t:Producer">Producer</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a> m x <a href="src/Pipes-ByteString.html#unwords" class="link">Source</a> <a href="#v:unwords" class="selflink">#</a></p><div class="doc"><p>Convert delimited words back to a byte stream</p><p>Note: This function is purely for demonstration purposes since it assumes a
particular encoding. You should prefer the <code><a href="Data-Text.html#v:Text">Text</a></code> equivalent of
this function from the <code>pipes-text</code> library.</p></div></div><h1 id="g:10">Re-exports</h1><div class="doc"><p><code>Data.ByteString</code> re-exports the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html#t:ByteString">ByteString</a></code> type.</p><p><code>Data.Word</code> re-exports the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html#t:Word8">Word8</a></code> type.</p><p><code>Pipes.Parse</code> re-exports <code><a href="file:///usr/share/doc/libghc-pipes-parse-doc/html/Pipes-Parse.html#t:Parser">Parser</a></code>.</p><p><code>Pipes.Group</code> re-exports <code><a href="file:///usr/share/doc/libghc-pipes-group-doc/html/Pipes-Group.html#v:concats">concats</a></code>, <code><a href="file:///usr/share/doc/libghc-pipes-group-doc/html/Pipes-Group.html#v:intercalates">intercalates</a></code>, and <code>FreeT</code>
(the type).</p></div><div class="top"><p class="src">module <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.8.1/Data-ByteString.html">Data.ByteString</a></p></div><div class="top"><p class="src">module <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Word.html">Data.Word</a></p></div><div class="top"><p class="src">module <a href="file:///usr/share/doc/libghc-pipes-group-doc/html/Pipes-Group.html">Pipes.Group</a></p></div><div class="top"><p class="src">module <a href="file:///usr/share/doc/libghc-pipes-parse-doc/html/Pipes-Parse.html">Pipes.Parse</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
|