This file is indexed.

/usr/share/doc/libghc-src-exts-doc/html/Language-Haskell-Exts-Annotated-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
<!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.Annotated.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-Annotated-Parser.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Language-Haskell-Exts-Annotated-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) Niklas Broberg 2004-2009
                (c) Michael Sloan 2013</td></tr><tr><th>License</th><td>BSD-style (see the file LICENSE.txt)</td></tr><tr><th>Maintainer</th><td>Niklas Broberg, d00nibro@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.Annotated.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">Imports</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>Annotated 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"><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-Annotated-Syntax.html#t:Module">Module</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:Module">Module</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:Module">Module</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:Exp">Exp</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:Exp">Exp</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:Exp">Exp</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:Stmt">Stmt</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:Stmt">Stmt</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:Stmt">Stmt</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:Pat">Pat</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:Pat">Pat</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:Pat">Pat</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:Decl">Decl</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:Decl">Decl</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:Decl">Decl</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:Type">Type</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:Type">Type</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:Type">Type</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:ImportDecl">ImportDecl</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:ImportDecl">ImportDecl</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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-Annotated-Syntax.html#t:ImportDecl">ImportDecl</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</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"><span class="keyword">data</span> <a href="#t:ListOf">ListOf</a> a = <a href="#v:ListOf">ListOf</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a> [a]</li><li class="src short"><a href="#v:unListOf">unListOf</a> :: <a href="Language-Haskell-Exts-Annotated-Parser.html#t:ListOf">ListOf</a> a -&gt; [a]</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-Annotated-Syntax.html#t:ModulePragma">ModulePragma</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>]</li><li class="src short"><span class="keyword">data</span> <a href="#t:PragmasAndModuleName">PragmasAndModuleName</a> l = <a href="#v:PragmasAndModuleName">PragmasAndModuleName</a> l [<a href="Language-Haskell-Exts-Annotated-Syntax.html#t:ModulePragma">ModulePragma</a> l] (<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-Annotated-Syntax.html#t:ModuleName">ModuleName</a> l))</li><li class="src short"><span class="keyword">data</span> <a href="#t:PragmasAndModuleHead">PragmasAndModuleHead</a> l = <a href="#v:PragmasAndModuleHead">PragmasAndModuleHead</a> l [<a href="Language-Haskell-Exts-Annotated-Syntax.html#t:ModulePragma">ModulePragma</a> l] (<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-Annotated-Syntax.html#t:ModuleHead">ModuleHead</a> l))</li><li class="src short"><span class="keyword">data</span> <a href="#t:ModuleHeadAndImports">ModuleHeadAndImports</a> l = <a href="#v:ModuleHeadAndImports">ModuleHeadAndImports</a> l [<a href="Language-Haskell-Exts-Annotated-Syntax.html#t:ModulePragma">ModulePragma</a> l] (<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-Annotated-Syntax.html#t:ModuleHead">ModuleHead</a> l)) [<a href="Language-Haskell-Exts-Annotated-Syntax.html#t:ImportDecl">ImportDecl</a> l]</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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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><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-Annotated-Syntax.html#t:Module">Module</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-Syntax.html#t:Module">Module</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-Syntax.html#t:Module">Module</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>]) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-Syntax.html#t:Exp">Exp</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-Syntax.html#t:Exp">Exp</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-Syntax.html#t:Exp">Exp</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>]) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-Syntax.html#t:Stmt">Stmt</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>) <a href="src/Language-Haskell-Exts-Annotated-Parser.html#parseStmt" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a Haskell statement, 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-Annotated-Syntax.html#t:Stmt">Stmt</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-Syntax.html#t:Stmt">Stmt</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>]) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-Syntax.html#t:Pat">Pat</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-Syntax.html#t:Pat">Pat</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-Syntax.html#t:Pat">Pat</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>]) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-Syntax.html#t:Decl">Decl</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-Syntax.html#t:Decl">Decl</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-Syntax.html#t:Decl">Decl</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>]) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-Syntax.html#t:Type">Type</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-Syntax.html#t:Type">Type</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-Syntax.html#t:Type">Type</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>]) <a href="src/Language-Haskell-Exts-Annotated-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">Imports</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-Annotated-Syntax.html#t:ImportDecl">ImportDecl</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>) <a href="src/Language-Haskell-Exts-Annotated-Parser.html#parseImportDecl" class="link">Source</a></p><div class="doc"><p>Parse of a string containing a Haskell statement, 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-Annotated-Syntax.html#t:ImportDecl">ImportDecl</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-Syntax.html#t:ImportDecl">ImportDecl</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>, [<a href="Language-Haskell-Exts-Comments.html#t:Comment">Comment</a>]) <a href="src/Language-Haskell-Exts-Annotated-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-Annotated-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-Annotated-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-Annotated-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-Annotated-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-Annotated-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-Annotated-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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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:ListOf" class="def">ListOf</a> a <a href="src/Language-Haskell-Exts-Annotated-Parser.html#ListOf" class="link">Source</a></p><div class="doc"><p><code>ListOf a</code> stores lists of the AST type <code>a</code>, along with a <code><a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a></code>,
   in order to provide <code><a href="Language-Haskell-Exts-Annotated-Parser.html#t:Parseable">Parseable</a></code> instances for lists.  These instances are
   provided when the type is used as a list in the syntax, and the same
   delimiters are used in all of its usages. Some exceptions are made:</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ListOf" class="def">ListOf</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a> [a]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:ListOf" class="caption collapser" onclick="toggleSection('i:ListOf')">Instances</p><div id="section.i:ListOf" 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-Annotated-Parser.html#t:ListOf">ListOf</a></span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-246" 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-Annotated-Parser.html#t:ListOf">ListOf</a> a)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-246" 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-Annotated-Parser.html#t:ListOf">ListOf</a> a)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-246" 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-Annotated-Parser.html#t:ListOf">ListOf</a> a)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-246" 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-Annotated-Parser.html#t:ListOf">ListOf</a> a)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-246" 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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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></table></div></div></div><div class="top"><p class="src"><a name="v:unListOf" class="def">unListOf</a> :: <a href="Language-Haskell-Exts-Annotated-Parser.html#t:ListOf">ListOf</a> a -&gt; [a] <a href="src/Language-Haskell-Exts-Annotated-Parser.html#unListOf" class="link">Source</a></p></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-Annotated-Syntax.html#t:ModulePragma">ModulePragma</a> <a href="Language-Haskell-Exts-SrcLoc.html#t:SrcSpanInfo">SrcSpanInfo</a>] <a href="src/Language-Haskell-Exts-Annotated-Parser.html#getTopPragmas" class="link">Source</a></p><div class="doc"><p>Non-greedy 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> l <a href="src/Language-Haskell-Exts-Annotated-Parser.html#PragmasAndModuleName" class="link">Source</a></p><div class="doc"><p>Type intended to be used with <code><a href="Language-Haskell-Exts-Annotated-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 the <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a></code> value is <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#v:Nothing">Nothing</a></code>, then this means that there was
   no module header.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PragmasAndModuleName" class="def">PragmasAndModuleName</a> l [<a href="Language-Haskell-Exts-Annotated-Syntax.html#t:ModulePragma">ModulePragma</a> l] (<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-Annotated-Syntax.html#t:ModuleName">ModuleName</a> l))</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> l =&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-Annotated-Parser.html#t:PragmasAndModuleName">PragmasAndModuleName</a> l)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-175" 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> l =&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-Annotated-Parser.html#t:PragmasAndModuleName">PragmasAndModuleName</a> l)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-175" 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> l =&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-Annotated-Parser.html#t:PragmasAndModuleName">PragmasAndModuleName</a> l)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-175" 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> l =&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-Annotated-Parser.html#t:PragmasAndModuleName">PragmasAndModuleName</a> l)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-175" 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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:PragmasAndModuleHead" class="def">PragmasAndModuleHead</a> l <a href="src/Language-Haskell-Exts-Annotated-Parser.html#PragmasAndModuleHead" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PragmasAndModuleHead" class="def">PragmasAndModuleHead</a> l [<a href="Language-Haskell-Exts-Annotated-Syntax.html#t:ModulePragma">ModulePragma</a> l] (<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-Annotated-Syntax.html#t:ModuleHead">ModuleHead</a> l))</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> l =&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-Annotated-Parser.html#t:PragmasAndModuleHead">PragmasAndModuleHead</a> l)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-194" 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> l =&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-Annotated-Parser.html#t:PragmasAndModuleHead">PragmasAndModuleHead</a> l)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-194" 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> l =&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-Annotated-Parser.html#t:PragmasAndModuleHead">PragmasAndModuleHead</a> l)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-194" 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> l =&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-Annotated-Parser.html#t:PragmasAndModuleHead">PragmasAndModuleHead</a> l)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-194" 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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:ModuleHeadAndImports" class="def">ModuleHeadAndImports</a> l <a href="src/Language-Haskell-Exts-Annotated-Parser.html#ModuleHeadAndImports" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ModuleHeadAndImports" class="def">ModuleHeadAndImports</a> l [<a href="Language-Haskell-Exts-Annotated-Syntax.html#t:ModulePragma">ModulePragma</a> l] (<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-Annotated-Syntax.html#t:ModuleHead">ModuleHead</a> l)) [<a href="Language-Haskell-Exts-Annotated-Syntax.html#t:ImportDecl">ImportDecl</a> l]</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> l =&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-Annotated-Parser.html#t:ModuleHeadAndImports">ModuleHeadAndImports</a> l)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-215" 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> l =&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-Annotated-Parser.html#t:ModuleHeadAndImports">ModuleHeadAndImports</a> l)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-215" 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> l =&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-Annotated-Parser.html#t:ModuleHeadAndImports">ModuleHeadAndImports</a> l)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-215" 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> l =&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-Annotated-Parser.html#t:ModuleHeadAndImports">ModuleHeadAndImports</a> l)</span> <a href="src/Language-Haskell-Exts-Annotated-Parser.html#line-215" 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-Annotated-Parser.html#t:Parseable">Parseable</a> (<a href="Language-Haskell-Exts-Annotated-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></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>