<?xml version="1.0" encoding="windows-1252"?>
<node id="790977" title="Re^2: Perl Cannot Be Parsed: A Formal Proof" created="2009-08-25 00:28:13" updated="2009-08-25 00:28:13">
<type id="11">
note</type>
<author id="961">
Anonymous Monk</author>
<data>
<field name="doctext">
&lt;p&gt;
Correctly parsing a Haskell file requires parsing its dependencies, but it doesn't require &lt;em&gt;running&lt;/em&gt; any Haskell code, since infix declarations are quite static.
&lt;/p&gt;

&lt;p&gt;
What it does mean is that to parse Haskell, you need to figure out the imports and infix declarations before actually parsing expressions.  That's not very hard to do.  You could, for example, initially parse expressions just into either lists of identifiers or rose trees regardless of precedence.  Once you have the AST for a source file, it's easy to see the declarations that you need, and then use the information to fix up the expressions based on precedence.
&lt;/p&gt;</field>
<field name="root_node">
663393</field>
<field name="parent_node">
663651</field>
<field name="reputation">
1</field>
</data>
</node>
