summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2020-07-11 03:02:09 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-07-18 07:26:45 -0400
commit12f9035200424ec8104484f154a040d612fee99d (patch)
tree550c799d324d25f15b4dcbe0e5e4b4d61d6a4906 /compiler
parente5525a51900623e04ec914e9dcc7f4ad1fd3b528 (diff)
downloadhaskell-12f9035200424ec8104484f154a040d612fee99d.tar.gz
Remove {-# CORE #-} pragma (part of #18048)
This pragma has no effect since 2011. It was introduced for External Core, which no longer exists. Updates haddock submodule.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/GHC/Hs/Expr.hs11
-rw-r--r--compiler/GHC/HsToCore/Expr.hs2
-rw-r--r--compiler/GHC/HsToCore/Quote.hs1
-rw-r--r--compiler/GHC/Parser.y9
-rw-r--r--compiler/GHC/Parser/Lexer.x2
-rw-r--r--compiler/GHC/Rename/Expr.hs1
-rw-r--r--compiler/GHC/Tc/Gen/Expr.hs1
7 files changed, 1 insertions, 26 deletions
diff --git a/compiler/GHC/Hs/Expr.hs b/compiler/GHC/Hs/Expr.hs
index b2c808519e..565065e2c2 100644
--- a/compiler/GHC/Hs/Expr.hs
+++ b/compiler/GHC/Hs/Expr.hs
@@ -829,14 +829,6 @@ data HsPragE p
SourceText -- Note [Pragma source text] in GHC.Types.Basic
StringLiteral -- "set cost centre" SCC pragma
- -- | - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnOpen' @'{-\# CORE'@,
- -- 'GHC.Parser.Annotation.AnnVal', 'GHC.Parser.Annotation.AnnClose' @'\#-}'@
-
- -- For details on above see note [Api annotations] in GHC.Parser.Annotation
- | HsPragCore (XCoreAnn p)
- SourceText -- Note [Pragma source text] in GHC.Types.Basic
- StringLiteral -- hdaume: core annotation
-
-- | - 'GHC.Parser.Annotation.AnnKeywordId' : 'GHC.Parser.Annotation.AnnOpen',
-- 'GHC.Parser.Annotation.AnnOpen' @'{-\# GENERATED'@,
-- 'GHC.Parser.Annotation.AnnVal','GHC.Parser.Annotation.AnnVal',
@@ -1399,9 +1391,6 @@ isAtomicHsExpr (XExpr x)
isAtomicHsExpr _ = False
instance Outputable (HsPragE (GhcPass p)) where
- ppr (HsPragCore _ stc (StringLiteral sta s)) =
- pprWithSourceText stc (text "{-# CORE")
- <+> pprWithSourceText sta (doubleQuotes $ ftext s) <+> text "#-}"
ppr (HsPragSCC _ st (StringLiteral stl lbl)) =
pprWithSourceText st (text "{-# SCC")
-- no doublequotes if stl empty, for the case where the SCC was written
diff --git a/compiler/GHC/HsToCore/Expr.hs b/compiler/GHC/HsToCore/Expr.hs
index 7ac72bad55..2b959006e0 100644
--- a/compiler/GHC/HsToCore/Expr.hs
+++ b/compiler/GHC/HsToCore/Expr.hs
@@ -820,8 +820,6 @@ ds_prag_expr (HsPragSCC _ _ cc) expr = do
Tick (ProfNote (mkUserCC nm mod_name (getLoc expr) flavour) count True)
<$> dsLExpr expr
else dsLExpr expr
-ds_prag_expr (HsPragCore _ _ _) expr
- = dsLExpr expr
ds_prag_expr (HsPragTick _ _ _ _) expr = do
dflags <- getDynFlags
if gopt Opt_Hpc dflags
diff --git a/compiler/GHC/HsToCore/Quote.hs b/compiler/GHC/HsToCore/Quote.hs
index bbe56af5b7..1972b3bec0 100644
--- a/compiler/GHC/HsToCore/Quote.hs
+++ b/compiler/GHC/HsToCore/Quote.hs
@@ -1570,7 +1570,6 @@ repE (HsUnboundVar _ uv) = do
sname <- repNameS occ
repUnboundVar sname
repE (XExpr (HsExpanded _ b)) = repE b
-repE e@(HsPragE _ HsPragCore {} _) = notHandled "Core annotations" (ppr e)
repE e@(HsPragE _ HsPragSCC {} _) = notHandled "Cost centres" (ppr e)
repE e@(HsPragE _ HsPragTick {} _) = notHandled "Tick Pragma" (ppr e)
repE e = notHandled "Expression form" (ppr e)
diff --git a/compiler/GHC/Parser.y b/compiler/GHC/Parser.y
index 041b25d586..8c9f0f8ef2 100644
--- a/compiler/GHC/Parser.y
+++ b/compiler/GHC/Parser.y
@@ -521,7 +521,6 @@ are the most common patterns, rewritten as regular expressions for clarity:
'{-# SPECIALISE_INLINE' { L _ (ITspec_inline_prag _ _) }
'{-# SOURCE' { L _ (ITsource_prag _) }
'{-# RULES' { L _ (ITrules_prag _) }
- '{-# CORE' { L _ (ITcore_prag _) } -- hdaume: annotated core
'{-# SCC' { L _ (ITscc_prag _)}
'{-# GENERATED' { L _ (ITgenerated_prag _) }
'{-# DEPRECATED' { L _ (ITdeprecated_prag _) }
@@ -2695,7 +2694,7 @@ optSemi :: { ([Located Token],Bool) }
{- Note [Pragmas and operator fixity]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-'prag_e' is an expression pragma, such as {-# SCC ... #-}, {-# CORE ... #-}, or
+'prag_e' is an expression pragma, such as {-# SCC ... #-} or
{-# GENERATED ... #-}.
It must be used with care, or else #15730 happens. Consider this infix
@@ -2764,11 +2763,6 @@ prag_e :: { Located ([AddAnn], HsPragE GhcPs) }
(getINT $7, getINT $9))
((getINTEGERs $3, getINTEGERs $5),
(getINTEGERs $7, getINTEGERs $9) )) }
- | '{-# CORE' STRING '#-}'
- { sLL $1 $> $
- ([mo $1,mj AnnVal $2,mc $3],
- HsPragCore noExtField (getCORE_PRAGs $1) (getStringLiteral $2)) }
-
fexp :: { ECP }
: fexp aexp { ECP $
superFunArg $
@@ -3915,7 +3909,6 @@ getWARNING_PRAGs (L _ (ITwarning_prag src)) = src
getDEPRECATED_PRAGs (L _ (ITdeprecated_prag src)) = src
getSCC_PRAGs (L _ (ITscc_prag src)) = src
getGENERATED_PRAGs (L _ (ITgenerated_prag src)) = src
-getCORE_PRAGs (L _ (ITcore_prag src)) = src
getUNPACK_PRAGs (L _ (ITunpack_prag src)) = src
getNOUNPACK_PRAGs (L _ (ITnounpack_prag src)) = src
getANN_PRAGs (L _ (ITann_prag src)) = src
diff --git a/compiler/GHC/Parser/Lexer.x b/compiler/GHC/Parser/Lexer.x
index a2ca634c53..ef9f1803bf 100644
--- a/compiler/GHC/Parser/Lexer.x
+++ b/compiler/GHC/Parser/Lexer.x
@@ -743,7 +743,6 @@ data Token
| ITcolumn_prag SourceText -- not usually produced, see 'UsePosPragsBit'
| ITscc_prag SourceText
| ITgenerated_prag SourceText
- | ITcore_prag SourceText -- hdaume: core annotations
| ITunpack_prag SourceText
| ITnounpack_prag SourceText
| ITann_prag SourceText
@@ -3230,7 +3229,6 @@ oneWordPrags = Map.fromList [
("deprecated", strtoken (\s -> ITdeprecated_prag (SourceText s))),
("scc", strtoken (\s -> ITscc_prag (SourceText s))),
("generated", strtoken (\s -> ITgenerated_prag (SourceText s))),
- ("core", strtoken (\s -> ITcore_prag (SourceText s))),
("unpack", strtoken (\s -> ITunpack_prag (SourceText s))),
("nounpack", strtoken (\s -> ITnounpack_prag (SourceText s))),
("ann", strtoken (\s -> ITann_prag (SourceText s))),
diff --git a/compiler/GHC/Rename/Expr.hs b/compiler/GHC/Rename/Expr.hs
index 35dfb6b282..6814752963 100644
--- a/compiler/GHC/Rename/Expr.hs
+++ b/compiler/GHC/Rename/Expr.hs
@@ -242,7 +242,6 @@ rnExpr (HsPragE x prag expr)
where
rn_prag :: HsPragE GhcPs -> HsPragE GhcRn
rn_prag (HsPragSCC x1 src ann) = HsPragSCC x1 src ann
- rn_prag (HsPragCore x1 src lbl) = HsPragCore x1 src lbl
rn_prag (HsPragTick x1 src info srcInfo) = HsPragTick x1 src info srcInfo
rnExpr (HsLam x matches)
diff --git a/compiler/GHC/Tc/Gen/Expr.hs b/compiler/GHC/Tc/Gen/Expr.hs
index 8bef4b4b8e..a6d2427f8d 100644
--- a/compiler/GHC/Tc/Gen/Expr.hs
+++ b/compiler/GHC/Tc/Gen/Expr.hs
@@ -1082,7 +1082,6 @@ tcExpr other _ = pprPanic "tcLExpr" (ppr other)
tcExprPrag :: HsPragE GhcRn -> HsPragE GhcTc
tcExprPrag (HsPragSCC x1 src ann) = HsPragSCC x1 src ann
-tcExprPrag (HsPragCore x1 src lbl) = HsPragCore x1 src lbl
tcExprPrag (HsPragTick x1 src info srcInfo) = HsPragTick x1 src info srcInfo