[project @ 1999-06-03 14:44:23 by simonmar]
authorsimonmar <unknown>
Thu, 3 Jun 1999 14:44:23 +0000 (14:44 +0000)
committersimonmar <unknown>
Thu, 3 Jun 1999 14:44:23 +0000 (14:44 +0000)
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

index 4c29906..caa3a0d 100644 (file)
@@ -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 }