summaryrefslogtreecommitdiff
path: root/compiler/parser/Parser.y.pp
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/parser/Parser.y.pp')
-rw-r--r--compiler/parser/Parser.y.pp9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp
index 62132277d9..6c19812762 100644
--- a/compiler/parser/Parser.y.pp
+++ b/compiler/parser/Parser.y.pp
@@ -43,7 +43,7 @@ import OccName ( varName, dataName, tcClsName, tvName )
import DataCon ( DataCon, dataConName )
import SrcLoc
import Module
-import StaticFlags ( opt_SccProfilingOn, opt_Hpc )
+import StaticFlags ( opt_Hpc )
import Kind ( Kind, liftedTypeKind, unliftedTypeKind, mkArrowKind )
import Class ( FunDep )
import BasicTypes
@@ -1402,9 +1402,10 @@ exp10 :: { LHsExpr RdrName }
| 'do' stmtlist { L (comb2 $1 $2) (mkHsDo DoExpr (unLoc $2)) }
| 'mdo' stmtlist { L (comb2 $1 $2) (mkHsDo MDoExpr (unLoc $2)) }
- | scc_annot exp { LL $ if opt_SccProfilingOn
- then HsSCC (unLoc $1) $2
- else HsPar $2 }
+ | scc_annot exp {% do { on <- extension sccProfilingOn
+ ; return $ LL $ if on
+ then HsSCC (unLoc $1) $2
+ else HsPar $2 } }
| hpc_annot exp { LL $ if opt_Hpc
then HsTickPragma (unLoc $1) $2
else HsPar $2 }