Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > fe020c59895ac11f31b8eb3941ad2f43 > files > 65

ghc-HTTP-devel-4000.1.1-8.fc15.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Network.BufferType</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Network-BufferType.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Network-BufferType.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">HTTP-4000.1.1: A library for client-side HTTP</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>non-portable (not tested)</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Sigbjorn Finne &lt;sigbjorn.finne@gmail.com&gt;</td></tr></table><p class="caption">Network.BufferType</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>In order to give the user freedom in how request and response content
 is represented, a sufficiently abstract representation is needed of
 these internally. The <a href="Network-BufferType.html">Network.BufferType</a> module provides this, defining
 the <code><a href="Network-BufferType.html#t:BufferType">BufferType</a></code> class and its ad-hoc representation of buffer operations
 via the <code><a href="Network-BufferType.html#t:BufferOp">BufferOp</a></code> record.
</p><p>This module provides definitions for the standard buffer types that the
 package supports, i.e., for <code>String</code> and <code>ByteString</code> (strict and lazy.)
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span>  <a href="#t:BufferType">BufferType</a> bufType  <span class="keyword">where</span><ul class="subs"><li><a href="#v:bufferOps">bufferOps</a> :: <a href="Network-BufferType.html#t:BufferOp">BufferOp</a> bufType</li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:BufferOp">BufferOp</a> a = <a href="#v:BufferOp">BufferOp</a> {<ul class="subs"><li><a href="#v:buf_hGet">buf_hGet</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> a</li><li><a href="#v:buf_hGetContents">buf_hGetContents</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> a</li><li><a href="#v:buf_hPut">buf_hPut</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li><a href="#v:buf_hGetLine">buf_hGetLine</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> a</li><li><a href="#v:buf_empty">buf_empty</a> :: a</li><li><a href="#v:buf_append">buf_append</a> :: a -&gt; a -&gt; a</li><li><a href="#v:buf_concat">buf_concat</a> :: [a] -&gt; a</li><li><a href="#v:buf_fromStr">buf_fromStr</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -&gt; a</li><li><a href="#v:buf_toStr">buf_toStr</a> :: a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></li><li><a href="#v:buf_snoc">buf_snoc</a> :: a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Word.html#t:Word8">Word8</a> -&gt; a</li><li><a href="#v:buf_splitAt">buf_splitAt</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; (a, a)</li><li><a href="#v:buf_span">buf_span</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; a -&gt; (a, a)</li><li><a href="#v:buf_isLineTerm">buf_isLineTerm</a> :: a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:buf_isEmpty">buf_isEmpty</a> :: a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></li></ul>}</li><li class="src short"><a href="#v:strictBufferOp">strictBufferOp</a> :: <a href="Network-BufferType.html#t:BufferOp">BufferOp</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:lazyBufferOp">lazyBufferOp</a> :: <a href="Network-BufferType.html#t:BufferOp">BufferOp</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:stringBufferOp">stringBufferOp</a> :: <a href="Network-BufferType.html#t:BufferOp">BufferOp</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:BufferType" class="def">BufferType</a> bufType  <span class="keyword">where</span><a href="src/Network-BufferType.html#BufferType" class="link">Source</a></p><div class="doc"><p>The <code>BufferType</code> class encodes, in a mixed-mode way, the interface
 that the library requires to operate over data embedded in HTTP
 requests and responses. That is, we use explicit dictionaries
 for the operations, but overload the name of the dicts themselves.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:bufferOps" class="def">bufferOps</a> :: <a href="Network-BufferType.html#t:BufferOp">BufferOp</a> bufType<a href="src/Network-BufferType.html#bufferOps" class="link">Source</a></p></div><div class="subs instances"><p id="control.i:BufferType" class="caption collapser" onclick="toggleSection('i:BufferType')">Instances</p><div id="section.i:BufferType" class="show"><table><tr><td class="src"><a href="Network-BufferType.html#t:BufferType">BufferType</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Network-BufferType.html#t:BufferType">BufferType</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Network-BufferType.html#t:BufferType">BufferType</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:BufferOp" class="def">BufferOp</a> a <a href="src/Network-BufferType.html#BufferOp" class="link">Source</a></p><div class="doc"><p><code>BufferOp</code> encodes the I/O operations of the underlying buffer over 
 a Handle in an (explicit) dictionary type. May not be needed, but gives
 us flexibility in explicit overriding and wrapping up of these methods.
</p><p>Along with IO operations is an ad-hoc collection of functions for working
 with these abstract buffers, as needed by the internals of the code
 that processes requests and responses.
</p><p>We supply three default <code>BufferOp</code> values, for <code>String</code> along with the
 strict and lazy versions of <code>ByteString</code>. To add others, provide <code>BufferOp</code>
 definitions for 
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:BufferOp" class="def">BufferOp</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:buf_hGet" class="def">buf_hGet</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> a</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:buf_hGetContents" class="def">buf_hGetContents</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> a</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:buf_hPut" class="def">buf_hPut</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -&gt; a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:buf_hGetLine" class="def">buf_hGetLine</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/GHC-IO-Handle.html#t:Handle">Handle</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> a</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:buf_empty" class="def">buf_empty</a> :: a</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:buf_append" class="def">buf_append</a> :: a -&gt; a -&gt; a</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:buf_concat" class="def">buf_concat</a> :: [a] -&gt; a</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:buf_fromStr" class="def">buf_fromStr</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a> -&gt; a</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:buf_toStr" class="def">buf_toStr</a> :: a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:buf_snoc" class="def">buf_snoc</a> :: a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Word.html#t:Word8">Word8</a> -&gt; a</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:buf_splitAt" class="def">buf_splitAt</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -&gt; a -&gt; (a, a)</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:buf_span" class="def">buf_span</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; a -&gt; (a, a)</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:buf_isLineTerm" class="def">buf_isLineTerm</a> :: a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:buf_isEmpty" class="def">buf_isEmpty</a> :: a -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:BufferOp" class="caption collapser" onclick="toggleSection('i:BufferOp')">Instances</p><div id="section.i:BufferOp" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Network-BufferType.html#t:BufferOp">BufferOp</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:strictBufferOp" class="def">strictBufferOp</a> :: <a href="Network-BufferType.html#t:BufferOp">BufferOp</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString.html#t:ByteString">ByteString</a><a href="src/Network-BufferType.html#strictBufferOp" class="link">Source</a></p><div class="doc"><p><code>strictBufferOp</code> is the <code><a href="Network-BufferType.html#t:BufferOp">BufferOp</a></code> definition over <code>ByteString</code>s,
 the non-lazy kind.
</p></div></div><div class="top"><p class="src"><a name="v:lazyBufferOp" class="def">lazyBufferOp</a> :: <a href="Network-BufferType.html#t:BufferOp">BufferOp</a> <a href="/usr/share/doc/ghc/html/libraries/bytestring-0.9.1.10/Data-ByteString-Lazy.html#t:ByteString">ByteString</a><a href="src/Network-BufferType.html#lazyBufferOp" class="link">Source</a></p><div class="doc"><p><code>lazyBufferOp</code> is the <code><a href="Network-BufferType.html#t:BufferOp">BufferOp</a></code> definition over <code>ByteString</code>s,
 the non-strict kind.
</p></div></div><div class="top"><p class="src"><a name="v:stringBufferOp" class="def">stringBufferOp</a> :: <a href="Network-BufferType.html#t:BufferOp">BufferOp</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a><a href="src/Network-BufferType.html#stringBufferOp" class="link">Source</a></p><div class="doc"><p><code>stringBufferOp</code> is the <code><a href="Network-BufferType.html#t:BufferOp">BufferOp</a></code> definition over <code>String</code>s.
 It is defined in terms of <code>strictBufferOp</code> operations,
 unpacking/converting to <code>String</code> when needed.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>