This file is indexed.

/usr/share/doc/libghc-src-exts-doc/html/Language-Haskell-Exts-Parser.html is in libghc-src-exts-doc 1.17.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
<!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.Exts.Parser</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-Exts-Parser.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Language-Haskell-Exts-Parser.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-src-exts-1.17.1: Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>(c) The GHC Team, 1997-2000
                (c) Niklas Broberg, 2004-2012</td></tr><tr><th>License</th><td>BSD-style (see the file LICENSE.txt)</td></tr><tr><th>Maintainer</th><td>Niklas Broberg, niklas.broberg@chalmers.se</td></tr><tr><th>Stability</th><td>stable</td></tr><tr><th>Portability</th><td>portable</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Language.Haskell.Exts.Parser</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">General parsing</a></li><li><a href="#g:2">Parsing of specific AST elements</a><ul><li><a href="#g:3">Modules</a></li><li><a href="#g:4">Expressions</a></li><li><a href="#g:5">Statements</a></li><li><a href="#g:6">Patterns</a></li><li><a href="#g:7">Declarations</a></li><li><a href="#g:8">Types</a></li><li><a href="#g:9">Import declarations</a></li></ul></li><li><a href="#g:10">Non-greedy parsers</a><ul><li><a href="#g:11">Module head parsers</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Parser for Haskell with extensions.</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">class</span> <a href="#t:Parseable">Parseable</a> ast <span class="keyword">where</span><ul class="subs"><li><a href="#v:parse">parse</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> ast</li><li><a href="#v:parseWithMode">parseWithMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> ast</li><li><a href="#v:parseWithComments">parseWithComments</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> (ast, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>])</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:ParseMode">ParseMode</a> = <a href="#v:ParseMode">ParseMode</a> {<ul class="subs"><li><a href="#v:parseFilename">parseFilename</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:baseLanguage">baseLanguage</a> :: <a href="Language-Haskell-Exts-Extension.html#t:Language">Language</a></li><li><a href="#v:extensions">extensions</a> :: [<a href="Language-Haskell-Exts-Extension.html#t:Extension">Extension</a>]</li><li><a href="#v:ignoreLanguagePragmas">ignoreLanguagePragmas</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><a href="#v:ignoreLinePragmas">ignoreLinePragmas</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><a href="#v:fixities">fixities</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="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a>]</li><li><a href="#v:ignoreFunctionArity">ignoreFunctionArity</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li></ul>}</li><li class="src short"><a href="#v:defaultParseMode">defaultParseMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:ParseResult">ParseResult</a> a<ul class="subs"><li>= <a href="#v:ParseOk">ParseOk</a> a</li><li>| <a href="#v:ParseFailed">ParseFailed</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcLoc">SrcLoc</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a></li></ul></li><li class="src short"><a href="#v:fromParseResult">fromParseResult</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> a -&gt; a</li><li class="src short"><a href="#v:parseModule">parseModule</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Module">Module</a></li><li class="src short"><a href="#v:parseModuleWithMode">parseModuleWithMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Module">Module</a></li><li class="src short"><a href="#v:parseModuleWithComments">parseModuleWithComments</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> (<a href="Language-Haskell-Exts-Syntax.html#t:Module">Module</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>])</li><li class="src short"><a href="#v:parseExp">parseExp</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Exp">Exp</a></li><li class="src short"><a href="#v:parseExpWithMode">parseExpWithMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Exp">Exp</a></li><li class="src short"><a href="#v:parseExpWithComments">parseExpWithComments</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> (<a href="Language-Haskell-Exts-Syntax.html#t:Exp">Exp</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>])</li><li class="src short"><a href="#v:parseStmt">parseStmt</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Stmt">Stmt</a></li><li class="src short"><a href="#v:parseStmtWithMode">parseStmtWithMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Stmt">Stmt</a></li><li class="src short"><a href="#v:parseStmtWithComments">parseStmtWithComments</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> (<a href="Language-Haskell-Exts-Syntax.html#t:Stmt">Stmt</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>])</li><li class="src short"><a href="#v:parsePat">parsePat</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Pat">Pat</a></li><li class="src short"><a href="#v:parsePatWithMode">parsePatWithMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Pat">Pat</a></li><li class="src short"><a href="#v:parsePatWithComments">parsePatWithComments</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> (<a href="Language-Haskell-Exts-Syntax.html#t:Pat">Pat</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>])</li><li class="src short"><a href="#v:parseDecl">parseDecl</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Decl">Decl</a></li><li class="src short"><a href="#v:parseDeclWithMode">parseDeclWithMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Decl">Decl</a></li><li class="src short"><a href="#v:parseDeclWithComments">parseDeclWithComments</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> (<a href="Language-Haskell-Exts-Syntax.html#t:Decl">Decl</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>])</li><li class="src short"><a href="#v:parseType">parseType</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Type">Type</a></li><li class="src short"><a href="#v:parseTypeWithMode">parseTypeWithMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Type">Type</a></li><li class="src short"><a href="#v:parseTypeWithComments">parseTypeWithComments</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> (<a href="Language-Haskell-Exts-Syntax.html#t:Type">Type</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>])</li><li class="src short"><a href="#v:parseImportDecl">parseImportDecl</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:ImportDecl">ImportDecl</a></li><li class="src short"><a href="#v:parseImportDeclWithMode">parseImportDeclWithMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:ImportDecl">ImportDecl</a></li><li class="src short"><a href="#v:parseImportDeclWithComments">parseImportDeclWithComments</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> (<a href="Language-Haskell-Exts-Syntax.html#t:ImportDecl">ImportDecl</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>])</li><li class="src short"><span class="keyword">newtype</span> <a href="#t:NonGreedy">NonGreedy</a> a = <a href="#v:NonGreedy">NonGreedy</a> {<ul class="subs"><li><a href="#v:unNonGreedy">unNonGreedy</a> :: a</li></ul>}</li><li class="src short"><a href="#v:getTopPragmas">getTopPragmas</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> [<a href="Language-Haskell-Exts-Syntax.html#t:ModulePragma">ModulePragma</a>]</li><li class="src short"><span class="keyword">data</span> <a href="#t:PragmasAndModuleName">PragmasAndModuleName</a> = <a href="#v:PragmasAndModuleName">PragmasAndModuleName</a> [<a href="Language-Haskell-Exts-Syntax.html#t:ModulePragma">ModulePragma</a>] <a href="Language-Haskell-Exts-Syntax.html#t:ModuleName">ModuleName</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:PragmasAndModuleHead">PragmasAndModuleHead</a> = <a href="#v:PragmasAndModuleHead">PragmasAndModuleHead</a> [<a href="Language-Haskell-Exts-Syntax.html#t:ModulePragma">ModulePragma</a>] (<a href="Language-Haskell-Exts-Syntax.html#t:ModuleName">ModuleName</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="Language-Haskell-Exts-Syntax.html#t:WarningText">WarningText</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="Language-Haskell-Exts-Syntax.html#t:ExportSpec">ExportSpec</a>])</li><li class="src short"><span class="keyword">data</span> <a href="#t:ModuleHeadAndImports">ModuleHeadAndImports</a> = <a href="#v:ModuleHeadAndImports">ModuleHeadAndImports</a> [<a href="Language-Haskell-Exts-Syntax.html#t:ModulePragma">ModulePragma</a>] (<a href="Language-Haskell-Exts-Syntax.html#t:ModuleName">ModuleName</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="Language-Haskell-Exts-Syntax.html#t:WarningText">WarningText</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="Language-Haskell-Exts-Syntax.html#t:ExportSpec">ExportSpec</a>]) [<a href="Language-Haskell-Exts-Syntax.html#t:ImportDecl">ImportDecl</a>]</li></ul></div><div id="interface"><h1 id="g:1">General parsing</h1><div class="top"><p class="src"><span class="keyword">class</span> <a name="t:Parseable" class="def">Parseable</a> ast <span class="keyword">where</span> <a href="src/Language-Haskell-Exts-ParseMonad.html#Parseable" class="link">Source</a></p><div class="doc"><p>Class providing function for parsing at many different types.</p><p>Note that for convenience of implementation, the default methods have
   definitions equivalent to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#v:undefined">undefined</a></code>.  The minimal definition is all of
   the visible methods.</p></div><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src">parser</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a name="v:parse" class="def">parse</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> ast <a href="src/Language-Haskell-Exts-ParseMonad.html#parse" class="link">Source</a></p><div class="doc"><p>Parse a string with default mode.</p></div><p class="src"><a name="v:parseWithMode" class="def">parseWithMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> ast <a href="src/Language-Haskell-Exts-ParseMonad.html#parseWithMode" class="link">Source</a></p><div class="doc"><p>Parse a string with an explicit <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code>.</p></div><p class="src"><a name="v:parseWithComments" class="def">parseWithComments</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> (ast, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>]) <a href="src/Language-Haskell-Exts-ParseMonad.html#parseWithComments" class="link">Source</a></p><div class="doc"><p>Parse a string with an explicit <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code>, returning all comments along
   with the AST.</p></div></div><div class="subs instances"><p id="control.i:Parseable" class="caption collapser" onclick="toggleSection('i:Parseable')">Instances</p><div id="section.i:Parseable" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> (<a href="Language-Haskell-Exts-Annotated-Parser.html#t:ListOf">ListOf</a> (<a href="Language-Haskell-Exts-Annotated-Syntax.html#t:ModulePragma">ModulePragma</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>)))</span> <a href="src/Language-Haskell-Exts-ParseMonad.html#line-161" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> (<a href="Language-Haskell-Exts-Annotated-Parser.html#t:ModuleHeadAndImports">ModuleHeadAndImports</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>))</span> <a href="src/Language-Haskell-Exts-ParseMonad.html#line-217" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> (<a href="Language-Haskell-Exts-Annotated-Parser.html#t:PragmasAndModuleHead">PragmasAndModuleHead</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>))</span> <a href="src/Language-Haskell-Exts-ParseMonad.html#line-196" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> (<a href="Language-Haskell-Exts-Annotated-Parser.html#t:PragmasAndModuleName">PragmasAndModuleName</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>))</span> <a href="src/Language-Haskell-Exts-ParseMonad.html#line-177" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> <a href="Language-Haskell-Exts-Parser.html#t:ModuleHeadAndImports">ModuleHeadAndImports</a>)</span> <a href="src/Language-Haskell-Exts-ParseMonad.html#line-226" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> <a href="Language-Haskell-Exts-Parser.html#t:PragmasAndModuleHead">PragmasAndModuleHead</a>)</span> <a href="src/Language-Haskell-Exts-ParseMonad.html#line-202" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> <a href="Language-Haskell-Exts-Parser.html#t:PragmasAndModuleName">PragmasAndModuleName</a>)</span> <a href="src/Language-Haskell-Exts-ParseMonad.html#line-180" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ParseMode" class="def">ParseMode</a> <a href="src/Language-Haskell-Exts-ParseMonad.html#ParseMode" class="link">Source</a></p><div class="doc"><p>Static parameters governing a parse.
   Note that the various parse functions in <a href="Language-Haskell-Exts-Parser.html">Language.Haskell.Exts.Parser</a>
   never look at LANGUAGE pragmas, regardless of
   what the <code>ignoreLanguagePragmas</code> flag is set to.
   Only the various <code>parseFile</code> functions in <a href="Language-Haskell-Exts.html">Language.Haskell.Exts</a> will
   act on it, when set to <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:False">False</a></code>.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ParseMode" class="def">ParseMode</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:parseFilename" class="def">parseFilename</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-String.html#t:String">String</a></dt><dd class="doc"><p>original name of the file being parsed</p></dd><dt class="src"><a name="v:baseLanguage" class="def">baseLanguage</a> :: <a href="Language-Haskell-Exts-Extension.html#t:Language">Language</a></dt><dd class="doc"><p>base language (e.g. Haskell98, Haskell2010)</p></dd><dt class="src"><a name="v:extensions" class="def">extensions</a> :: [<a href="Language-Haskell-Exts-Extension.html#t:Extension">Extension</a>]</dt><dd class="doc"><p>list of extensions enabled for parsing</p></dd><dt class="src"><a name="v:ignoreLanguagePragmas" class="def">ignoreLanguagePragmas</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc"><p>if <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:True">True</a></code>, the parser won't care about further extensions
   in LANGUAGE pragmas in source files</p></dd><dt class="src"><a name="v:ignoreLinePragmas" class="def">ignoreLinePragmas</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc"><p>if <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:True">True</a></code>, the parser won't read line position information
   from LINE pragmas in source files</p></dd><dt class="src"><a name="v:fixities" class="def">fixities</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="Language-Haskell-Exts-Fixity.html#t:Fixity">Fixity</a>]</dt><dd class="doc"><p>list of fixities to be aware of</p></dd><dt class="src"><a name="v:ignoreFunctionArity" class="def">ignoreFunctionArity</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></dt><dd class="doc"><p>Checks whether functions have a consistent arity</p></dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><a name="v:defaultParseMode" class="def">defaultParseMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a> <a href="src/Language-Haskell-Exts-ParseMonad.html#defaultParseMode" class="link">Source</a></p><div class="doc"><p>Default parameters for a parse.
   The default is an unknown filename,
   no extensions (i.e. Haskell 98),
   don't ignore LANGUAGE pragmas, do ignore LINE pragmas,
   and be aware of fixities from the <code>Prelude</code>.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ParseResult" class="def">ParseResult</a> a <a href="src/Language-Haskell-Exts-ParseMonad.html#ParseResult" class="link">Source</a></p><div class="doc"><p>The result of a parse.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ParseOk" class="def">ParseOk</a> a</td><td class="doc"><p>The parse succeeded, yielding a value.</p></td></tr><tr><td class="src"><a name="v:ParseFailed" class="def">ParseFailed</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcLoc">SrcLoc</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 at the specified
 source location, with an error message.</p></td></tr></table></div><div class="subs instances"><p id="control.i:ParseResult" class="caption collapser" onclick="toggleSection('i:ParseResult')">Instances</p><div id="section.i:ParseResult" 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/Control-Monad.html#t:Monad">Monad</a> <a href="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a></span> <a href="src/Language-Haskell-Exts-ParseMonad.html#line-92" 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-Functor.html#t:Functor">Functor</a> <a href="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a></span> <a href="src/Language-Haskell-Exts-ParseMonad.html#line-83" 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/Control-Applicative.html#t:Applicative">Applicative</a> <a href="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a></span> <a href="src/Language-Haskell-Exts-ParseMonad.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> a =&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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> a)</span> <a href="src/Language-Haskell-Exts-ParseMonad.html#line-74" 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-Monoid.html#t:Monoid">Monoid</a> m =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Monoid.html#t:Monoid">Monoid</a> (<a href="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> m)</span> <a href="src/Language-Haskell-Exts-ParseMonad.html#line-98" 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:fromParseResult" class="def">fromParseResult</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> a -&gt; a <a href="src/Language-Haskell-Exts-ParseMonad.html#fromParseResult" class="link">Source</a></p><div class="doc"><p>Retrieve the result of a successful parse, throwing an
   error if the parse is actually not successful.</p></div></div><h1 id="g:2">Parsing of specific AST elements</h1><h2 id="g:3">Modules</h2><div class="top"><p class="src"><a name="v:parseModule" class="def">parseModule</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Module">Module</a> <a href="src/Language-Haskell-Exts-Parser.html#parseModule" class="link">Source</a></p><div class="doc"><p>Parse of a string, which should contain a complete Haskell module, using <code><a href="Language-Haskell-Exts-Parser.html#v:defaultParseMode">defaultParseMode</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:parseModuleWithMode" class="def">parseModuleWithMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Module">Module</a> <a href="src/Language-Haskell-Exts-Parser.html#parseModuleWithMode" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a complete Haskell module, using an explicit <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:parseModuleWithComments" class="def">parseModuleWithComments</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> (<a href="Language-Haskell-Exts-Syntax.html#t:Module">Module</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>]) <a href="src/Language-Haskell-Exts-Parser.html#parseModuleWithComments" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a complete Haskell module, using an explicit <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code>, retaining comments.</p></div></div><h2 id="g:4">Expressions</h2><div class="top"><p class="src"><a name="v:parseExp" class="def">parseExp</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Exp">Exp</a> <a href="src/Language-Haskell-Exts-Parser.html#parseExp" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a Haskell expression, using <code><a href="Language-Haskell-Exts-Parser.html#v:defaultParseMode">defaultParseMode</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:parseExpWithMode" class="def">parseExpWithMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Exp">Exp</a> <a href="src/Language-Haskell-Exts-Parser.html#parseExpWithMode" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a Haskell expression, using an explicit <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:parseExpWithComments" class="def">parseExpWithComments</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> (<a href="Language-Haskell-Exts-Syntax.html#t:Exp">Exp</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>]) <a href="src/Language-Haskell-Exts-Parser.html#parseExpWithComments" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a complete Haskell module, using an explicit <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code>, retaining comments.</p></div></div><h2 id="g:5">Statements</h2><div class="top"><p class="src"><a name="v:parseStmt" class="def">parseStmt</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Stmt">Stmt</a> <a href="src/Language-Haskell-Exts-Parser.html#parseStmt" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a Haskell type, using <code><a href="Language-Haskell-Exts-Parser.html#v:defaultParseMode">defaultParseMode</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:parseStmtWithMode" class="def">parseStmtWithMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Stmt">Stmt</a> <a href="src/Language-Haskell-Exts-Parser.html#parseStmtWithMode" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a Haskell type, using an explicit <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:parseStmtWithComments" class="def">parseStmtWithComments</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> (<a href="Language-Haskell-Exts-Syntax.html#t:Stmt">Stmt</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>]) <a href="src/Language-Haskell-Exts-Parser.html#parseStmtWithComments" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a complete Haskell module, using an explicit <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code>, retaining comments.</p></div></div><h2 id="g:6">Patterns</h2><div class="top"><p class="src"><a name="v:parsePat" class="def">parsePat</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Pat">Pat</a> <a href="src/Language-Haskell-Exts-Parser.html#parsePat" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a Haskell pattern, using <code><a href="Language-Haskell-Exts-Parser.html#v:defaultParseMode">defaultParseMode</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:parsePatWithMode" class="def">parsePatWithMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Pat">Pat</a> <a href="src/Language-Haskell-Exts-Parser.html#parsePatWithMode" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a Haskell pattern, using an explicit <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:parsePatWithComments" class="def">parsePatWithComments</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> (<a href="Language-Haskell-Exts-Syntax.html#t:Pat">Pat</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>]) <a href="src/Language-Haskell-Exts-Parser.html#parsePatWithComments" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a complete Haskell module, using an explicit <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code>, retaining comments.</p></div></div><h2 id="g:7">Declarations</h2><div class="top"><p class="src"><a name="v:parseDecl" class="def">parseDecl</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Decl">Decl</a> <a href="src/Language-Haskell-Exts-Parser.html#parseDecl" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a Haskell top-level declaration, using <code><a href="Language-Haskell-Exts-Parser.html#v:defaultParseMode">defaultParseMode</a></code></p></div></div><div class="top"><p class="src"><a name="v:parseDeclWithMode" class="def">parseDeclWithMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Decl">Decl</a> <a href="src/Language-Haskell-Exts-Parser.html#parseDeclWithMode" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a Haskell top-level declaration, using an explicit <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:parseDeclWithComments" class="def">parseDeclWithComments</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> (<a href="Language-Haskell-Exts-Syntax.html#t:Decl">Decl</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>]) <a href="src/Language-Haskell-Exts-Parser.html#parseDeclWithComments" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a complete Haskell module, using an explicit <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code>, retaining comments.</p></div></div><h2 id="g:8">Types</h2><div class="top"><p class="src"><a name="v:parseType" class="def">parseType</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Type">Type</a> <a href="src/Language-Haskell-Exts-Parser.html#parseType" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a Haskell type, using <code><a href="Language-Haskell-Exts-Parser.html#v:defaultParseMode">defaultParseMode</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:parseTypeWithMode" class="def">parseTypeWithMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:Type">Type</a> <a href="src/Language-Haskell-Exts-Parser.html#parseTypeWithMode" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a Haskell type, using an explicit <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:parseTypeWithComments" class="def">parseTypeWithComments</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> (<a href="Language-Haskell-Exts-Syntax.html#t:Type">Type</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>]) <a href="src/Language-Haskell-Exts-Parser.html#parseTypeWithComments" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a complete Haskell module, using an explicit <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code>, retaining comments.</p></div></div><h2 id="g:9">Import declarations</h2><div class="top"><p class="src"><a name="v:parseImportDecl" class="def">parseImportDecl</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:ImportDecl">ImportDecl</a> <a href="src/Language-Haskell-Exts-Parser.html#parseImportDecl" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a Haskell import declaration, using <code><a href="Language-Haskell-Exts-Parser.html#v:defaultParseMode">defaultParseMode</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:parseImportDeclWithMode" class="def">parseImportDeclWithMode</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> <a href="Language-Haskell-Exts-Syntax.html#t:ImportDecl">ImportDecl</a> <a href="src/Language-Haskell-Exts-Parser.html#parseImportDeclWithMode" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a Haskell type, using an explicit <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:parseImportDeclWithComments" class="def">parseImportDeclWithComments</a> :: <a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> (<a href="Language-Haskell-Exts-Syntax.html#t:ImportDecl">ImportDecl</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>]) <a href="src/Language-Haskell-Exts-Parser.html#parseImportDeclWithComments" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a complete Haskell module, using an explicit <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code>, retaining comments.</p></div></div><h1 id="g:10">Non-greedy parsers</h1><div class="top"><p class="src"><span class="keyword">newtype</span> <a name="t:NonGreedy" class="def">NonGreedy</a> a <a href="src/Language-Haskell-Exts-Annotated-Parser.html#NonGreedy" class="link">Source</a></p><div class="doc"><p>Instances of <code><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a></code> for <code>NonGreedy a</code> will only consume the input
   until <code>a</code> is fully parsed.  This means that parse errors that come later
   in the input will be ignored.  It's also more efficient, as it's fully lazy
   in the remainder of the input:</p><pre class="screen"><code class="prompt">&gt;&gt;&gt; </code><strong class="userinput"><code>parse (unlines (&quot;module A where&quot; : &quot;main =&quot; : repeat &quot;blah&quot;)) :: ParseResult PragmasAndModuleHead
</code></strong>ParseOk (NonGreedy {unNonGreedy = PragmasAndModuleHead [] (ModuleName &quot;A&quot;,Nothing,Nothing)})
</pre><p>(this example uses the simplified AST)</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:NonGreedy" class="def">NonGreedy</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:unNonGreedy" class="def">unNonGreedy</a> :: 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:NonGreedy" class="caption collapser" onclick="toggleSection('i:NonGreedy')">Instances</p><div id="section.i:NonGreedy" 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="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a></span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-238" 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-Eq.html#t:Eq">Eq</a> a =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> a)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-236" 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 =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Data.html#t:Data">Data</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> a)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-236" 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 =&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ord">Ord</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> a)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-236" 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 =&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="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> a)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-236" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> (<a href="Language-Haskell-Exts-Annotated-Parser.html#t:ListOf">ListOf</a> (<a href="Language-Haskell-Exts-Annotated-Syntax.html#t:ModulePragma">ModulePragma</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>)))</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-161" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> (<a href="Language-Haskell-Exts-Annotated-Parser.html#t:ModuleHeadAndImports">ModuleHeadAndImports</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>))</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-217" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> (<a href="Language-Haskell-Exts-Annotated-Parser.html#t:PragmasAndModuleHead">PragmasAndModuleHead</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>))</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-196" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> (<a href="Language-Haskell-Exts-Annotated-Parser.html#t:PragmasAndModuleName">PragmasAndModuleName</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>))</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-177" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> <a href="Language-Haskell-Exts-Parser.html#t:ModuleHeadAndImports">ModuleHeadAndImports</a>)</span> <a href="src/Language-Haskell-Exts-ParseMonad.html#line-226" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> <a href="Language-Haskell-Exts-Parser.html#t:PragmasAndModuleHead">PragmasAndModuleHead</a>)</span> <a href="src/Language-Haskell-Exts-ParseMonad.html#line-202" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> <a href="Language-Haskell-Exts-Parser.html#t:PragmasAndModuleName">PragmasAndModuleName</a>)</span> <a href="src/Language-Haskell-Exts-ParseMonad.html#line-180" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h2 id="g:11">Module head parsers</h2><div class="top"><p class="src"><a name="v:getTopPragmas" class="def">getTopPragmas</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="Language-Haskell-Exts-Parser.html#t:ParseResult">ParseResult</a> [<a href="Language-Haskell-Exts-Syntax.html#t:ModulePragma">ModulePragma</a>] <a href="src/Language-Haskell-Exts-Parser.html#getTopPragmas" class="link">Source</a></p><div class="doc"><p>Partial parse of a string starting with a series of top-level option pragmas.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PragmasAndModuleName" class="def">PragmasAndModuleName</a> <a href="src/Language-Haskell-Exts-Parser.html#PragmasAndModuleName" class="link">Source</a></p><div class="doc"><p>Type intended to be used with <code><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a></code>, with instances that
   implement a non-greedy parse of the module name, including
   top-level pragmas.  This means that a parse error that comes
   after the module header won't be returned. If no module name is
   found (and no parse error occurs), then &quot;Main&quot; is returned.
   This is the same behavior that <code><a href="Language-Haskell-Exts-Parser.html#v:parseModule">parseModule</a></code> has.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PragmasAndModuleName" class="def">PragmasAndModuleName</a> [<a href="Language-Haskell-Exts-Syntax.html#t:ModulePragma">ModulePragma</a>] <a href="Language-Haskell-Exts-Syntax.html#t:ModuleName">ModuleName</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:PragmasAndModuleName" class="caption collapser" onclick="toggleSection('i:PragmasAndModuleName')">Instances</p><div id="section.i:PragmasAndModuleName" 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="Language-Haskell-Exts-Parser.html#t:PragmasAndModuleName">PragmasAndModuleName</a></span> <a href="src/Language-Haskell-Exts-Parser.html#line-178" 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="Language-Haskell-Exts-Parser.html#t:PragmasAndModuleName">PragmasAndModuleName</a></span> <a href="src/Language-Haskell-Exts-Parser.html#line-178" 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="Language-Haskell-Exts-Parser.html#t:PragmasAndModuleName">PragmasAndModuleName</a></span> <a href="src/Language-Haskell-Exts-Parser.html#line-178" 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="Language-Haskell-Exts-Parser.html#t:PragmasAndModuleName">PragmasAndModuleName</a></span> <a href="src/Language-Haskell-Exts-Parser.html#line-178" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> <a href="Language-Haskell-Exts-Parser.html#t:PragmasAndModuleName">PragmasAndModuleName</a>)</span> <a href="src/Language-Haskell-Exts-Parser.html#line-180" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PragmasAndModuleHead" class="def">PragmasAndModuleHead</a> <a href="src/Language-Haskell-Exts-Parser.html#PragmasAndModuleHead" class="link">Source</a></p><div class="doc"><p>Type intended to be used with <code><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a></code>, with instances that
   implement a non-greedy parse of the module name, including
   top-level pragmas.  This means that a parse error that comes
   after the module header won't be returned. If no module head is
   found, then a default simple head like &quot;module Main where&quot; is
   assumed. This is the same behavior that <code><a href="Language-Haskell-Exts-Parser.html#v:parseModule">parseModule</a></code> has.</p><p>Note that the <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code> particularly matters for this due to
   the <code>MagicHash</code> changing the lexing of identifiers to include
   &quot;#&quot;.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PragmasAndModuleHead" class="def">PragmasAndModuleHead</a> [<a href="Language-Haskell-Exts-Syntax.html#t:ModulePragma">ModulePragma</a>] (<a href="Language-Haskell-Exts-Syntax.html#t:ModuleName">ModuleName</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="Language-Haskell-Exts-Syntax.html#t:WarningText">WarningText</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="Language-Haskell-Exts-Syntax.html#t:ExportSpec">ExportSpec</a>])</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:PragmasAndModuleHead" class="caption collapser" onclick="toggleSection('i:PragmasAndModuleHead')">Instances</p><div id="section.i:PragmasAndModuleHead" 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="Language-Haskell-Exts-Parser.html#t:PragmasAndModuleHead">PragmasAndModuleHead</a></span> <a href="src/Language-Haskell-Exts-Parser.html#line-200" 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="Language-Haskell-Exts-Parser.html#t:PragmasAndModuleHead">PragmasAndModuleHead</a></span> <a href="src/Language-Haskell-Exts-Parser.html#line-200" 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="Language-Haskell-Exts-Parser.html#t:PragmasAndModuleHead">PragmasAndModuleHead</a></span> <a href="src/Language-Haskell-Exts-Parser.html#line-200" 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="Language-Haskell-Exts-Parser.html#t:PragmasAndModuleHead">PragmasAndModuleHead</a></span> <a href="src/Language-Haskell-Exts-Parser.html#line-200" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> <a href="Language-Haskell-Exts-Parser.html#t:PragmasAndModuleHead">PragmasAndModuleHead</a>)</span> <a href="src/Language-Haskell-Exts-Parser.html#line-202" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ModuleHeadAndImports" class="def">ModuleHeadAndImports</a> <a href="src/Language-Haskell-Exts-Parser.html#ModuleHeadAndImports" class="link">Source</a></p><div class="doc"><p>Type intended to be used with <code><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a></code>, with instances that
   implement a non-greedy parse of the module head, including
   top-level pragmas, module name, export list, and import
   list. This means that if a parse error that comes after the
   imports won't be returned.  If no module head is found, then a
   default simple head like &quot;module Main where&quot; is assumed. This
   is the same behavior that <code><a href="Language-Haskell-Exts-Parser.html#v:parseModule">parseModule</a></code> has.</p><p>Note that the <code><a href="Language-Haskell-Exts-Parser.html#t:ParseMode">ParseMode</a></code> particularly matters for this due to
   the <code>MagicHash</code> changing the lexing of identifiers to include
   &quot;#&quot;.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ModuleHeadAndImports" class="def">ModuleHeadAndImports</a> [<a href="Language-Haskell-Exts-Syntax.html#t:ModulePragma">ModulePragma</a>] (<a href="Language-Haskell-Exts-Syntax.html#t:ModuleName">ModuleName</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="Language-Haskell-Exts-Syntax.html#t:WarningText">WarningText</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="Language-Haskell-Exts-Syntax.html#t:ExportSpec">ExportSpec</a>]) [<a href="Language-Haskell-Exts-Syntax.html#t:ImportDecl">ImportDecl</a>]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:ModuleHeadAndImports" class="caption collapser" onclick="toggleSection('i:ModuleHeadAndImports')">Instances</p><div id="section.i:ModuleHeadAndImports" 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="Language-Haskell-Exts-Parser.html#t:ModuleHeadAndImports">ModuleHeadAndImports</a></span> <a href="src/Language-Haskell-Exts-Parser.html#line-224" 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="Language-Haskell-Exts-Parser.html#t:ModuleHeadAndImports">ModuleHeadAndImports</a></span> <a href="src/Language-Haskell-Exts-Parser.html#line-224" 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="Language-Haskell-Exts-Parser.html#t:ModuleHeadAndImports">ModuleHeadAndImports</a></span> <a href="src/Language-Haskell-Exts-Parser.html#line-224" 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="Language-Haskell-Exts-Parser.html#t:ModuleHeadAndImports">ModuleHeadAndImports</a></span> <a href="src/Language-Haskell-Exts-Parser.html#line-224" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="Language-Haskell-Exts-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Parser.html#t:NonGreedy">NonGreedy</a> <a href="Language-Haskell-Exts-Parser.html#t:ModuleHeadAndImports">ModuleHeadAndImports</a>)</span> <a href="src/Language-Haskell-Exts-Parser.html#line-226" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></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>