This file is indexed.

/usr/share/doc/libghc-haskell-lexer-doc/html/Language-Haskell-Lexer.html is in libghc-haskell-lexer-doc 1.0-5.

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
<!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>Language.Haskell.Lexer</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_Language-Haskell-Lexer.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Language-Haskell-Lexer.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">haskell-lexer-1.0: A fully compliant Haskell 98 lexer.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe-Inferred</td></tr></table><p class="caption">Language.Haskell.Lexer</p></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:PosToken">PosToken</a> = (<a href="Language-Haskell-Lexer.html#t:Token">Token</a>, (<a href="Language-Haskell-Lexer.html#t:Pos">Pos</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a>))</li><li class="src short"><span class="keyword">data</span>  <a href="#t:Token">Token</a> <ul class="subs"><li>= <a href="#v:Varid">Varid</a>  </li><li>| <a href="#v:Conid">Conid</a>  </li><li>| <a href="#v:Varsym">Varsym</a>  </li><li>| <a href="#v:Consym">Consym</a>  </li><li>| <a href="#v:Reservedid">Reservedid</a>  </li><li>| <a href="#v:Reservedop">Reservedop</a>  </li><li>| <a href="#v:Specialid">Specialid</a>  </li><li>| <a href="#v:IntLit">IntLit</a>  </li><li>| <a href="#v:FloatLit">FloatLit</a>  </li><li>| <a href="#v:CharLit">CharLit</a>  </li><li>| <a href="#v:StringLit">StringLit</a>  </li><li>| <a href="#v:Qvarid">Qvarid</a>  </li><li>| <a href="#v:Qconid">Qconid</a>  </li><li>| <a href="#v:Qvarsym">Qvarsym</a>  </li><li>| <a href="#v:Qconsym">Qconsym</a>  </li><li>| <a href="#v:Special">Special</a>  </li><li>| <a href="#v:Whitespace">Whitespace</a>  </li><li>| <a href="#v:NestedCommentStart">NestedCommentStart</a>  </li><li>| <a href="#v:NestedComment">NestedComment</a>  </li><li>| <a href="#v:LiterateComment">LiterateComment</a>  </li><li>| <a href="#v:Commentstart">Commentstart</a>  </li><li>| <a href="#v:Comment">Comment</a>  </li><li>| <a href="#v:ErrorToken">ErrorToken</a>  </li><li>| <a href="#v:GotEOF">GotEOF</a>  </li><li>| <a href="#v:TheRest">TheRest</a>  </li><li>| <a href="#v:ModuleName">ModuleName</a>  </li><li>| <a href="#v:ModuleAlias">ModuleAlias</a>  </li><li>| <a href="#v:Layout">Layout</a>  </li><li>| <a href="#v:Indent">Indent</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>  </li><li>| <a href="#v:Open">Open</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>  </li></ul></li><li class="src short"><a href="#v:lexerPass0">lexerPass0</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; [<a href="Language-Haskell-Lexer.html#t:PosToken">PosToken</a>]</li><li class="src short"><a href="#v:lexerPass0-39-">lexerPass0'</a> :: <a href="Language-Haskell-Lexer.html#t:Pos">Pos</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; [<a href="Language-Haskell-Lexer.html#t:PosToken">PosToken</a>]</li><li class="src short"><a href="#v:lexerPass1">lexerPass1</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; [<a href="Language-Haskell-Lexer.html#t:PosToken">PosToken</a>]</li><li class="src short"><a href="#v:rmSpace">rmSpace</a> :: [<a href="Language-Haskell-Lexer.html#t:PosToken">PosToken</a>] -&gt; [<a href="Language-Haskell-Lexer.html#t:PosToken">PosToken</a>]</li><li class="src short"><a href="#v:layoutPre">layoutPre</a> :: [<a href="Language-Haskell-Lexer.html#t:PosToken">PosToken</a>] -&gt; [<a href="Language-Haskell-Lexer.html#t:PosToken">PosToken</a>]</li><li class="src short"><span class="keyword">data</span>  <a href="#t:Pos">Pos</a>  = <a href="#v:Pos">Pos</a> {<ul class="subs"><li><a href="#v:char">char</a> :: !<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></li><li><a href="#v:line">line</a> :: !<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></li><li><a href="#v:column">column</a> :: !<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></li></ul>}</li><li class="src short"><a href="#v:simpPos">simpPos</a> :: <a href="Language-Haskell-Lexer.html#t:Pos">Pos</a> -&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)</li><li class="src short"><a href="#v:startPos">startPos</a> :: <a href="Language-Haskell-Lexer.html#t:Pos">Pos</a></li><li class="src short"><a href="#v:nextPos">nextPos</a> :: <a href="Language-Haskell-Lexer.html#t:Pos">Pos</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; <a href="Language-Haskell-Lexer.html#t:Pos">Pos</a></li><li class="src short"><a href="#v:nextPos1">nextPos1</a> :: <a href="Language-Haskell-Lexer.html#t:Pos">Pos</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a> -&gt; <a href="Language-Haskell-Lexer.html#t:Pos">Pos</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:PosToken" class="def">PosToken</a> = (<a href="Language-Haskell-Lexer.html#t:Token">Token</a>, (<a href="Language-Haskell-Lexer.html#t:Pos">Pos</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a>))<a href="src/Language-Haskell-Lexer-Layout.html#PosToken" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Token" class="def">Token</a>  <a href="src/Language-Haskell-Lexer-Tokens.html#Token" class="link">Source</a></p><div class="doc"><p>Haskell token classifications:
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Varid" class="def">Varid</a></td><td class="doc"><p>Variable
</p></td></tr><tr><td class="src"><a name="v:Conid" class="def">Conid</a></td><td class="doc"><p>Constructor
</p></td></tr><tr><td class="src"><a name="v:Varsym" class="def">Varsym</a></td><td class="doc"><p>Variable operator
</p></td></tr><tr><td class="src"><a name="v:Consym" class="def">Consym</a></td><td class="doc"><p>Constructor operator
</p></td></tr><tr><td class="src"><a name="v:Reservedid" class="def">Reservedid</a></td><td class="doc"><p>Reserved keyword
</p></td></tr><tr><td class="src"><a name="v:Reservedop" class="def">Reservedop</a></td><td class="doc"><p>Reserved operator
</p></td></tr><tr><td class="src"><a name="v:Specialid" class="def">Specialid</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:IntLit" class="def">IntLit</a></td><td class="doc"><p>Integral numeric literal
</p></td></tr><tr><td class="src"><a name="v:FloatLit" class="def">FloatLit</a></td><td class="doc"><p>Fractional numeric literal
</p></td></tr><tr><td class="src"><a name="v:CharLit" class="def">CharLit</a></td><td class="doc"><p>Character literal
</p></td></tr><tr><td class="src"><a name="v:StringLit" class="def">StringLit</a></td><td class="doc"><p>String literal
</p></td></tr><tr><td class="src"><a name="v:Qvarid" class="def">Qvarid</a></td><td class="doc"><p>Qualified variable
</p></td></tr><tr><td class="src"><a name="v:Qconid" class="def">Qconid</a></td><td class="doc"><p>Qualified constructor
</p></td></tr><tr><td class="src"><a name="v:Qvarsym" class="def">Qvarsym</a></td><td class="doc"><p>Qualified variable operator
</p></td></tr><tr><td class="src"><a name="v:Qconsym" class="def">Qconsym</a></td><td class="doc"><p>Qualified constructor operator
</p></td></tr><tr><td class="src"><a name="v:Special" class="def">Special</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Whitespace" class="def">Whitespace</a></td><td class="doc"><p>White space
</p></td></tr><tr><td class="src"><a name="v:NestedCommentStart" class="def">NestedCommentStart</a></td><td class="doc"><p>Internal: causes a call to an external function
</p></td></tr><tr><td class="src"><a name="v:NestedComment" class="def">NestedComment</a></td><td class="doc"><p>A nested comment ({- ... -})
</p></td></tr><tr><td class="src"><a name="v:LiterateComment" class="def">LiterateComment</a></td><td class="doc"><p>Not handled by the lexer
</p></td></tr><tr><td class="src"><a name="v:Commentstart" class="def">Commentstart</a></td><td class="doc"><p>Dashes
</p></td></tr><tr><td class="src"><a name="v:Comment" class="def">Comment</a></td><td class="doc"><p>The stuff after the dashes
</p></td></tr><tr><td class="src"><a name="v:ErrorToken" class="def">ErrorToken</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:GotEOF" class="def">GotEOF</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:TheRest" class="def">TheRest</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:ModuleName" class="def">ModuleName</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:ModuleAlias" class="def">ModuleAlias</a></td><td class="doc"><p>recognized in a later pass
</p></td></tr><tr><td class="src"><a name="v:Layout" class="def">Layout</a></td><td class="doc"><p>for implicit braces
</p></td></tr><tr><td class="src"><a name="v:Indent" class="def">Indent</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>&lt;n&gt;, to preceed first token on each line
</p></td></tr><tr><td class="src"><a name="v:Open" class="def">Open</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>{n}, after let, where, do or of, if not followed by a &quot;{&quot;
</p></td></tr></table></div><div class="subs instances"><p id="control.i:Token" class="caption collapser" onclick="toggleSection('i:Token')">Instances</p><div id="section.i:Token" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Language-Haskell-Lexer.html#t:Token">Token</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> <a href="Language-Haskell-Lexer.html#t:Token">Token</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Language-Haskell-Lexer.html#t:Token">Token</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:lexerPass0" class="def">lexerPass0</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; [<a href="Language-Haskell-Lexer.html#t:PosToken">PosToken</a>]<a href="src/Language-Haskell-Lexer.html#lexerPass0" class="link">Source</a></p><div class="doc"><p>Tokenize and add position information.  Preserves white space,
 and does not insert extra tokens due to layout.
</p></div></div><div class="top"><p class="src"><a name="v:lexerPass0-39-" class="def">lexerPass0'</a> :: <a href="Language-Haskell-Lexer.html#t:Pos">Pos</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; [<a href="Language-Haskell-Lexer.html#t:PosToken">PosToken</a>]<a href="src/Language-Haskell-Lexer.html#lexerPass0%27" class="link">Source</a></p><div class="doc"><p>Same as <code><a href="Language-Haskell-Lexer.html#v:lexerPass0">lexerPass0</a></code>, except that it uses the given start position.
</p></div></div><div class="top"><p class="src"><a name="v:lexerPass1" class="def">lexerPass1</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; [<a href="Language-Haskell-Lexer.html#t:PosToken">PosToken</a>]<a href="src/Language-Haskell-Lexer.html#lexerPass1" class="link">Source</a></p><div class="doc"><p>The function <code><a href="Language-Haskell-Lexer.html#v:lexerPass1">lexerPass1</a></code> handles the part of lexical analysis that
 can be done independently of the parser---the tokenization and the
 addition of the extra layout tokens &lt;n&gt; and {n}, as specified in
 section 9.3 of the revised Haskell 98 Report.
</p></div></div><div class="top"><p class="src"><a name="v:rmSpace" class="def">rmSpace</a> :: [<a href="Language-Haskell-Lexer.html#t:PosToken">PosToken</a>] -&gt; [<a href="Language-Haskell-Lexer.html#t:PosToken">PosToken</a>]<a href="src/Language-Haskell-Lexer.html#rmSpace" class="link">Source</a></p><div class="doc"><p>Remove token that are not meaningful (e.g., white space and comments).
</p></div></div><div class="top"><p class="src"><a name="v:layoutPre" class="def">layoutPre</a> :: [<a href="Language-Haskell-Lexer.html#t:PosToken">PosToken</a>] -&gt; [<a href="Language-Haskell-Lexer.html#t:PosToken">PosToken</a>]<a href="src/Language-Haskell-Lexer-Layout.html#layoutPre" class="link">Source</a></p><div class="doc"><p>This is an implementation of Haskell layout, as specified in
 section 9.3 of the revised Haskell 98 report.
 This preprocessor inserts the extra &lt;n&gt; and {n} tokens.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Pos" class="def">Pos</a>  <a href="src/Language-Haskell-Lexer-Position.html#Pos" class="link">Source</a></p><div class="doc"><p>The posisiotn within a file.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Pos" class="def">Pos</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:char" class="def">char</a> :: !<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:line" class="def">line</a> :: !<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:column" class="def">column</a> :: !<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Pos" class="caption collapser" onclick="toggleSection('i:Pos')">Instances</p><div id="section.i:Pos" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Eq.html#t:Eq">Eq</a> <a href="Language-Haskell-Lexer.html#t:Pos">Pos</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Ord.html#t:Ord">Ord</a> <a href="Language-Haskell-Lexer.html#t:Pos">Pos</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Text-Show.html#t:Show">Show</a> <a href="Language-Haskell-Lexer.html#t:Pos">Pos</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:simpPos" class="def">simpPos</a> :: <a href="Language-Haskell-Lexer.html#t:Pos">Pos</a> -&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>, <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Int.html#t:Int">Int</a>)<a href="src/Language-Haskell-Lexer-Position.html#simpPos" class="link">Source</a></p><div class="doc"><p>The line and column numbers of a position.
</p></div></div><div class="top"><p class="src"><a name="v:startPos" class="def">startPos</a> :: <a href="Language-Haskell-Lexer.html#t:Pos">Pos</a><a href="src/Language-Haskell-Lexer-Position.html#startPos" class="link">Source</a></p><div class="doc"><p>The first column is designated column 1, not 0.
</p></div></div><div class="top"><p class="src"><a name="v:nextPos" class="def">nextPos</a> :: <a href="Language-Haskell-Lexer.html#t:Pos">Pos</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; <a href="Language-Haskell-Lexer.html#t:Pos">Pos</a><a href="src/Language-Haskell-Lexer-Position.html#nextPos" class="link">Source</a></p><div class="doc"><p>Advance position by a string.
</p></div></div><div class="top"><p class="src"><a name="v:nextPos1" class="def">nextPos1</a> :: <a href="Language-Haskell-Lexer.html#t:Pos">Pos</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a> -&gt; <a href="Language-Haskell-Lexer.html#t:Pos">Pos</a><a href="src/Language-Haskell-Lexer-Position.html#nextPos1" class="link">Source</a></p><div class="doc"><p>Advance position by a single character.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>