From 34bd3cb97ffdfdc6432ffe03624d58a6f511035c Mon Sep 17 00:00:00 2001 From: simonmar <unknown> Date: Thu, 3 Jun 1999 14:44:23 +0000 Subject: [PATCH] [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. --- ghc/compiler/parser/Parser.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/parser/Parser.y b/ghc/compiler/parser/Parser.y index 4c299064c84f..caa3a0d674ee 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 } -- GitLab