This file is indexed.

/usr/share/doc/libghc-boomerang-doc/html/Text-Boomerang-Texts.html is in libghc-boomerang-doc 1.4.5.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
<!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.Boomerang.Texts</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Text-Boomerang-Texts.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text-Boomerang-Texts.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">boomerang-1.4.5.1: Library for invertible parsing and printing</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.Boomerang.Texts</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Types</a></li><li><a href="#g:2">Combinators</a></li><li><a href="#g:3">Running the <code>Boomerang</code></a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>a <code><a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a></code> library for working with '[Text]'</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:TextsError">TextsError</a> = <a href="Text-Boomerang-Error.html#t:ParserError">ParserError</a> <a href="Text-Boomerang-Pos.html#t:MajorMinorPos">MajorMinorPos</a></li><li class="src short"><a href="#v:-60--47--62-">(&lt;/&gt;)</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] b c -&gt; <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] a b -&gt; <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] a c</li><li class="src short"><a href="#v:alpha">alpha</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)</li><li class="src short"><a href="#v:anyChar">anyChar</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)</li><li class="src short"><a href="#v:anyText">anyText</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</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="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)</li><li class="src short"><a href="#v:digit">digit</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)</li><li class="src short"><a href="#v:digits">digits</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)</li><li class="src short"><a href="#v:signed">signed</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] a (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) -&gt; <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] a (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)</li><li class="src short"><a href="#v:eos">eos</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r r</li><li class="src short"><a href="#v:integral">integral</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/Text-Show.html#t:Show">Show</a> a) =&gt; <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (a <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)</li><li class="src short"><a href="#v:int">int</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)</li><li class="src short"><a href="#v:integer">integer</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)</li><li class="src short"><a href="#v:lit">lit</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r r</li><li class="src short"><a href="#v:readshow">readshow</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#t:Read">Read</a> 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="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (a <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)</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="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)</li><li class="src short"><a href="#v:satisfyStr">satisfyStr</a> :: (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</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="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)</li><li class="src short"><a href="#v:space">space</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)</li><li class="src short"><a href="#v:rTextCons">rTextCons</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> e tok (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)) (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)</li><li class="src short"><a href="#v:rEmpty">rEmpty</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> e [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)</li><li class="src short"><a href="#v:rText">rText</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> e [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) -&gt; <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> e [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)</li><li class="src short"><a href="#v:rText1">rText1</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> e [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) -&gt; <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> e [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)</li><li class="src short"><a href="#v:isComplete">isComplete</a> :: [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</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:parseTexts">parseTexts</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] () (r <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> ()) -&gt; [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</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="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> r</li><li class="src short"><a href="#v:unparseTexts">unparseTexts</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> e [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] () (r <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> ()) -&gt; 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/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>]</li></ul></div><div id="interface"><h1 id="g:1">Types</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:TextsError" class="def">TextsError</a> = <a href="Text-Boomerang-Error.html#t:ParserError">ParserError</a> <a href="Text-Boomerang-Pos.html#t:MajorMinorPos">MajorMinorPos</a> <a href="src/Text-Boomerang-Texts.html#TextsError" class="link">Source</a></p></div><h1 id="g:2">Combinators</h1><div class="top"><p class="src"><a name="v:-60--47--62-" class="def">(&lt;/&gt;)</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] b c -&gt; <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] a b -&gt; <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] a c <span class="fixity">infixr 9</span><span class="rightedge"></span> <a href="src/Text-Boomerang-Texts.html#%3C%2F%3E" class="link">Source</a></p><div class="doc"><p>equivalent to <code>f . eos . g</code></p></div></div><div class="top"><p class="src"><a name="v:alpha" class="def">alpha</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#alpha" class="link">Source</a></p><div class="doc"><p>matches alphabetic Unicode characters (lower-case, upper-case and title-case letters,
 plus letters of caseless scripts and modifiers letters).  (Uses <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#v:isAlpha">isAlpha</a></code>)</p></div></div><div class="top"><p class="src"><a name="v:anyChar" class="def">anyChar</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#anyChar" class="link">Source</a></p><div class="doc"><p>any character</p></div></div><div class="top"><p class="src"><a name="v:anyText" class="def">anyText</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#anyText" class="link">Source</a></p><div class="doc"><p>matches any <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></code></p><p>the parser returns the remainder of the current Text segment, (but does not consume the 'end of segment'.</p><p>Note that the only combinator that should follow <code><a href="Text-Boomerang-Texts.html#v:anyText">anyText</a></code> is
 <code><a href="Text-Boomerang-Texts.html#v:eos">eos</a></code> or <code><a href="Text-Boomerang-Texts.html#v:-60--47--62-">&lt;/&gt;</a></code>. Other combinators will lead to inconsistent
 inversions.</p><p>For example, if we have:</p><pre>unparseTexts (rPair . anyText . anyText)  (&quot;foo&quot;,&quot;bar&quot;)</pre><p>That will unparse to <code>Just [&quot;foobar&quot;]</code>. But if we call</p><pre>parseTexts (rPair . anyText . anyText)  [&quot;foobar&quot;]</pre><p>We will get <code>Right (&quot;foobar&quot;,&quot;&quot;)</code> instead of the original <code>Right (&quot;foo&quot;,&quot;bar&quot;)</code></p></div></div><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="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#char" class="link">Source</a></p><div class="doc"><p>matches the specified character</p></div></div><div class="top"><p class="src"><a name="v:digit" class="def">digit</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#digit" class="link">Source</a></p><div class="doc"><p>ascii digits <code>'0'..'9'</code></p></div></div><div class="top"><p class="src"><a name="v:digits" class="def">digits</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#digits" class="link">Source</a></p><div class="doc"><p>a sequence of one or more digits</p></div></div><div class="top"><p class="src"><a name="v:signed" class="def">signed</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] a (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) -&gt; <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] a (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#signed" class="link">Source</a></p><div class="doc"><p>an optional - character</p><p>Typically used with <code><a href="Text-Boomerang-Texts.html#v:digits">digits</a></code> to support signed numbers</p><pre>signed digits</pre></div></div><div class="top"><p class="src"><a name="v:eos" class="def">eos</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r r <a href="src/Text-Boomerang-Texts.html#eos" class="link">Source</a></p><div class="doc"><p>end of string</p></div></div><div class="top"><p class="src"><a name="v:integral" class="def">integral</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/Text-Show.html#t:Show">Show</a> a) =&gt; <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (a <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#integral" class="link">Source</a></p><div class="doc"><p>matches an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integral">Integral</a></code> value</p><p>Note that the combinator <code>(rPair . integral . integral)</code> is ill-defined because the parse canwell. not tell where it is supposed to split the sequence of digits to produced two ints.</p></div></div><div class="top"><p class="src"><a name="v:int" class="def">int</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#int" class="link">Source</a></p><div class="doc"><p>matches an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></code>
 Note that the combinator <code>(rPair . int . int)</code> is ill-defined because the parse canwell. not tell where it is supposed to split the sequence of digits to produced two ints.</p></div></div><div class="top"><p class="src"><a name="v:integer" class="def">integer</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#integer" class="link">Source</a></p><div class="doc"><p>matches an <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a></code></p><p>Note that the combinator <code>(rPair . integer . integer)</code> is ill-defined because the parse can not tell where it is supposed to split the sequence of digits to produced two ints.</p></div></div><div class="top"><p class="src"><a name="v:lit" class="def">lit</a> :: <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r r <a href="src/Text-Boomerang-Texts.html#lit" class="link">Source</a></p><div class="doc"><p>a constant string</p></div></div><div class="top"><p class="src"><a name="v:readshow" class="def">readshow</a> :: (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#t:Read">Read</a> 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="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (a <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#readshow" class="link">Source</a></p><div class="doc"><p>lift 'Read'/'Show' to a <code><a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a></code></p><p>There are a few restrictions here:</p><ol><li>Error messages are a bit fuzzy. <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#t:Read">Read</a></code> does not tell us where
  or why a parse failed. So all we can do it use the the position
  that we were at when we called read and say that it failed.</li><li>it is (currently) not safe to use <code><a href="Text-Boomerang-Texts.html#v:readshow">readshow</a></code> on integral values
  because the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Read.html#t:Read">Read</a></code> instance for <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Int.html#t:Int">Int</a></code>, <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Integer">Integer</a></code>, etc,</li></ol></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="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#satisfy" class="link">Source</a></p><div class="doc"><p>statisfy a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a></code> predicate</p></div></div><div class="top"><p class="src"><a name="v:satisfyStr" class="def">satisfyStr</a> :: (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</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="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#satisfyStr" class="link">Source</a></p><div class="doc"><p>satisfy a <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></code> predicate.</p><p>Note: must match the entire remainder of the <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></code> in this segment</p></div></div><div class="top"><p class="src"><a name="v:space" class="def">space</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#space" class="link">Source</a></p><div class="doc"><p>matches white-space characters in the Latin-1 range. (Uses <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:rTextCons" class="def">rTextCons</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> e tok (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r)) (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#rTextCons" class="link">Source</a></p><div class="doc"><p>the first character of a <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></code></p></div></div><div class="top"><p class="src"><a name="v:rEmpty" class="def">rEmpty</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> e [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#rEmpty" class="link">Source</a></p><div class="doc"><p>the empty string</p></div></div><div class="top"><p class="src"><a name="v:rText" class="def">rText</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> e [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) -&gt; <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> e [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#rText" class="link">Source</a></p><div class="doc"><p>construct/parse some <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></code> by repeatedly apply a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a></code> 0 or more times parser</p></div></div><div class="top"><p class="src"><a name="v:rText1" class="def">rText1</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> e [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) -&gt; <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> e [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] r (<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> r) <a href="src/Text-Boomerang-Texts.html#rText1" class="link">Source</a></p><div class="doc"><p>construct/parse some <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></code> by repeatedly apply a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Char.html#t:Char">Char</a></code> 1 or more times parser</p></div></div><h1 id="g:3">Running the <code><a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a></code></h1><div class="top"><p class="src"><a name="v:isComplete" class="def">isComplete</a> :: [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</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/Text-Boomerang-Texts.html#isComplete" class="link">Source</a></p><div class="doc"><p>Predicate to test if we have parsed all the Texts.
 Typically used as argument to <code><a href="Text-Boomerang-Prim.html#v:parse1">parse1</a></code></p><p>see also: <code><a href="Text-Boomerang-Texts.html#v:parseTexts">parseTexts</a></code></p></div></div><div class="top"><p class="src"><a name="v:parseTexts" class="def">parseTexts</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> <a href="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] () (r <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> ()) -&gt; [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</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="Text-Boomerang-Texts.html#t:TextsError">TextsError</a> r <a href="src/Text-Boomerang-Texts.html#parseTexts" class="link">Source</a></p><div class="doc"><p>run the parser</p><p>Returns the first complete parse or a parse error.</p><pre>parseTexts (rUnit . lit &quot;foo&quot;) [&quot;foo&quot;]</pre></div></div><div class="top"><p class="src"><a name="v:unparseTexts" class="def">unparseTexts</a> :: <a href="Text-Boomerang-Prim.html#t:Boomerang">Boomerang</a> e [<a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] () (r <a href="Text-Boomerang-HStack.html#t::-45-">:-</a> ()) -&gt; 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/libghc-text-doc/html/Data-Text.html#t:Text">Text</a>] <a href="src/Text-Boomerang-Texts.html#unparseTexts" class="link">Source</a></p><div class="doc"><p>run the printer</p><pre>unparseTexts (rUnit . lit &quot;foo&quot;) ()</pre></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>