summaryrefslogtreecommitdiff
path: root/compiler/parser/Parser.y.pp
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-08-16 01:08:40 +0000
committerIan Lynagh <igloo@earth.li>2007-08-16 01:08:40 +0000
commitdd70a2da99ae6b09115ea80163d993e738c581fe (patch)
tree233adfba8a9cb7775abc3f796b887f4590ea4eca /compiler/parser/Parser.y.pp
parent26dc0aa6d3a06ee6b948a2827426407c7c8cda97 (diff)
downloadhaskell-dd70a2da99ae6b09115ea80163d993e738c581fe.tar.gz
Add a deprecated warning for _scc_
Diffstat (limited to 'compiler/parser/Parser.y.pp')
-rw-r--r--compiler/parser/Parser.y.pp4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp
index 4567e072b3..b624455d3f 100644
--- a/compiler/parser/Parser.y.pp
+++ b/compiler/parser/Parser.y.pp
@@ -35,6 +35,7 @@ import StaticFlags ( opt_SccProfilingOn, opt_Hpc )
import Type ( Kind, mkArrowKind, liftedTypeKind, unliftedTypeKind )
import BasicTypes ( Boxity(..), Fixity(..), FixityDirection(..), IPName(..),
Activation(..), defaultInlineSpec )
+import DynFlags
import OrdList
import HaddockParse
import {-# SOURCE #-} HaddockLex hiding ( Token )
@@ -1295,7 +1296,8 @@ exp10 :: { LHsExpr RdrName }
| fexp { $1 }
scc_annot :: { Located FastString }
- : '_scc_' STRING { LL $ getSTRING $2 }
+ : '_scc_' STRING {% (addWarning Opt_WarnDeprecations (getLoc $1) (text "_scc_ is deprecated; use an SCC pragma instead")) >>= \_ ->
+ (return $ LL $ getSTRING $2) }
| '{-# SCC' STRING '#-}' { LL $ getSTRING $2 }
hpc_annot :: { Located (FastString,(Int,Int),(Int,Int)) }