From: simonmar Date: Thu, 3 Jun 1999 14:44:23 +0000 (+0000) Subject: [project @ 1999-06-03 14:44:23 by simonmar] X-Git-Tag: Approximately_9120_patches~6156 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=34bd3cb97ffdfdc6432ffe03624d58a6f511035c;p=ghc-hetmet.git [project @ 1999-06-03 14:44:23 by simonmar] When not profiling, parse `_scc_ "string" e' as `(e)', not just `e'. Rationale: scc expressions are defined as extending as far to the right as possible, and if we simply remove the _scc_ part the parse looks awfully strange to the renamer which tends to fall over. --- diff --git a/ghc/compiler/parser/Parser.y b/ghc/compiler/parser/Parser.y index 4c29906..caa3a0d 100644 --- a/ghc/compiler/parser/Parser.y +++ b/ghc/compiler/parser/Parser.y @@ -1,6 +1,6 @@ {- ----------------------------------------------------------------------------- -$Id: Parser.y,v 1.4 1999/06/02 16:05:56 simonmar Exp $ +$Id: Parser.y,v 1.5 1999/06/03 14:44:23 simonmar Exp $ Haskell grammar. @@ -633,7 +633,7 @@ exp10 :: { RdrNameHsExpr } | '_scc_' STRING exp { if opt_SccProfilingOn then HsSCC $2 $3 - else $3 } + else HsPar $3 } | fexp { $1 }