/usr/share/doc/libghc-attoparsec-doc/html/Data-Attoparsec-ByteString-Lazy.html is in libghc-attoparsec-doc 0.10.1.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Data.Attoparsec.ByteString.Lazy</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Data-Attoparsec-ByteString-Lazy.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Attoparsec-ByteString-Lazy.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">attoparsec-0.10.1.1: Fast combinator parsing for bytestrings</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>unknown</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>bos@serpentine.com</td></tr><tr><th>Safe Haskell</th><td>Safe-Infered</td></tr></table><p class="caption">Data.Attoparsec.ByteString.Lazy</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Running parsers
</a><ul><li><a href="#g:2">Result conversion
</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Simple, efficient combinator parsing for lazy <code><a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.9.2.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></code>
strings, loosely based on the Parsec library.
</p><p>This is essentially the same code as in the <code><a href="Data.html#t:Attoparsec">Attoparsec</a></code>
module, only with a <code><a href="Data-Attoparsec-ByteString-Lazy.html#v:parse">parse</a></code> function that can consume a lazy
<code><a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.9.2.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></code> incrementally, and a <code><a href="Data-Attoparsec-ByteString-Lazy.html#t:Result">Result</a></code> type that does not allow
more input to be fed in. Think of this as suitable for use with a
lazily read file, e.g. via <code><a href="L.html#v:readFile">readFile</a></code> or <code><a href="L.html#v:hGetContents">hGetContents</a></code>.
</p><p>Behind the scenes, strict <code><a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.9.2.1/Data-ByteString.html#t:ByteString">ByteString</a></code> values are still used
internally to store parser input and manipulate it efficiently.
High-performance parsers such as <code><a href="Data-Attoparsec-ByteString.html#v:string">string</a></code> still expect strict
<code><a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.9.2.1/Data-ByteString.html#t:ByteString">ByteString</a></code> parameters.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Result">Result</a> r<ul class="subs"><li>= <a href="#v:Fail">Fail</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.9.2.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>] <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> </li><li>| <a href="#v:Done">Done</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.9.2.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> r </li></ul></li><li class="src short">module <a href="Data-Attoparsec-ByteString.html">Data.Attoparsec.ByteString</a></li><li class="src short"><a href="#v:parse">parse</a> :: <a href="Data-Attoparsec-ByteString.html#t:Parser">Parser</a> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.9.2.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> -> <a href="Data-Attoparsec-ByteString-Lazy.html#t:Result">Result</a> a</li><li class="src short"><a href="#v:parseTest">parseTest</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> a => <a href="Data-Attoparsec-ByteString.html#t:Parser">Parser</a> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.9.2.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:maybeResult">maybeResult</a> :: <a href="Data-Attoparsec-ByteString-Lazy.html#t:Result">Result</a> r -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> r</li><li class="src short"><a href="#v:eitherResult">eitherResult</a> :: <a href="Data-Attoparsec-ByteString-Lazy.html#t:Result">Result</a> r -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Either.html#t:Either">Either</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> r</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Result" class="def">Result</a> r <a href="src/Data-Attoparsec-ByteString-Lazy.html#Result" class="link">Source</a></p><div class="doc"><p>The result of a parse.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Fail" class="def">Fail</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.9.2.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> [<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a>] <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></td><td class="doc"><p>The parse failed. The <code><a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.9.2.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></code> is the input
that had not yet been consumed when the failure
occurred. The <code>[</code><code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></code><code>]</code> is a list of contexts
in which the error occurred. The <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a></code> is the
message describing the error, if any.
</p></td></tr><tr><td class="src"><a name="v:Done" class="def">Done</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.9.2.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> r</td><td class="doc"><p>The parse succeeded. The <code><a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.9.2.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></code> is the
input that had not yet been consumed (if any) when
the parse succeeded.
</p></td></tr></table></div><div class="subs instances"><p id="control.i:Result" class="caption collapser" onclick="toggleSection('i:Result')">Instances</p><div id="section.i:Result" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Control-Monad.html#t:Functor">Functor</a> <a href="Data-Attoparsec-ByteString-Lazy.html#t:Result">Result</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> r => <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> (<a href="Data-Attoparsec-ByteString-Lazy.html#t:Result">Result</a> r)</td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src">module <a href="Data-Attoparsec-ByteString.html">Data.Attoparsec.ByteString</a></p></div><h1 id="g:1">Running parsers
</h1><div class="top"><p class="src"><a name="v:parse" class="def">parse</a> :: <a href="Data-Attoparsec-ByteString.html#t:Parser">Parser</a> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.9.2.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> -> <a href="Data-Attoparsec-ByteString-Lazy.html#t:Result">Result</a> a<a href="src/Data-Attoparsec-ByteString-Lazy.html#parse" class="link">Source</a></p><div class="doc"><p>Run a parser and return its result.
</p></div></div><div class="top"><p class="src"><a name="v:parseTest" class="def">parseTest</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> a => <a href="Data-Attoparsec-ByteString.html#t:Parser">Parser</a> a -> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.9.2.1/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc-doc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/Data-Attoparsec-ByteString-Lazy.html#parseTest" class="link">Source</a></p><div class="doc"><p>Run a parser and print its result to standard output.
</p></div></div><h2 id="g:2">Result conversion
</h2><div class="top"><p class="src"><a name="v:maybeResult" class="def">maybeResult</a> :: <a href="Data-Attoparsec-ByteString-Lazy.html#t:Result">Result</a> r -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> r<a href="src/Data-Attoparsec-ByteString-Lazy.html#maybeResult" class="link">Source</a></p><div class="doc"><p>Convert a <code><a href="Data-Attoparsec-ByteString-Lazy.html#t:Result">Result</a></code> value to a <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a></code> value.
</p></div></div><div class="top"><p class="src"><a name="v:eitherResult" class="def">eitherResult</a> :: <a href="Data-Attoparsec-ByteString-Lazy.html#t:Result">Result</a> r -> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Either.html#t:Either">Either</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-String.html#t:String">String</a> r<a href="src/Data-Attoparsec-ByteString-Lazy.html#eitherResult" class="link">Source</a></p><div class="doc"><p>Convert a <code><a href="Data-Attoparsec-ByteString-Lazy.html#t:Result">Result</a></code> value to an <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.5.0.0/Data-Either.html#t:Either">Either</a></code> value.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.10.0</p></div></body></html>
|