summaryrefslogtreecommitdiff
path: root/ghc/compiler/hsSyn/HsExpr.lhs
diff options
context:
space:
mode:
authorsimonmar <unknown>1999-06-01 16:41:09 +0000
committersimonmar <unknown>1999-06-01 16:41:09 +0000
commit904f158f9fe208b8154029dff655a6eab4b2828e (patch)
tree6672415bda27fbb353fa85f09a3b03cedc505cf2 /ghc/compiler/hsSyn/HsExpr.lhs
parent6ee2f67e582427f931c21c1fc58f62f8619d40b7 (diff)
downloadhaskell-904f158f9fe208b8154029dff655a6eab4b2828e.tar.gz
[project @ 1999-06-01 16:40:41 by simonmar]
This commit replaces the old yacc parser with a Happy-generated one. Notes: - The generated .hs file is *big*. Best to use a recent version of Happy, and even better to add the -c flag to use unsafeCoerce# with ghc (versions 4.02+ please). - The lexer has grown all sorts of unsightly growths and should be put down as soon as possible. - Parse errors may result in strange diagnostics. I'm looking into this. - HsSyn now contains a few extra constructors due to the way patterns are parsed as expressions in the parser. - The layout rule is implemented according to the Haskell report. I found a couple of places in the libraries where we previously weren't adhering to this - in particular the rule about "nested contexts must be more indented than outer contexts". The rule is necessary to disambiguate in the presence of empty declaration lists.
Diffstat (limited to 'ghc/compiler/hsSyn/HsExpr.lhs')
-rw-r--r--ghc/compiler/hsSyn/HsExpr.lhs11
1 files changed, 11 insertions, 0 deletions
diff --git a/ghc/compiler/hsSyn/HsExpr.lhs b/ghc/compiler/hsSyn/HsExpr.lhs
index 24ab616694..caa8a6ba84 100644
--- a/ghc/compiler/hsSyn/HsExpr.lhs
+++ b/ghc/compiler/hsSyn/HsExpr.lhs
@@ -153,6 +153,17 @@ data HsExpr id pat
(HsExpr id pat) -- expr whose cost is to be measured
\end{code}
+These constructors only appear temporarily in the parser.
+
+\begin{code}
+ | EWildPat -- wildcard
+
+ | EAsPat id -- as pattern
+ (HsExpr id pat)
+
+ | ELazyPat (HsExpr id pat) -- ~ pattern
+\end{code}
+
Everything from here on appears only in typechecker output.
\begin{code}