From: simonpj@microsoft.com Date: Thu, 21 Jun 2007 14:37:21 +0000 (+0000) Subject: FIX read040: patterns with type sig on LHS of do-binding X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=bb511e2deeb63e4b1a92b033283cd63de3e5a27c 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. --- diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp index 82f6474..b31e025 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 }