This file is indexed.

/usr/share/doc/libghc-polyparse-doc/html/Text-ParserCombinators-Poly-StateLazy.html is in libghc-polyparse-doc 1.12-3build2.

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
<!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.ParserCombinators.Poly.StateLazy</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Text-ParserCombinators-Poly-StateLazy.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text-ParserCombinators-Poly-StateLazy.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.12: 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>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Text.ParserCombinators.Poly.StateLazy</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">The Parser datatype</a><ul><li><a href="#g:2">Basic parsers</a></li><li><a href="#g:3">State-handling</a></li><li><a href="#g:4">Re-parsing</a></li></ul></li><li><a href="#g:5">Re-export all more general combinators</a></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">newtype</span> <a href="#t:Parser">Parser</a> s t a = <a href="#v:P">P</a> (<a href="Text-ParserCombinators-Poly-StateParser.html#t:Parser">Parser</a> s t a)</li><li class="src short"><span class="keyword">data</span> <a href="#t:Result">Result</a> z a<ul class="subs"><li>= <a href="#v:Success">Success</a> z a</li><li>| <a href="#v:Failure">Failure</a> z <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li>| <a href="#v:Committed">Committed</a> (<a href="Text-ParserCombinators-Poly-StateLazy.html#t:Result">Result</a> z a)</li></ul></li><li class="src short"><a href="#v:runParser">runParser</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; s -&gt; [t] -&gt; (a, s, [t])</li><li class="src short"><a href="#v:next">next</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t t</li><li class="src short"><a href="#v:eof">eof</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t ()</li><li class="src short"><a href="#v:satisfy">satisfy</a> :: (t -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t t</li><li class="src short"><a href="#v:onFail">onFail</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a</li><li class="src short"><a href="#v:manyFinally">manyFinally</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t z -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t [a]</li><li class="src short"><a href="#v:stUpdate">stUpdate</a> :: (s -&gt; s) -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t ()</li><li class="src short"><a href="#v:stQuery">stQuery</a> :: (s -&gt; a) -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a</li><li class="src short"><a href="#v:stGet">stGet</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t s</li><li class="src short"><a href="#v:reparse">reparse</a> :: [t] -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t ()</li><li class="src short">module <a href="Text-ParserCombinators-Poly-Base.html">Text.ParserCombinators.Poly.Base</a></li><li class="src short">module <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html">Control.Applicative</a></li></ul></div><div id="interface"><h1 id="g:1">The Parser datatype</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a id="t:Parser" class="def">Parser</a> s t a <a href="src/Text-ParserCombinators-Poly-StateLazy.html#Parser" class="link">Source</a> <a href="#t:Parser" class="selflink">#</a></p><div class="doc"><p>The only differences between a State and a StateLazy parser are the
   instance of Applicative, and the type (and implementation) of runParser.
   We therefore need to <em>newtype</em> the original Parser type, to allow it
   to have a different instance.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:P" class="def">P</a> (<a href="Text-ParserCombinators-Poly-StateParser.html#t:Parser">Parser</a> s t a)</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Parser" class="caption collapser" onclick="toggleSection('i:Parser')">Instances</p><div id="section.i:Parser" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Parser:Monad:1" class="instance expander" onclick="toggleSection('i:id:Parser:Monad:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Monad.html#t:Monad">Monad</a> (<a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t)</span> <a href="src/Text-ParserCombinators-Poly-StateLazy.html#line-45" class="link">Source</a> <a href="#t:Parser" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Parser:Monad:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-62--62--61-">(&gt;&gt;=)</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; (a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t b) -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t b <a href="#v:-62--62--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62--62-">(&gt;&gt;)</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t b -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t b <a href="#v:-62--62-" class="selflink">#</a></p><p class="src"><a href="#v:return">return</a> :: a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a <a href="#v:return" class="selflink">#</a></p><p class="src"><a href="#v:fail">fail</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a <a href="#v:fail" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Parser:Functor:2" class="instance expander" onclick="toggleSection('i:id:Parser:Functor:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> (<a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t)</span> <a href="src/Text-ParserCombinators-Poly-StateLazy.html#line-45" class="link">Source</a> <a href="#t:Parser" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Parser:Functor:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fmap">fmap</a> :: (a -&gt; b) -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(&lt;$)</a> :: a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t b -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a <a href="#v:-60--36-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Parser:Applicative:3" class="instance expander" onclick="toggleSection('i:id:Parser:Applicative:3')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Applicative">Applicative</a> (<a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t)</span> <a href="src/Text-ParserCombinators-Poly-StateLazy.html#line-68" class="link">Source</a> <a href="#t:Parser" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Parser:Applicative:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:pure">pure</a> :: a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a <a href="#v:pure" class="selflink">#</a></p><p class="src"><a href="#v:-60--42--62-">(&lt;*&gt;)</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t (a -&gt; b) -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t b <a href="#v:-60--42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-42--62-">(*&gt;)</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t b -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t b <a href="#v:-42--62-" class="selflink">#</a></p><p class="src"><a href="#v:-60--42-">(&lt;*)</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t b -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a <a href="#v:-60--42-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Parser:Alternative:4" class="instance expander" onclick="toggleSection('i:id:Parser:Alternative:4')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html#t:Alternative">Alternative</a> (<a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t)</span> <a href="src/Text-ParserCombinators-Poly-StateLazy.html#line-84" class="link">Source</a> <a href="#t:Parser" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Parser:Alternative:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:empty">empty</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a <a href="#v:empty" class="selflink">#</a></p><p class="src"><a href="#v:-60--124--62-">(&lt;|&gt;)</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a <a href="#v:-60--124--62-" class="selflink">#</a></p><p class="src"><a href="#v:some">some</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t [a] <a href="#v:some" class="selflink">#</a></p><p class="src"><a href="#v:many">many</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t [a] <a href="#v:many" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Parser:PolyParse:5" class="instance expander" onclick="toggleSection('i:id:Parser:PolyParse:5')"></span> <a href="Text-ParserCombinators-Poly-Base.html#t:PolyParse">PolyParse</a> (<a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t)</span> <a href="src/Text-ParserCombinators-Poly-StateLazy.html#line-88" class="link">Source</a> <a href="#t:Parser" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Parser:PolyParse:5" class="inst-details hide"></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Parser:Commitment:6" class="instance expander" onclick="toggleSection('i:id:Parser:Commitment:6')"></span> <a href="Text-ParserCombinators-Poly-Base.html#t:Commitment">Commitment</a> (<a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t)</span> <a href="src/Text-ParserCombinators-Poly-StateLazy.html#line-45" class="link">Source</a> <a href="#t:Parser" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Parser:Commitment:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:commit">commit</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a <a href="src/Text-ParserCombinators-Poly-Base.html#commit" class="link">Source</a> <a href="#v:commit" class="selflink">#</a></p><p class="src"><a href="#v:adjustErr">adjustErr</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>) -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a <a href="src/Text-ParserCombinators-Poly-Base.html#adjustErr" class="link">Source</a> <a href="#v:adjustErr" class="selflink">#</a></p><p class="src"><a href="#v:oneOf-39-">oneOf'</a> :: [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>, <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a)] -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a <a href="src/Text-ParserCombinators-Poly-Base.html#oneOf%27" class="link">Source</a> <a href="#v:oneOf-39-" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Result" class="def">Result</a> z a <a href="src/Text-ParserCombinators-Poly-Result.html#Result" class="link">Source</a> <a href="#t:Result" class="selflink">#</a></p><div class="doc"><p>A return type like Either, that distinguishes not only between
   right and wrong answers, but also has commitment, so that a failure
   cannot be undone.  This should only be used for writing very primitive
   parsers - really it is an internal detail of the library.
   The z type is the remaining unconsumed input.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Success" class="def">Success</a> z a</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:Failure" class="def">Failure</a> z <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:Committed" class="def">Committed</a> (<a href="Text-ParserCombinators-Poly-StateLazy.html#t:Result">Result</a> z a)</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Result" class="caption collapser" onclick="toggleSection('i:Result')">Instances</p><div id="section.i:Result" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Result:Functor:1" class="instance expander" onclick="toggleSection('i:id:Result:Functor:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Functor.html#t:Functor">Functor</a> (<a href="Text-ParserCombinators-Poly-StateLazy.html#t:Result">Result</a> z)</span> <a href="src/Text-ParserCombinators-Poly-Result.html#line-17" class="link">Source</a> <a href="#t:Result" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Result:Functor:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:fmap">fmap</a> :: (a -&gt; b) -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Result">Result</a> z a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Result">Result</a> z b <a href="#v:fmap" class="selflink">#</a></p><p class="src"><a href="#v:-60--36-">(&lt;$)</a> :: a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Result">Result</a> z b -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Result">Result</a> z a <a href="#v:-60--36-" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:runParser" class="def">runParser</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; s -&gt; [t] -&gt; (a, s, [t]) <a href="src/Text-ParserCombinators-Poly-StateLazy.html#runParser" class="link">Source</a> <a href="#v:runParser" class="selflink">#</a></p><div class="doc"><p>Apply a parser to an input token sequence.</p></div></div><h2 id="g:2">Basic parsers</h2><div class="top"><p class="src"><a id="v:next" class="def">next</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t t <a href="src/Text-ParserCombinators-Poly-StateLazy.html#next" class="link">Source</a> <a href="#v:next" class="selflink">#</a></p><div class="doc"><p>Simply return the next token in the input tokenstream.</p></div></div><div class="top"><p class="src"><a id="v:eof" class="def">eof</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t () <a href="src/Text-ParserCombinators-Poly-StateLazy.html#eof" class="link">Source</a> <a href="#v:eof" class="selflink">#</a></p><div class="doc"><p>Succeed if the end of file/input has been reached, fail otherwise.</p></div></div><div class="top"><p class="src"><a id="v:satisfy" class="def">satisfy</a> :: (t -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>) -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t t <a href="src/Text-ParserCombinators-Poly-StateLazy.html#satisfy" class="link">Source</a> <a href="#v:satisfy" class="selflink">#</a></p><div class="doc"><p>Return the next token if it satisfies the given predicate.</p></div></div><div class="top"><p class="src"><a id="v:onFail" class="def">onFail</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a <a href="src/Text-ParserCombinators-Poly-StateLazy.html#onFail" class="link">Source</a> <a href="#v:onFail" class="selflink">#</a></p><div class="doc"><p><code>p <code><a href="Text-ParserCombinators-Poly-StateLazy.html#v:onFail">onFail</a></code> q</code> means parse p, unless p fails, in which case
   parse q instead.
   Can be chained together to give multiple attempts to parse something.
   (Note that q could itself be a failing parser, e.g. to change the error
   message from that defined in p to something different.)
   However, a severe failure in p cannot be ignored.</p></div></div><div class="top"><p class="src"><a id="v:manyFinally" class="def">manyFinally</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t z -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t [a] <a href="src/Text-ParserCombinators-Poly-StateLazy.html#manyFinally" class="link">Source</a> <a href="#v:manyFinally" class="selflink">#</a></p></div><h2 id="g:3">State-handling</h2><div class="top"><p class="src"><a id="v:stUpdate" class="def">stUpdate</a> :: (s -&gt; s) -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t () <a href="src/Text-ParserCombinators-Poly-StateLazy.html#stUpdate" class="link">Source</a> <a href="#v:stUpdate" class="selflink">#</a></p><div class="doc"><p>Update the internal state.</p></div></div><div class="top"><p class="src"><a id="v:stQuery" class="def">stQuery</a> :: (s -&gt; a) -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t a <a href="src/Text-ParserCombinators-Poly-StateLazy.html#stQuery" class="link">Source</a> <a href="#v:stQuery" class="selflink">#</a></p><div class="doc"><p>Query the internal state.</p></div></div><div class="top"><p class="src"><a id="v:stGet" class="def">stGet</a> :: <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t s <a href="src/Text-ParserCombinators-Poly-StateLazy.html#stGet" class="link">Source</a> <a href="#v:stGet" class="selflink">#</a></p><div class="doc"><p>Deliver the entire internal state.</p></div></div><h2 id="g:4">Re-parsing</h2><div class="top"><p class="src"><a id="v:reparse" class="def">reparse</a> :: [t] -&gt; <a href="Text-ParserCombinators-Poly-StateLazy.html#t:Parser">Parser</a> s t () <a href="src/Text-ParserCombinators-Poly-StateLazy.html#reparse" class="link">Source</a> <a href="#v:reparse" class="selflink">#</a></p><div class="doc"><p>Push some tokens back onto the front of the input stream and reparse.
   This is useful e.g. for recursively expanding macros.  When the
   user-parser recognises a macro use, it can lookup the macro
   expansion from the parse state, lex it, and then stuff the
   lexed expansion back down into the parser.</p></div></div><h1 id="g:5">Re-export all more general combinators</h1><div class="top"><p class="src">module <a href="Text-ParserCombinators-Poly-Base.html">Text.ParserCombinators.Poly.Base</a></p></div><div class="top"><p class="src">module <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Control-Applicative.html">Control.Applicative</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>