diff options
author | simonpj@microsoft.com <unknown> | 2007-06-21 14:37:21 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2007-06-21 14:37:21 +0000 |
commit | bb511e2deeb63e4b1a92b033283cd63de3e5a27c (patch) | |
tree | ba2984b475e435790bac658f2036ae2d175d5da4 /compiler | |
parent | e7158cc7c9e32fa65a3f1489fbd4760dbaae9a9d (diff) | |
download | haskell-bb511e2deeb63e4b1a92b033283cd63de3e5a27c.tar.gz |
FIX read040: patterns with type sig on LHS of do-binding
f () = do { x :: Bool <- return True; ... }
For some reason the production for 'pat' required 'infixexp' on the
LHS of a do-notation binding. This patch makes it an 'exp', which
thereby allows an expression with a type sig.
Happily, there are no new shift-reduce errors, so I don't think this
will break anything else.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/parser/Parser.y.pp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp index 82f6474125..b31e025085 100644 --- a/compiler/parser/Parser.y.pp +++ b/compiler/parser/Parser.y.pp @@ -1494,7 +1494,7 @@ gdpat :: { LGRHS RdrName } -- Bangs inside are parsed as infix operator applications, so that -- we parse them right when bang-patterns are off pat :: { LPat RdrName } -pat : infixexp {% checkPattern $1 } +pat : exp {% checkPattern $1 } | '!' aexp {% checkPattern (LL (SectionR (L1 (HsVar bang_RDR)) $2)) } apat :: { LPat RdrName } |