This file is indexed.

/usr/share/doc/libghc-polyparse-doc/html/Text-Parse-ByteString.html is in libghc-polyparse-doc 1.9-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!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>Text.Parse.ByteString</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_Text-Parse-ByteString.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text-Parse-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">polyparse-1.9: A variety of alternative parser combinator libraries.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Text.Parse.ByteString</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">The Parse class is a replacement for the standard Read class. 
</a><ul><li><a href="#g:2">Combinators specific to bytestring input, lexed haskell-style
</a></li><li><a href="#g:3">Parsers for literal numerics and characters
</a></li><li><a href="#g:4">Re-export all the more general combinators from Poly too
</a></li><li><a href="#g:5">ByteStrings and Strings as whole entities
</a></li></ul></li></ul></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:TextParser">TextParser</a> a = <a href="Text-ParserCombinators-Poly-ByteStringChar.html#t:Parser">Parser</a> a</li><li class="src short"><span class="keyword">class</span>  <a href="#t:Parse">Parse</a> a  <span class="keyword">where</span><ul class="subs"><li><a href="#v:parse">parse</a> :: <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a</li><li><a href="#v:parsePrec">parsePrec</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a</li><li><a href="#v:parseList">parseList</a> :: <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> [a]</li></ul></li><li class="src short"><a href="#v:parseByRead">parseByRead</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Read.html#t:Read">Read</a> a =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a</li><li class="src short"><a href="#v:readByParse">readByParse</a> ::  <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> a</li><li class="src short"><a href="#v:readsPrecByParsePrec">readsPrecByParsePrec</a> ::  (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a) -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> a</li><li class="src short"><a href="#v:word">word</a> :: <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:isWord">isWord</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:optionalParens">optionalParens</a> ::  <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a</li><li class="src short"><a href="#v:parens">parens</a> ::  <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a</li><li class="src short"><a href="#v:field">field</a> :: <a href="Text-Parse-ByteString.html#t:Parse">Parse</a> a =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a</li><li class="src short"><a href="#v:constructors">constructors</a> ::  [(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a>, <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a)] -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a</li><li class="src short"><a href="#v:enumeration">enumeration</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> a =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; [a] -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a</li><li class="src short"><a href="#v:parseSigned">parseSigned</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Real">Real</a> a =&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a</li><li class="src short"><a href="#v:parseInt">parseInt</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; a -&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) -&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>) -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a</li><li class="src short"><a href="#v:parseDec">parseDec</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a</li><li class="src short"><a href="#v:parseOct">parseOct</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a</li><li class="src short"><a href="#v:parseHex">parseHex</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a</li><li class="src short"><a href="#v:parseUnsignedInteger">parseUnsignedInteger</a> :: <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integer">Integer</a></li><li class="src short"><a href="#v:parseFloat">parseFloat</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:RealFrac">RealFrac</a> a =&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a</li><li class="src short"><a href="#v:parseLitChar">parseLitChar</a> :: <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a></li><li class="src short">module <a href="Text-ParserCombinators-Poly-ByteStringChar.html">Text.ParserCombinators.Poly.ByteStringChar</a></li><li class="src short"><a href="#v:allAsByteString">allAsByteString</a> :: <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:allAsString">allAsString</a> :: <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></li></ul></div><div id="interface"><h1 id="g:1">The Parse class is a replacement for the standard Read class. 
</h1><div class="doc"><p>The Parse class is a replacement for the standard Read class.  It is a
 specialisation of the (poly) Parser monad for ByteString input.
 There are instances defined for all Prelude types.
 For user-defined types, you can write your own instance, or use
 DrIFT to generate them automatically, e.g. {-! derive : Parse !-}
</p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:TextParser" class="def">TextParser</a> a = <a href="Text-ParserCombinators-Poly-ByteStringChar.html#t:Parser">Parser</a> a<a href="src/Text-Parse-ByteString.html#TextParser" class="link">Source</a></p><div class="doc"><p>A synonym for a ByteString Parser, i.e. bytestring input (no state)
</p></div></div><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:Parse" class="def">Parse</a> a  <span class="keyword">where</span><a href="src/Text-Parse-ByteString.html#Parse" class="link">Source</a></p><div class="doc"><p>The class <code>Parse</code> is a replacement for <code>Read</code>, operating over String input.
   Essentially, it permits better error messages for why something failed to
   parse.  It is rather important that <code>parse</code> can read back exactly what
   is generated by the corresponding instance of <code>show</code>.  To apply a parser
   to some text, use <code>runParser</code>.
</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:parse" class="def">parse</a> :: <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a<a href="src/Text-Parse-ByteString.html#parse" class="link">Source</a></p><div class="doc"><p>A straightforward parser for an item.  (A minimal definition of
   a class instance requires either |parse| or |parsePrec|.  In general,
   for a type that never needs parens, you should define |parse|, but
   for a type that _may_ need parens, you should define |parsePrec|.)
</p></div><p class="src"><a name="v:parsePrec" class="def">parsePrec</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a<a href="src/Text-Parse-ByteString.html#parsePrec" class="link">Source</a></p><div class="doc"><p>A straightforward parser for an item, given the precedence of
   any surrounding expression.  (Precedence determines whether
   parentheses are mandatory or optional.)
</p></div><p class="src"><a name="v:parseList" class="def">parseList</a> :: <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> [a]<a href="src/Text-Parse-ByteString.html#parseList" class="link">Source</a></p><div class="doc"><p>Parsing a list of items by default accepts the [] and comma syntax,
   except when the list is really a character string using &quot;&quot;.
</p></div></div><div class="subs instances"><p id="control.i:Parse" class="caption collapser" onclick="toggleSection('i:Parse')">Instances</p><div id="section.i:Parse" class="show"><table><tr><td class="src"><a href="Text-Parse-ByteString.html#t:Parse">Parse</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Text-Parse-ByteString.html#t:Parse">Parse</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Text-Parse-ByteString.html#t:Parse">Parse</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Text-Parse-ByteString.html#t:Parse">Parse</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Float">Float</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Text-Parse-ByteString.html#t:Parse">Parse</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Text-Parse-ByteString.html#t:Parse">Parse</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Text-Parse-ByteString.html#t:Parse">Parse</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ordering">Ordering</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Text-Parse-ByteString.html#t:Parse">Parse</a> ()</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Text-Parse-ByteString.html#t:Parse">Parse</a> a =&gt; <a href="Text-Parse-ByteString.html#t:Parse">Parse</a> [a]</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Text-Parse-ByteString.html#t:Parse">Parse</a> a =&gt; <a href="Text-Parse-ByteString.html#t:Parse">Parse</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Text-Parse-ByteString.html#t:Parse">Parse</a> a, <a href="Text-Parse-ByteString.html#t:Parse">Parse</a> b) =&gt; <a href="Text-Parse-ByteString.html#t:Parse">Parse</a> (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Either.html#t:Either">Either</a> a b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Text-Parse-ByteString.html#t:Parse">Parse</a> a, <a href="Text-Parse-ByteString.html#t:Parse">Parse</a> b) =&gt; <a href="Text-Parse-ByteString.html#t:Parse">Parse</a> (a, b)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">(<a href="Text-Parse-ByteString.html#t:Parse">Parse</a> a, <a href="Text-Parse-ByteString.html#t:Parse">Parse</a> b, <a href="Text-Parse-ByteString.html#t:Parse">Parse</a> c) =&gt; <a href="Text-Parse-ByteString.html#t:Parse">Parse</a> (a, b, c)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:parseByRead" class="def">parseByRead</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Read.html#t:Read">Read</a> a =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a<a href="src/Text-Parse-ByteString.html#parseByRead" class="link">Source</a></p><div class="doc"><p>If there already exists a Read instance for a type, then we can make
   a Parser for it, but with only poor error-reporting.  The string argument
   is the expected type or value (for error-reporting only).  Use of this
   wrapper function is NOT recommended with ByteString, because there
   is a lot of inefficiency in repeated conversions to/from String.
</p></div></div><div class="top"><p class="src"><a name="v:readByParse" class="def">readByParse</a> ::  <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> a<a href="src/Text-Parse-ByteString.html#readByParse" class="link">Source</a></p><div class="doc"><p>If you have a TextParser for a type, you can easily make it into
   a Read instance, by throwing away any error messages.  Use of this
   wrapper function is NOT recommended with ByteString, because there
   is a lot of inefficiency in conversions to/from String.
</p></div></div><div class="top"><p class="src"><a name="v:readsPrecByParsePrec" class="def">readsPrecByParsePrec</a> ::  (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a) -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-ParserCombinators-ReadP.html#t:ReadS">ReadS</a> a<a href="src/Text-Parse-ByteString.html#readsPrecByParsePrec" class="link">Source</a></p><div class="doc"><p>If you have a TextParser for a type, you can easily make it into
   a Read instance, by throwing away any error messages.  Use of this
   wrapper function is NOT recommended with ByteString, because there
   is a lot of inefficiency in conversions to/from String.
</p></div></div><h2 id="g:2">Combinators specific to bytestring input, lexed haskell-style
</h2><div class="top"><p class="src"><a name="v:word" class="def">word</a> :: <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a><a href="src/Text-Parse-ByteString.html#word" class="link">Source</a></p><div class="doc"><p>One lexical chunk (Haskell-style lexing).
</p></div></div><div class="top"><p class="src"><a name="v:isWord" class="def">isWord</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a><a href="src/Text-Parse-ByteString.html#isWord" class="link">Source</a></p><div class="doc"><p>Ensure that the next input word is the given string.  (Note the input
   is lexed as haskell, so wordbreaks at spaces, symbols, etc.)
</p></div></div><div class="top"><p class="src"><a name="v:optionalParens" class="def">optionalParens</a> ::  <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a<a href="src/Text-Parse-ByteString.html#optionalParens" class="link">Source</a></p><div class="doc"><p>Allow optional nested string parens around an item.
</p></div></div><div class="top"><p class="src"><a name="v:parens" class="def">parens</a> ::  <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a<a href="src/Text-Parse-ByteString.html#parens" class="link">Source</a></p><div class="doc"><p>Allow nested parens around an item (one set required when Bool is True).
</p></div></div><div class="top"><p class="src"><a name="v:field" class="def">field</a> :: <a href="Text-Parse-ByteString.html#t:Parse">Parse</a> a =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a<a href="src/Text-Parse-ByteString.html#field" class="link">Source</a></p><div class="doc"><p>Deal with named field syntax.  The string argument is the field name,
   and the parser returns the value of the field.
</p></div></div><div class="top"><p class="src"><a name="v:constructors" class="def">constructors</a> ::  [(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a>, <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a)] -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a<a href="src/Text-Parse-ByteString.html#constructors" class="link">Source</a></p><div class="doc"><p>Parse one of a bunch of alternative constructors.  In the list argument,
   the first element of the pair is the constructor name, and
   the second is the parser for the rest of the value.  The first matching
   parse is returned.
</p></div></div><div class="top"><p class="src"><a name="v:enumeration" class="def">enumeration</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> a =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; [a] -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a<a href="src/Text-Parse-ByteString.html#enumeration" class="link">Source</a></p><div class="doc"><p>Parse one of the given nullary constructors (an enumeration).
   The string argument is the name of the type, and the list argument
   should contain all of the possible enumeration values.
</p></div></div><h2 id="g:3">Parsers for literal numerics and characters
</h2><div class="top"><p class="src"><a name="v:parseSigned" class="def">parseSigned</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Real">Real</a> a =&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a<a href="src/Text-Parse-ByteString.html#parseSigned" class="link">Source</a></p><div class="doc"><p>For any numeric parser, permit a negation sign in front of it.
</p></div></div><div class="top"><p class="src"><a name="v:parseInt" class="def">parseInt</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; a -&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a>) -&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>) -&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a<a href="src/Text-Parse-ByteString.html#parseInt" class="link">Source</a></p><div class="doc"><p>Parse any (unsigned) Integral numeric literal.
   Needs a base, radix, isDigit predicate,
   and digitToInt converter, appropriate to the result type.
</p></div></div><div class="top"><p class="src"><a name="v:parseDec" class="def">parseDec</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a<a href="src/Text-Parse-ByteString.html#parseDec" class="link">Source</a></p><div class="doc"><p>Parse a decimal, octal, or hexadecimal (unsigned) Integral numeric literal.
</p></div></div><div class="top"><p class="src"><a name="v:parseOct" class="def">parseOct</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a<a href="src/Text-Parse-ByteString.html#parseOct" class="link">Source</a></p><div class="doc"><p>Parse a decimal, octal, or hexadecimal (unsigned) Integral numeric literal.
</p></div></div><div class="top"><p class="src"><a name="v:parseHex" class="def">parseHex</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a<a href="src/Text-Parse-ByteString.html#parseHex" class="link">Source</a></p><div class="doc"><p>Parse a decimal, octal, or hexadecimal (unsigned) Integral numeric literal.
</p></div></div><div class="top"><p class="src"><a name="v:parseUnsignedInteger" class="def">parseUnsignedInteger</a> :: <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:Integer">Integer</a><a href="src/Text-Parse-ByteString.html#parseUnsignedInteger" class="link">Source</a></p><div class="doc"><p>parseUnsignedInteger uses the underlying ByteString readInteger, so
   will be a lot faster than the generic character-by-character parseInt.
</p></div></div><div class="top"><p class="src"><a name="v:parseFloat" class="def">parseFloat</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#t:RealFrac">RealFrac</a> a =&gt; <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> a<a href="src/Text-Parse-ByteString.html#parseFloat" class="link">Source</a></p><div class="doc"><p>Parse any (unsigned) Floating numeric literal, e.g. Float or Double.
</p></div></div><div class="top"><p class="src"><a name="v:parseLitChar" class="def">parseLitChar</a> :: <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a><a href="src/Text-Parse-ByteString.html#parseLitChar" class="link">Source</a></p><div class="doc"><p>Parse a Haskell character literal.
</p></div></div><h2 id="g:4">Re-export all the more general combinators from Poly too
</h2><div class="top"><p class="src">module <a href="Text-ParserCombinators-Poly-ByteStringChar.html">Text.ParserCombinators.Poly.ByteStringChar</a></p></div><h2 id="g:5">ByteStrings and Strings as whole entities
</h2><div class="top"><p class="src"><a name="v:allAsByteString" class="def">allAsByteString</a> :: <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> <a href="/usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.0.2/Data-ByteString-Lazy.html#t:ByteString">ByteString</a><a href="src/Text-Parse-ByteString.html#allAsByteString" class="link">Source</a></p><div class="doc"><p>Simply return the remaining input ByteString.
</p></div></div><div class="top"><p class="src"><a name="v:allAsString" class="def">allAsString</a> :: <a href="Text-Parse-ByteString.html#t:TextParser">TextParser</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a><a href="src/Text-Parse-ByteString.html#allAsString" class="link">Source</a></p><div class="doc"><p>Simply return the remaining input as a String.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>