This file is indexed.

/usr/share/doc/libghc-attoparsec-doc/html/Data-Attoparsec-ByteString-Char8.html is in libghc-attoparsec-doc 0.13.0.1-1build1.

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

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Data.Attoparsec.ByteString.Char8</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-Char8.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Attoparsec-ByteString-Char8.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.13.0.1: Fast combinator parsing for bytestrings and text</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>Bryan O'Sullivan 2007-2015</td></tr><tr><th>License</th><td>BSD3</td></tr><tr><th>Maintainer</th><td>bos@serpentine.com</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>unknown</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Data.Attoparsec.ByteString.Char8</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Character encodings</a></li><li><a href="#g:2">Parser types</a></li><li><a href="#g:3">Running parsers</a><ul><li><a href="#g:4">Result conversion</a></li></ul></li><li><a href="#g:5">Parsing individual characters</a><ul><li><a href="#g:6">Lookahead</a></li><li><a href="#g:7">Special character parsers</a></li><li><a href="#g:8">Fast predicates</a><ul><li><a href="#g:9">Character classes</a></li></ul></li></ul></li><li><a href="#g:10">Efficient string handling</a><ul><li><a href="#g:11">String combinators</a></li><li><a href="#g:12">Consume all remaining input</a></li></ul></li><li><a href="#g:13">Text parsing</a></li><li><a href="#g:14">Numeric parsers</a></li><li><a href="#g:15">Combinators</a></li><li><a href="#g:16">State observation and manipulation functions</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Simple, efficient, character-oriented combinator parsing for
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></code> strings, loosely based on the Parsec library.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:Parser">Parser</a> = <a href="Data-Attoparsec-Internal-Types.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:Result">Result</a> = <a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:IResult">IResult</a> i r<ul class="subs"><li>= <a href="#v:Fail">Fail</a> i [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a>] <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a></li><li>| <a href="#v:Partial">Partial</a> (i -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a> i r)</li><li>| <a href="#v:Done">Done</a> i r</li></ul></li><li class="src short"><a href="#v:compareResults">compareResults</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> i, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> r) =&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a> i r -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a> i r -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:parse">parse</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Result">Result</a> a</li><li class="src short"><a href="#v:feed">feed</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Monoid.html#t:Monoid">Monoid</a> i =&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a> i r -&gt; i -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a> i r</li><li class="src short"><a href="#v:parseOnly">parseOnly</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> a</li><li class="src short"><a href="#v:parseWith">parseWith</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; m (<a href="Data-Attoparsec-ByteString-Char8.html#t:Result">Result</a> a)</li><li class="src short"><a href="#v:parseTest">parseTest</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> a =&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:maybeResult">maybeResult</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Result">Result</a> r -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.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-Char8.html#t:Result">Result</a> r -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> r</li><li class="src short"><a href="#v:char">char</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:char8">char8</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word8">Word8</a></li><li class="src short"><a href="#v:anyChar">anyChar</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:notChar">notChar</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:satisfy">satisfy</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:peekChar">peekChar</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a>)</li><li class="src short"><a href="#v:peekChar-39-">peekChar'</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:digit">digit</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:letter_iso8859_15">letter_iso8859_15</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:letter_ascii">letter_ascii</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:space">space</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a></li><li class="src short"><a href="#v:isDigit">isDigit</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isDigit_w8">isDigit_w8</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word8">Word8</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isAlpha_iso8859_15">isAlpha_iso8859_15</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isAlpha_ascii">isAlpha_ascii</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isSpace">isSpace</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isSpace_w8">isSpace_w8</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word8">Word8</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:inClass">inClass</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:notInClass">notInClass</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:string">string</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:stringCI">stringCI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:skipSpace">skipSpace</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> ()</li><li class="src short"><a href="#v:skipWhile">skipWhile</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> ()</li><li class="src short"><a href="#v:take">take</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:scan">scan</a> :: s -&gt; (s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> s) -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:takeWhile">takeWhile</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:takeWhile1">takeWhile1</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:takeTill">takeTill</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:.-42--62-">(.*&gt;)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a</li><li class="src short"><a href="#v:-60--42-.">(&lt;*.)</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a</li><li class="src short"><a href="#v:takeByteString">takeByteString</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:takeLazyByteString">takeLazyByteString</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString-Lazy.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:endOfLine">endOfLine</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> ()</li><li class="src short"><a href="#v:isEndOfLine">isEndOfLine</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word8">Word8</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:isHorizontalSpace">isHorizontalSpace</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word8">Word8</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:decimal">decimal</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a</li><li class="src short"><a href="#v:hexadecimal">hexadecimal</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integral">Integral</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bits.html#t:Bits">Bits</a> a) =&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a</li><li class="src short"><a href="#v:signed">signed</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a</li><li class="src short"><a href="#v:double">double</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Number">Number</a><ul class="subs"><li>= <a href="#v:I">I</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a></li><li>| <a href="#v:D">D</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a></li></ul></li><li class="src short"><a href="#v:number">number</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="Data-Attoparsec-ByteString-Char8.html#t:Number">Number</a></li><li class="src short"><a href="#v:rational">rational</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Fractional">Fractional</a> a =&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a</li><li class="src short"><a href="#v:scientific">scientific</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/libghc-scientific-doc/html/Data-Scientific.html#t:Scientific">Scientific</a></li><li class="src short"><a href="#v:try">try</a> :: <a href="Data-Attoparsec-Internal-Types.html#t:Parser">Parser</a> i a -&gt; <a href="Data-Attoparsec-Internal-Types.html#t:Parser">Parser</a> i a</li><li class="src short"><a href="#v:-60--63--62-">(&lt;?&gt;)</a> :: <a href="Data-Attoparsec-Internal-Types.html#t:Parser">Parser</a> i a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> -&gt; <a href="Data-Attoparsec-Internal-Types.html#t:Parser">Parser</a> i a</li><li class="src short"><a href="#v:choice">choice</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; [f a] -&gt; f a</li><li class="src short"><a href="#v:count">count</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; m a -&gt; m [a]</li><li class="src short"><a href="#v:option">option</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; a -&gt; f a -&gt; f a</li><li class="src short"><a href="#v:many-39-">many'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> m =&gt; m a -&gt; m [a]</li><li class="src short"><a href="#v:many1">many1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; f a -&gt; f [a]</li><li class="src short"><a href="#v:many1-39-">many1'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> m =&gt; m a -&gt; m [a]</li><li class="src short"><a href="#v:manyTill">manyTill</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; f a -&gt; f b -&gt; f [a]</li><li class="src short"><a href="#v:manyTill-39-">manyTill'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> m =&gt; m a -&gt; m b -&gt; m [a]</li><li class="src short"><a href="#v:sepBy">sepBy</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; f a -&gt; f s -&gt; f [a]</li><li class="src short"><a href="#v:sepBy-39-">sepBy'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> m =&gt; m a -&gt; m s -&gt; m [a]</li><li class="src short"><a href="#v:sepBy1">sepBy1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; f a -&gt; f s -&gt; f [a]</li><li class="src short"><a href="#v:sepBy1-39-">sepBy1'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> m =&gt; m a -&gt; m s -&gt; m [a]</li><li class="src short"><a href="#v:skipMany">skipMany</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; f a -&gt; f ()</li><li class="src short"><a href="#v:skipMany1">skipMany1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; f a -&gt; f ()</li><li class="src short"><a href="#v:eitherP">eitherP</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; f a -&gt; f b -&gt; f (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Either.html#t:Either">Either</a> a b)</li><li class="src short"><a href="#v:match">match</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a>, a)</li><li class="src short"><a href="#v:endOfInput">endOfInput</a> :: <span class="keyword">forall</span> t. <a href="Data-Attoparsec-Internal-Types.html#t:Chunk">Chunk</a> t =&gt; <a href="Data-Attoparsec-Internal-Types.html#t:Parser">Parser</a> t ()</li><li class="src short"><a href="#v:atEnd">atEnd</a> :: <a href="Data-Attoparsec-Internal-Types.html#t:Chunk">Chunk</a> t =&gt; <a href="Data-Attoparsec-Internal-Types.html#t:Parser">Parser</a> t <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li></ul></div><div id="interface"><h1 id="g:1">Character encodings</h1><div class="doc"><p>This module is intended for parsing text that is
 represented using an 8-bit character set, e.g. ASCII or
 ISO-8859-15.  It <em>does not</em> make any attempt to deal with character
 encodings, multibyte characters, or wide characters.  In
 particular, all attempts to use characters above code point U+00FF
 will give wrong answers.</p><p>Code points below U+0100 are simply translated to and from their
 numeric values, so e.g. the code point U+00A4 becomes the byte
 <code>0xA4</code> (which is the Euro symbol in ISO-8859-15, but the generic
 currency sign in ISO-8859-1).  Haskell <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a></code> values above U+00FF
 are truncated, so e.g. U+1D6B7 is truncated to the byte <code>0xB7</code>.</p></div><h1 id="g:2">Parser types</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Parser" class="def">Parser</a> = <a href="Data-Attoparsec-Internal-Types.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/Data-Attoparsec-ByteString-Internal.html#Parser" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:Result" class="def">Result</a> = <a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/Data-Attoparsec-ByteString-Internal.html#Result" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:IResult" class="def">IResult</a> i r <a href="src/Data-Attoparsec-Internal-Types.html#IResult" class="link">Source</a></p><div class="doc"><p>The result of a parse.  This is parameterised over the type <code>i</code>
 of string that was processed.</p><p>This type is an instance of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a></code>, where <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#v:fmap">fmap</a></code> transforms the
 value in a <code><a href="Data-Attoparsec-ByteString-Char8.html#v:Done">Done</a></code> result.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Fail" class="def">Fail</a> i [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a>] <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a></td><td class="doc"><p>The parse failed.  The <code>i</code> parameter is the input that had
 not yet been consumed when the failure occurred.  The
 <code>[</code><code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.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="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.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:Partial" class="def">Partial</a> (i -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a> i r)</td><td class="doc"><p>Supply this continuation with more input so that the parser
 can resume.  To indicate that no more input is available, pass
 an empty string to the continuation.</p><p><strong>Note</strong>: if you get a <code><a href="Data-Attoparsec-ByteString-Char8.html#v:Partial">Partial</a></code> result, do not call its
 continuation more than once.</p></td></tr><tr><td class="src"><a name="v:Done" class="def">Done</a> i r</td><td class="doc"><p>The parse succeeded.  The <code>i</code> parameter 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:IResult" class="caption collapser" onclick="toggleSection('i:IResult')">Instances</p><div id="section.i:IResult" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Functor.html#t:Functor">Functor</a> (<a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a> i)</span> <a href="src/Data-Attoparsec-Internal-Types.html#line-87" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> i, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> r) =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> (<a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a> i r)</span> <a href="src/Data-Attoparsec-Internal-Types.html#line-72" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left">(<a href="file:///usr/share/doc/ghc-doc/html/libraries/deepseq-1.4.1.1/Control-DeepSeq.html#t:NFData">NFData</a> i, <a href="file:///usr/share/doc/ghc-doc/html/libraries/deepseq-1.4.1.1/Control-DeepSeq.html#t:NFData">NFData</a> r) =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/deepseq-1.4.1.1/Control-DeepSeq.html#t:NFData">NFData</a> (<a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a> i r)</span> <a href="src/Data-Attoparsec-Internal-Types.html#line-81" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:compareResults" class="def">compareResults</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> i, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> r) =&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a> i r -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a> i r -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Attoparsec-Internal.html#compareResults" class="link">Source</a></p><div class="doc"><p>Compare two <code><a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a></code> values for equality.</p><p>If both <code><a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a></code>s are <code><a href="Data-Attoparsec-ByteString-Char8.html#v:Partial">Partial</a></code>, the result will be <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#v:Nothing">Nothing</a></code>, as
 they are incomplete and hence their equality cannot be known.
 (This is why there is no <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a></code> instance for <code><a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a></code>.)</p></div></div><h1 id="g:3">Running parsers</h1><div class="top"><p class="src"><a name="v:parse" class="def">parse</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Result">Result</a> a <a href="src/Data-Attoparsec-ByteString-Internal.html#parse" class="link">Source</a></p><div class="doc"><p>Run a parser.</p></div></div><div class="top"><p class="src"><a name="v:feed" class="def">feed</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Monoid.html#t:Monoid">Monoid</a> i =&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a> i r -&gt; i -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:IResult">IResult</a> i r <a href="src/Data-Attoparsec-Combinator.html#feed" class="link">Source</a></p><div class="doc"><p>If a parser has returned a <code><a href="T.html#v:Partial">Partial</a></code> result, supply it with more
 input.</p></div></div><div class="top"><p class="src"><a name="v:parseOnly" class="def">parseOnly</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> a <a href="src/Data-Attoparsec-ByteString-Internal.html#parseOnly" class="link">Source</a></p><div class="doc"><p>Run a parser that cannot be resupplied via a <code><a href="Data-Attoparsec-ByteString-Char8.html#v:Partial">Partial</a></code> result.</p><p>This function does not force a parser to consume all of its input.
 Instead, any residual input will be discarded.  To force a parser
 to consume all of its input, use something like this:</p><pre><code><a href="Data-Attoparsec-ByteString-Char8.html#v:parseOnly">parseOnly</a></code> (myParser <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#v:-60--42-">&lt;*</a></code> <code><a href="Data-Attoparsec-ByteString-Char8.html#v:endOfInput">endOfInput</a></code>)
 </pre></div></div><div class="top"><p class="src"><a name="v:parseWith" class="def">parseWith</a> <a href="src/Data-Attoparsec-ByteString.html#parseWith" class="link">Source</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.8.2.0/Control-Monad.html#t:Monad">Monad</a> m</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; m <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc"><p>An action that will be executed to provide the parser
 with more input, if necessary.  The action must return an
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#v:empty">empty</a></code> string when there is no more input available.</p></td></tr><tr><td class="src">-&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></td><td class="doc"><p>Initial input for the parser.</p></td></tr><tr><td class="src">-&gt; m (<a href="Data-Attoparsec-ByteString-Char8.html#t:Result">Result</a> a)</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Run a parser with an initial input string, and a monadic action
 that can supply more input if needed.</p></div></div><div class="top"><p class="src"><a name="v:parseTest" class="def">parseTest</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> a =&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Data-Attoparsec-ByteString.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:4">Result conversion</h2><div class="top"><p class="src"><a name="v:maybeResult" class="def">maybeResult</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Result">Result</a> r -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> r <a href="src/Data-Attoparsec-ByteString.html#maybeResult" class="link">Source</a></p><div class="doc"><p>Convert a <code><a href="Data-Attoparsec-ByteString-Char8.html#t:Result">Result</a></code> value to a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a></code> value. A <code><a href="Data-Attoparsec-ByteString-Char8.html#v:Partial">Partial</a></code> result
 is treated as failure.</p></div></div><div class="top"><p class="src"><a name="v:eitherResult" class="def">eitherResult</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Result">Result</a> r -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Either.html#t:Either">Either</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> r <a href="src/Data-Attoparsec-ByteString.html#eitherResult" class="link">Source</a></p><div class="doc"><p>Convert a <code><a href="Data-Attoparsec-ByteString-Char8.html#t:Result">Result</a></code> value to an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Either.html#t:Either">Either</a></code> value. A <code><a href="Data-Attoparsec-ByteString-Char8.html#v:Partial">Partial</a></code>
 result is treated as failure.</p></div></div><h1 id="g:5">Parsing individual characters</h1><div class="top"><p class="src"><a name="v:char" class="def">char</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#char" class="link">Source</a></p><div class="doc"><p>Match a specific character.</p></div></div><div class="top"><p class="src"><a name="v:char8" class="def">char8</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word8">Word8</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#char8" class="link">Source</a></p><div class="doc"><p>Match a specific character, but return its <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word8">Word8</a></code> value.</p></div></div><div class="top"><p class="src"><a name="v:anyChar" class="def">anyChar</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#anyChar" class="link">Source</a></p><div class="doc"><p>Match any character.</p></div></div><div class="top"><p class="src"><a name="v:notChar" class="def">notChar</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#notChar" class="link">Source</a></p><div class="doc"><p>Match any character except the given one.</p></div></div><div class="top"><p class="src"><a name="v:satisfy" class="def">satisfy</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#satisfy" class="link">Source</a></p><div class="doc"><p>The parser <code>satisfy p</code> succeeds for any byte for which the
 predicate <code>p</code> returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:True">True</a></code>. Returns the byte that is actually
 parsed.</p><pre>digit = satisfy isDigit
    where isDigit c = c &gt;= '0' &amp;&amp; c &lt;= '9'</pre></div></div><h2 id="g:6">Lookahead</h2><div class="top"><p class="src"><a name="v:peekChar" class="def">peekChar</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a>) <a href="src/Data-Attoparsec-ByteString-Char8.html#peekChar" class="link">Source</a></p><div class="doc"><p>Match any character, to perform lookahead. Returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#v:Nothing">Nothing</a></code> if
 end of input has been reached. Does not consume any input.</p><p><em>Note</em>: Because this parser does not fail, do not use it with
 combinators such as <code>many</code>, because such parsers loop until a
 failure occurs.  Careless use will thus result in an infinite loop.</p></div></div><div class="top"><p class="src"><a name="v:peekChar-39-" class="def">peekChar'</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#peekChar%27" class="link">Source</a></p><div class="doc"><p>Match any character, to perform lookahead.  Does not consume any
 input, but will fail if end of input has been reached.</p></div></div><h2 id="g:7">Special character parsers</h2><div class="top"><p class="src"><a name="v:digit" class="def">digit</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#digit" class="link">Source</a></p><div class="doc"><p>Parse a single digit.</p></div></div><div class="top"><p class="src"><a name="v:letter_iso8859_15" class="def">letter_iso8859_15</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#letter_iso8859_15" class="link">Source</a></p><div class="doc"><p>Match a letter, in the ISO-8859-15 encoding.</p></div></div><div class="top"><p class="src"><a name="v:letter_ascii" class="def">letter_ascii</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#letter_ascii" class="link">Source</a></p><div class="doc"><p>Match a letter, in the ASCII encoding.</p></div></div><div class="top"><p class="src"><a name="v:space" class="def">space</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#space" class="link">Source</a></p><div class="doc"><p>Parse a space character.</p><p><em>Note</em>: This parser only gives correct answers for the ASCII
 encoding.  For instance, it does not recognise U+00A0 (non-breaking
 space) as a space character, even though it is a valid ISO-8859-15
 byte.</p></div></div><h2 id="g:8">Fast predicates</h2><div class="top"><p class="src"><a name="v:isDigit" class="def">isDigit</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#isDigit" class="link">Source</a></p><div class="doc"><p>A fast digit predicate.</p></div></div><div class="top"><p class="src"><a name="v:isDigit_w8" class="def">isDigit_w8</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word8">Word8</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#isDigit_w8" class="link">Source</a></p><div class="doc"><p>A fast digit predicate.</p></div></div><div class="top"><p class="src"><a name="v:isAlpha_iso8859_15" class="def">isAlpha_iso8859_15</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#isAlpha_iso8859_15" class="link">Source</a></p><div class="doc"><p>A fast alphabetic predicate for the ISO-8859-15 encoding</p><p><em>Note</em>: For all character encodings other than ISO-8859-15, and
 almost all Unicode code points above U+00A3, this predicate gives
 <em>wrong answers</em>.</p></div></div><div class="top"><p class="src"><a name="v:isAlpha_ascii" class="def">isAlpha_ascii</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#isAlpha_ascii" class="link">Source</a></p><div class="doc"><p>A fast alphabetic predicate for the ASCII encoding</p><p><em>Note</em>: For all character encodings other than ASCII, and
 almost all Unicode code points above U+007F, this predicate gives
 <em>wrong answers</em>.</p></div></div><div class="top"><p class="src"><a name="v:isSpace" class="def">isSpace</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#isSpace" class="link">Source</a></p><div class="doc"><p>Fast predicate for matching ASCII space characters.</p><p><em>Note</em>: This predicate only gives correct answers for the ASCII
 encoding.  For instance, it does not recognise U+00A0 (non-breaking
 space) as a space character, even though it is a valid ISO-8859-15
 byte. For a Unicode-aware and only slightly slower predicate,
 use <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#v:isSpace">isSpace</a></code></p></div></div><div class="top"><p class="src"><a name="v:isSpace_w8" class="def">isSpace_w8</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word8">Word8</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#isSpace_w8" class="link">Source</a></p><div class="doc"><p>Fast <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word8">Word8</a></code> predicate for matching ASCII space characters.</p></div></div><h3 id="g:9">Character classes</h3><div class="top"><p class="src"><a name="v:inClass" class="def">inClass</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#inClass" class="link">Source</a></p><div class="doc"><p>Match any character in a set.</p><pre>vowel = inClass &quot;aeiou&quot;</pre><p>Range notation is supported.</p><pre>halfAlphabet = inClass &quot;a-nA-N&quot;</pre><p>To add a literal '-' to a set, place it at the beginning or end
 of the string.</p></div></div><div class="top"><p class="src"><a name="v:notInClass" class="def">notInClass</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#notInClass" class="link">Source</a></p><div class="doc"><p>Match any character not in a set.</p></div></div><h1 id="g:10">Efficient string handling</h1><div class="top"><p class="src"><a name="v:string" class="def">string</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/Data-Attoparsec-ByteString-Internal.html#string" class="link">Source</a></p><div class="doc"><p><code>string s</code> parses a sequence of bytes that identically match
 <code>s</code>. Returns the parsed string (i.e. <code>s</code>).  This parser consumes no
 input if it fails (even if a partial match).</p><p><em>Note</em>: The behaviour of this parser is different to that of the
 similarly-named parser in Parsec, as this one is all-or-nothing.
 To illustrate the difference, the following parser will fail under
 Parsec given an input of <code>&quot;for&quot;</code>:</p><pre>string &quot;foo&quot; &lt;|&gt; string &quot;for&quot;</pre><p>The reason for its failure is that the first branch is a
 partial match, and will consume the letters <code>'f'</code> and <code>'o'</code>
 before failing.  In attoparsec, the above parser will <em>succeed</em> on
 that input, because the failed first branch will consume nothing.</p></div></div><div class="top"><p class="src"><a name="v:stringCI" class="def">stringCI</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/Data-Attoparsec-ByteString-Internal.html#stringCI" class="link">Source</a></p><div class="doc"><p>Satisfy a literal string, ignoring case.</p></div></div><div class="top"><p class="src"><a name="v:skipSpace" class="def">skipSpace</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> () <a href="src/Data-Attoparsec-ByteString-Char8.html#skipSpace" class="link">Source</a></p><div class="doc"><p>Skip over white space.</p></div></div><div class="top"><p class="src"><a name="v:skipWhile" class="def">skipWhile</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> () <a href="src/Data-Attoparsec-ByteString-Char8.html#skipWhile" class="link">Source</a></p><div class="doc"><p>Skip past input for as long as the predicate returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:True">True</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:take" class="def">take</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/Data-Attoparsec-ByteString-Internal.html#take" class="link">Source</a></p><div class="doc"><p>Consume exactly <code>n</code> bytes of input.</p></div></div><div class="top"><p class="src"><a name="v:scan" class="def">scan</a> :: s -&gt; (s -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> s) -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#scan" class="link">Source</a></p><div class="doc"><p>A stateful scanner.  The predicate consumes and transforms a
 state argument, and each transformed state is passed to successive
 invocations of the predicate on each byte of the input until one
 returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#v:Nothing">Nothing</a></code> or the input ends.</p><p>This parser does not fail.  It will return an empty string if the
 predicate returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#v:Nothing">Nothing</a></code> on the first byte of input.</p><p><em>Note</em>: Because this parser does not fail, do not use it with
 combinators such as <code>many</code>, because such parsers loop until a
 failure occurs.  Careless use will thus result in an infinite loop.</p></div></div><div class="top"><p class="src"><a name="v:takeWhile" class="def">takeWhile</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#takeWhile" class="link">Source</a></p><div class="doc"><p>Consume input as long as the predicate returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:True">True</a></code>, and return
 the consumed input.</p><p>This parser does not fail.  It will return an empty string if the
 predicate returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:False">False</a></code> on the first byte of input.</p><p><em>Note</em>: Because this parser does not fail, do not use it with
 combinators such as <code>many</code>, because such parsers loop until a
 failure occurs.  Careless use will thus result in an infinite loop.</p></div></div><div class="top"><p class="src"><a name="v:takeWhile1" class="def">takeWhile1</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#takeWhile1" class="link">Source</a></p><div class="doc"><p>Consume input as long as the predicate returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:True">True</a></code>, and return
 the consumed input.</p><p>This parser requires the predicate to succeed on at least one byte
 of input: it will fail if the predicate never returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:True">True</a></code> or if
 there is no input left.</p></div></div><div class="top"><p class="src"><a name="v:takeTill" class="def">takeTill</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#takeTill" class="link">Source</a></p><div class="doc"><p>Consume input as long as the predicate returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:False">False</a></code>
 (i.e. until it returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:True">True</a></code>), and return the consumed input.</p><p>This parser does not fail.  It will return an empty string if the
 predicate returns <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:True">True</a></code> on the first byte of input.</p><p><em>Note</em>: Because this parser does not fail, do not use it with
 combinators such as <code>many</code>, because such parsers loop until a
 failure occurs.  Careless use will thus result in an infinite loop.</p></div></div><h2 id="g:11">String combinators</h2><div class="doc"><p>If you enable the <code>OverloadedStrings</code> language extension, you can
 use the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#v:-42--62-">*&gt;</a></code> and <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#v:-60--42-">&lt;*</a></code> combinators to simplify the common task of
 matching a statically known string, then immediately parsing
 something else.</p><p>Instead of writing something like this:</p><pre><code><a href="Data-Attoparsec-ByteString-Char8.html#v:string">string</a></code> &quot;foo&quot; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#v:-42--62-">*&gt;</a></code> wibble
 </pre><p>Using <code>OverloadedStrings</code>, you can omit the explicit use of
 <code><a href="Data-Attoparsec-ByteString-Char8.html#v:string">string</a></code>, and write a more compact version:</p><pre>&quot;foo&quot; <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#v:-42--62-">*&gt;</a></code> wibble
</pre><p>(Note: the <code><a href="Data-Attoparsec-ByteString-Char8.html#v:.-42--62-">.*&gt;</a></code> and <code><a href="Data-Attoparsec-ByteString-Char8.html#v:-60--42-.">&lt;*.</a></code> combinators that were originally
 provided for this purpose are obsolete and unnecessary, and will be
 removed in the next major version.)</p></div><div class="top"><p class="src"><a name="v:.-42--62-" class="def">(.*&gt;)</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a <a href="src/Data-Attoparsec-ByteString-Char8.html#.%2A%3E" class="link">Source</a></p><div class="doc"><div class="warning"><p>Deprecated: This is no longer necessary, and will be removed. Use <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#v:-42--62-">*&gt;</a></code> instead.</p></div><p><em>Obsolete</em>. A type-specialized version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#v:-42--62-">*&gt;</a></code> for
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></code>. Use <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#v:-42--62-">*&gt;</a></code> instead.</p></div></div><div class="top"><p class="src"><a name="v:-60--42-." class="def">(&lt;*.)</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a <a href="src/Data-Attoparsec-ByteString-Char8.html#%3C%2A." class="link">Source</a></p><div class="doc"><div class="warning"><p>Deprecated: This is no longer necessary, and will be removed. Use <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#v:-60--42-">&lt;*</a></code> instead.</p></div><p><em>Obsolete</em>. A type-specialized version of <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#v:-60--42-">&lt;*</a></code> for
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></code>. Use <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#v:-60--42-">&lt;*</a></code> instead.</p></div></div><h2 id="g:12">Consume all remaining input</h2><div class="top"><p class="src"><a name="v:takeByteString" class="def">takeByteString</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/Data-Attoparsec-ByteString-Internal.html#takeByteString" class="link">Source</a></p><div class="doc"><p>Consume all remaining input and return it as a single string.</p></div></div><div class="top"><p class="src"><a name="v:takeLazyByteString" class="def">takeLazyByteString</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString-Lazy.html#t:ByteString">ByteString</a> <a href="src/Data-Attoparsec-ByteString-Internal.html#takeLazyByteString" class="link">Source</a></p><div class="doc"><p>Consume all remaining input and return it as a single string.</p></div></div><h1 id="g:13">Text parsing</h1><div class="top"><p class="src"><a name="v:endOfLine" class="def">endOfLine</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> () <a href="src/Data-Attoparsec-ByteString-Internal.html#endOfLine" class="link">Source</a></p><div class="doc"><p>Match either a single newline character <code>'\n'</code>, or a carriage
 return followed by a newline character <code>&quot;\r\n&quot;</code>.</p></div></div><div class="top"><p class="src"><a name="v:isEndOfLine" class="def">isEndOfLine</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word8">Word8</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#isEndOfLine" class="link">Source</a></p><div class="doc"><p>A predicate that matches either a carriage return <code>'\r'</code> or
 newline <code>'\n'</code> character.</p></div></div><div class="top"><p class="src"><a name="v:isHorizontalSpace" class="def">isHorizontalSpace</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Word.html#t:Word8">Word8</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#isHorizontalSpace" class="link">Source</a></p><div class="doc"><p>A predicate that matches either a space <code>' '</code> or horizontal tab
 <code>'\t'</code> character.</p></div></div><h1 id="g:14">Numeric parsers</h1><div class="top"><p class="src"><a name="v:decimal" class="def">decimal</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integral">Integral</a> a =&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a <a href="src/Data-Attoparsec-ByteString-Char8.html#decimal" class="link">Source</a></p><div class="doc"><p>Parse and decode an unsigned decimal number.</p></div></div><div class="top"><p class="src"><a name="v:hexadecimal" class="def">hexadecimal</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integral">Integral</a> a, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bits.html#t:Bits">Bits</a> a) =&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a <a href="src/Data-Attoparsec-ByteString-Char8.html#hexadecimal" class="link">Source</a></p><div class="doc"><p>Parse and decode an unsigned hexadecimal number.  The hex digits
 <code>'a'</code> through <code>'f'</code> may be upper or lower case.</p><p>This parser does not accept a leading <code>&quot;0x&quot;</code> string.</p></div></div><div class="top"><p class="src"><a name="v:signed" class="def">signed</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> a =&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a <a href="src/Data-Attoparsec-ByteString-Char8.html#signed" class="link">Source</a></p><div class="doc"><p>Parse a number with an optional leading <code>'+'</code> or <code>'-'</code> sign
 character.</p></div></div><div class="top"><p class="src"><a name="v:double" class="def">double</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#double" class="link">Source</a></p><div class="doc"><p>Parse a rational number.</p><p>This parser accepts an optional leading sign character, followed by
 at least one decimal digit.  The syntax similar to that accepted by
 the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#v:read">read</a></code> function, with the exception that a trailing <code>'.'</code> or
 <code>'e'</code> <em>not</em> followed by a number is not consumed.</p><p>Examples with behaviour identical to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#v:read">read</a></code>, if you feed an empty
 continuation to the first result:</p><pre>rational &quot;3&quot;     == Done 3.0 &quot;&quot;
rational &quot;3.1&quot;   == Done 3.1 &quot;&quot;
rational &quot;3e4&quot;   == Done 30000.0 &quot;&quot;
rational &quot;3.1e4&quot; == Done 31000.0, &quot;&quot;</pre><p>Examples with behaviour identical to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#v:read">read</a></code>:</p><pre>rational &quot;.3&quot;    == Fail &quot;input does not start with a digit&quot;
rational &quot;e3&quot;    == Fail &quot;input does not start with a digit&quot;</pre><p>Examples of differences from <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#v:read">read</a></code>:</p><pre>rational &quot;3.foo&quot; == Done 3.0 &quot;.foo&quot;
rational &quot;3e&quot;    == Done 3.0 &quot;e&quot;</pre><p>This function does not accept string representations of &quot;NaN&quot; or
 &quot;Infinity&quot;.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Number" class="def">Number</a> <a href="src/Data-Attoparsec-Number.html#Number" class="link">Source</a></p><div class="doc"><p>A numeric type that can represent integers accurately, and
 floating point numbers to the precision of a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a></code>.</p><p><em>Note</em>: this type is deprecated, and will be removed in the next
 major release.  Use the <code><a href="file:///usr/share/doc/libghc-scientific-doc/html/Data-Scientific.html#v:Scientific">Scientific</a></code> type instead.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:I" class="def">I</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:D" class="def">D</a> !<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Double">Double</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Number" class="caption collapser" onclick="toggleSection('i:Number')">Instances</p><div id="section.i:Number" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> <a href="Data-Attoparsec-ByteString-Char8.html#t:Number">Number</a></span> <a href="src/Data-Attoparsec-Number.html#line-56" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Fractional">Fractional</a> <a href="Data-Attoparsec-ByteString-Char8.html#t:Number">Number</a></span> <a href="src/Data-Attoparsec-Number.html#line-109" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Data.html#t:Data">Data</a> <a href="Data-Attoparsec-ByteString-Char8.html#t:Number">Number</a></span> <a href="src/Data-Attoparsec-Number.html#line-36" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Num">Num</a> <a href="Data-Attoparsec-ByteString-Char8.html#t:Number">Number</a></span> <a href="src/Data-Attoparsec-Number.html#line-79" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> <a href="Data-Attoparsec-ByteString-Char8.html#t:Number">Number</a></span> <a href="src/Data-Attoparsec-Number.html#line-63" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Real">Real</a> <a href="Data-Attoparsec-ByteString-Char8.html#t:Number">Number</a></span> <a href="src/Data-Attoparsec-Number.html#line-104" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:RealFrac">RealFrac</a> <a href="Data-Attoparsec-ByteString-Char8.html#t:Number">Number</a></span> <a href="src/Data-Attoparsec-Number.html#line-121" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="Data-Attoparsec-ByteString-Char8.html#t:Number">Number</a></span> <a href="src/Data-Attoparsec-Number.html#line-39" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/deepseq-1.4.1.1/Control-DeepSeq.html#t:NFData">NFData</a> <a href="Data-Attoparsec-ByteString-Char8.html#t:Number">Number</a></span> <a href="src/Data-Attoparsec-Number.html#line-43" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:number" class="def">number</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="Data-Attoparsec-ByteString-Char8.html#t:Number">Number</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#number" class="link">Source</a></p><div class="doc"><div class="warning"><p>Deprecated: Use <code><a href="Data-Attoparsec-ByteString-Char8.html#v:scientific">scientific</a></code> instead.</p></div><p>Parse a number, attempting to preserve both speed and precision.</p><p>The syntax accepted by this parser is the same as for <code><a href="Data-Attoparsec-ByteString-Char8.html#v:double">double</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:rational" class="def">rational</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Fractional">Fractional</a> a =&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a <a href="src/Data-Attoparsec-ByteString-Char8.html#rational" class="link">Source</a></p><div class="doc"><p>Parse a rational number.</p><p>The syntax accepted by this parser is the same as for <code><a href="Data-Attoparsec-ByteString-Char8.html#v:double">double</a></code>.</p><p><em>Note</em>: this parser is not safe for use with inputs from untrusted
 sources.  An input with a suitably large exponent such as
 <code>&quot;1e1000000000&quot;</code> will cause a huge <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a></code> to be allocated,
 resulting in what is effectively a denial-of-service attack.</p><p>In most cases, it is better to use <code><a href="Data-Attoparsec-ByteString-Char8.html#v:double">double</a></code> or <code><a href="Data-Attoparsec-ByteString-Char8.html#v:scientific">scientific</a></code>
 instead.</p></div></div><div class="top"><p class="src"><a name="v:scientific" class="def">scientific</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> <a href="file:///usr/share/doc/libghc-scientific-doc/html/Data-Scientific.html#t:Scientific">Scientific</a> <a href="src/Data-Attoparsec-ByteString-Char8.html#scientific" class="link">Source</a></p><div class="doc"><p>Parse a scientific number.</p><p>The syntax accepted by this parser is the same as for <code><a href="Data-Attoparsec-ByteString-Char8.html#v:double">double</a></code>.</p></div></div><h1 id="g:15">Combinators</h1><div class="top"><p class="src"><a name="v:try" class="def">try</a> :: <a href="Data-Attoparsec-Internal-Types.html#t:Parser">Parser</a> i a -&gt; <a href="Data-Attoparsec-Internal-Types.html#t:Parser">Parser</a> i a <a href="src/Data-Attoparsec-Combinator.html#try" class="link">Source</a></p><div class="doc"><p>Attempt a parse, and if it fails, rewind the input so that no
 input appears to have been consumed.</p><p>This combinator is provided for compatibility with Parsec.
 attoparsec parsers always backtrack on failure.</p></div></div><div class="top"><p class="src"><a name="v:-60--63--62-" class="def">(&lt;?&gt;)</a> <span class="fixity">infix 0</span><span class="rightedge"></span> <a href="src/Data-Attoparsec-Combinator.html#%3C%3F%3E" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Attoparsec-Internal-Types.html#t:Parser">Parser</a> i a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a></td><td class="doc"><p>the name to use if parsing fails</p></td></tr><tr><td class="src">-&gt; <a href="Data-Attoparsec-Internal-Types.html#t:Parser">Parser</a> i a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Name the parser, in case failure occurs.</p></div></div><div class="top"><p class="src"><a name="v:choice" class="def">choice</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; [f a] -&gt; f a <a href="src/Data-Attoparsec-Combinator.html#choice" class="link">Source</a></p><div class="doc"><p><code>choice ps</code> tries to apply the actions in the list <code>ps</code> in order,
 until one of them succeeds. Returns the value of the succeeding
 action.</p></div></div><div class="top"><p class="src"><a name="v:count" class="def">count</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> -&gt; m a -&gt; m [a] <a href="src/Data-Attoparsec-Combinator.html#count" class="link">Source</a></p><div class="doc"><p>Apply the given action repeatedly, returning every result.</p></div></div><div class="top"><p class="src"><a name="v:option" class="def">option</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; a -&gt; f a -&gt; f a <a href="src/Data-Attoparsec-Combinator.html#option" class="link">Source</a></p><div class="doc"><p><code>option x p</code> tries to apply action <code>p</code>. If <code>p</code> fails without
 consuming input, it returns the value <code>x</code>, otherwise the value
 returned by <code>p</code>.</p><pre>priority  = option 0 (digitToInt &lt;$&gt; digit)</pre></div></div><div class="top"><p class="src"><a name="v:many-39-" class="def">many'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> m =&gt; m a -&gt; m [a] <a href="src/Data-Attoparsec-Combinator.html#many%27" class="link">Source</a></p><div class="doc"><p><code>many' p</code> applies the action <code>p</code> <em>zero</em> or more times. Returns a
 list of the returned values of <code>p</code>. The value returned by <code>p</code> is
 forced to WHNF.</p><pre> word  = many' letter</pre></div></div><div class="top"><p class="src"><a name="v:many1" class="def">many1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; f a -&gt; f [a] <a href="src/Data-Attoparsec-Combinator.html#many1" class="link">Source</a></p><div class="doc"><p><code>many1 p</code> applies the action <code>p</code> <em>one</em> or more times. Returns a
 list of the returned values of <code>p</code>.</p><pre> word  = many1 letter</pre></div></div><div class="top"><p class="src"><a name="v:many1-39-" class="def">many1'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> m =&gt; m a -&gt; m [a] <a href="src/Data-Attoparsec-Combinator.html#many1%27" class="link">Source</a></p><div class="doc"><p><code>many1' p</code> applies the action <code>p</code> <em>one</em> or more times. Returns a
 list of the returned values of <code>p</code>. The value returned by <code>p</code> is
 forced to WHNF.</p><pre> word  = many1' letter</pre></div></div><div class="top"><p class="src"><a name="v:manyTill" class="def">manyTill</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; f a -&gt; f b -&gt; f [a] <a href="src/Data-Attoparsec-Combinator.html#manyTill" class="link">Source</a></p><div class="doc"><p><code>manyTill p end</code> applies action <code>p</code> <em>zero</em> or more times until
 action <code>end</code> succeeds, and returns the list of values returned by
 <code>p</code>.  This can be used to scan comments:</p><pre> simpleComment   = string &quot;&lt;!--&quot; *&gt; manyTill anyChar (string &quot;--&gt;&quot;)</pre><p>(Note the overlapping parsers <code>anyChar</code> and <code>string &quot;--&gt;&quot;</code>.
 While this will work, it is not very efficient, as it will cause a
 lot of backtracking.)</p></div></div><div class="top"><p class="src"><a name="v:manyTill-39-" class="def">manyTill'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> m =&gt; m a -&gt; m b -&gt; m [a] <a href="src/Data-Attoparsec-Combinator.html#manyTill%27" class="link">Source</a></p><div class="doc"><p><code>manyTill' p end</code> applies action <code>p</code> <em>zero</em> or more times until
 action <code>end</code> succeeds, and returns the list of values returned by
 <code>p</code>.  This can be used to scan comments:</p><pre> simpleComment   = string &quot;&lt;!--&quot; *&gt; manyTill' anyChar (string &quot;--&gt;&quot;)</pre><p>(Note the overlapping parsers <code>anyChar</code> and <code>string &quot;--&gt;&quot;</code>.
 While this will work, it is not very efficient, as it will cause a
 lot of backtracking.)</p><p>The value returned by <code>p</code> is forced to WHNF.</p></div></div><div class="top"><p class="src"><a name="v:sepBy" class="def">sepBy</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; f a -&gt; f s -&gt; f [a] <a href="src/Data-Attoparsec-Combinator.html#sepBy" class="link">Source</a></p><div class="doc"><p><code>sepBy p sep</code> applies <em>zero</em> or more occurrences of <code>p</code>, separated
 by <code>sep</code>. Returns a list of the values returned by <code>p</code>.</p><pre>commaSep p  = p `sepBy` (char ',')</pre></div></div><div class="top"><p class="src"><a name="v:sepBy-39-" class="def">sepBy'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> m =&gt; m a -&gt; m s -&gt; m [a] <a href="src/Data-Attoparsec-Combinator.html#sepBy%27" class="link">Source</a></p><div class="doc"><p><code>sepBy' p sep</code> applies <em>zero</em> or more occurrences of <code>p</code>, separated
 by <code>sep</code>. Returns a list of the values returned by <code>p</code>. The value
 returned by <code>p</code> is forced to WHNF.</p><pre>commaSep p  = p `sepBy'` (char ',')</pre></div></div><div class="top"><p class="src"><a name="v:sepBy1" class="def">sepBy1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; f a -&gt; f s -&gt; f [a] <a href="src/Data-Attoparsec-Combinator.html#sepBy1" class="link">Source</a></p><div class="doc"><p><code>sepBy1 p sep</code> applies <em>one</em> or more occurrences of <code>p</code>, separated
 by <code>sep</code>. Returns a list of the values returned by <code>p</code>.</p><pre>commaSep p  = p `sepBy1` (char ',')</pre></div></div><div class="top"><p class="src"><a name="v:sepBy1-39-" class="def">sepBy1'</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Monad.html#t:MonadPlus">MonadPlus</a> m =&gt; m a -&gt; m s -&gt; m [a] <a href="src/Data-Attoparsec-Combinator.html#sepBy1%27" class="link">Source</a></p><div class="doc"><p><code>sepBy1' p sep</code> applies <em>one</em> or more occurrences of <code>p</code>, separated
 by <code>sep</code>. Returns a list of the values returned by <code>p</code>. The value
 returned by <code>p</code> is forced to WHNF.</p><pre>commaSep p  = p `sepBy1'` (char ',')</pre></div></div><div class="top"><p class="src"><a name="v:skipMany" class="def">skipMany</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; f a -&gt; f () <a href="src/Data-Attoparsec-Combinator.html#skipMany" class="link">Source</a></p><div class="doc"><p>Skip zero or more instances of an action.</p></div></div><div class="top"><p class="src"><a name="v:skipMany1" class="def">skipMany1</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; f a -&gt; f () <a href="src/Data-Attoparsec-Combinator.html#skipMany1" class="link">Source</a></p><div class="doc"><p>Skip one or more instances of an action.</p></div></div><div class="top"><p class="src"><a name="v:eitherP" class="def">eitherP</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Control-Applicative.html#t:Alternative">Alternative</a> f =&gt; f a -&gt; f b -&gt; f (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Either.html#t:Either">Either</a> a b) <a href="src/Data-Attoparsec-Combinator.html#eitherP" class="link">Source</a></p><div class="doc"><p>Combine two alternatives.</p></div></div><div class="top"><p class="src"><a name="v:match" class="def">match</a> :: <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> a -&gt; <a href="Data-Attoparsec-ByteString-Char8.html#t:Parser">Parser</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a>, a) <a href="src/Data-Attoparsec-ByteString-Internal.html#match" class="link">Source</a></p><div class="doc"><p>Return both the result of a parse and the portion of the input
 that was consumed while it was being parsed.</p></div></div><h1 id="g:16">State observation and manipulation functions</h1><div class="top"><p class="src"><a name="v:endOfInput" class="def">endOfInput</a> :: <span class="keyword">forall</span> t. <a href="Data-Attoparsec-Internal-Types.html#t:Chunk">Chunk</a> t =&gt; <a href="Data-Attoparsec-Internal-Types.html#t:Parser">Parser</a> t () <a href="src/Data-Attoparsec-Internal.html#endOfInput" class="link">Source</a></p><div class="doc"><p>Match only if all input has been consumed.</p></div></div><div class="top"><p class="src"><a name="v:atEnd" class="def">atEnd</a> :: <a href="Data-Attoparsec-Internal-Types.html#t:Chunk">Chunk</a> t =&gt; <a href="Data-Attoparsec-Internal-Types.html#t:Parser">Parser</a> t <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Data-Attoparsec-Internal.html#atEnd" class="link">Source</a></p><div class="doc"><p>Return an indication of whether the end of input has been
 reached.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>