diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2020-07-11 03:02:09 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-07-18 07:26:45 -0400 |
commit | 12f9035200424ec8104484f154a040d612fee99d (patch) | |
tree | 550c799d324d25f15b4dcbe0e5e4b4d61d6a4906 | |
parent | e5525a51900623e04ec914e9dcc7f4ad1fd3b528 (diff) | |
download | haskell-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.
-rw-r--r-- | compiler/GHC/Hs/Expr.hs | 11 | ||||
-rw-r--r-- | compiler/GHC/HsToCore/Expr.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/HsToCore/Quote.hs | 1 | ||||
-rw-r--r-- | compiler/GHC/Parser.y | 9 | ||||
-rw-r--r-- | compiler/GHC/Parser/Lexer.x | 2 | ||||
-rw-r--r-- | compiler/GHC/Rename/Expr.hs | 1 | ||||
-rw-r--r-- | compiler/GHC/Tc/Gen/Expr.hs | 1 | ||||
-rw-r--r-- | testsuite/tests/ghc-api/annotations/T10313.stdout | 3 | ||||
-rw-r--r-- | testsuite/tests/ghc-api/annotations/Test10313.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/ghc-api/annotations/stringSource.hs | 1 | ||||
-rw-r--r-- | testsuite/tests/printer/Ppr009.hs | 3 | ||||
m--------- | utils/haddock | 0 |
12 files changed, 3 insertions, 34 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 diff --git a/testsuite/tests/ghc-api/annotations/T10313.stdout b/testsuite/tests/ghc-api/annotations/T10313.stdout index d1cc35cb61..29fa705666 100644 --- a/testsuite/tests/ghc-api/annotations/T10313.stdout +++ b/testsuite/tests/ghc-api/annotations/T10313.stdout @@ -10,8 +10,5 @@ ([c], [(SourceText "foo\x63", fooc), (SourceText "b\x61r", bar)]), ([r], [(SourceText "foo1\x67", foo1g)]), ([s, t], [(SourceText "a\x62", ab)]), - ([c, o], - [(SourceText "Strict Bitstream stre\x61m", - Strict Bitstream stream)]), ([s, c], [(SourceText "foo\x64", food)]), ([t, p], [(SourceText "foob\x61r", foobar)])] diff --git a/testsuite/tests/ghc-api/annotations/Test10313.hs b/testsuite/tests/ghc-api/annotations/Test10313.hs index 130e84b0e3..b8ed962a62 100644 --- a/testsuite/tests/ghc-api/annotations/Test10313.hs +++ b/testsuite/tests/ghc-api/annotations/Test10313.hs @@ -28,8 +28,7 @@ foreign import prim unsafe "a\x62" a :: IO Int {-# INLINE strictStream #-} strictStream (Bitstream l v) - = {-# CORE "Strict Bitstream stre\x61m" #-} - S.concatMap stream (GV.stream v) + = S.concatMap stream (GV.stream v) `S.sized` Exact l diff --git a/testsuite/tests/ghc-api/annotations/stringSource.hs b/testsuite/tests/ghc-api/annotations/stringSource.hs index 776aebd048..2bc2638e84 100644 --- a/testsuite/tests/ghc-api/annotations/stringSource.hs +++ b/testsuite/tests/ghc-api/annotations/stringSource.hs @@ -84,7 +84,6 @@ testOneFile libdir fileName = do doHsExpr _ = [] doPragE :: HsPragE GhcPs -> [(String,[Located (SourceText,FastString)])] - doPragE (HsPragCore _ src ss) = [("co",[conv (noLoc ss)])] doPragE (HsPragSCC _ src ss) = [("sc",[conv (noLoc ss)])] doPragE (HsPragTick _ src (ss,_,_) _ss2) = [("tp",[conv (noLoc ss)])] diff --git a/testsuite/tests/printer/Ppr009.hs b/testsuite/tests/printer/Ppr009.hs index d24ecdc517..baaeb211db 100644 --- a/testsuite/tests/printer/Ppr009.hs +++ b/testsuite/tests/printer/Ppr009.hs @@ -3,7 +3,6 @@ module Ppr009 where {-# INLINE strictStream #-} strictStream (Bitstream l v) - = {-# CORE "Strict Bitstream stream" #-} - S.concatMap stream (GV.stream v) + = S.concatMap stream (GV.stream v) `S.sized` Exact l diff --git a/utils/haddock b/utils/haddock -Subproject 075067254fc30ef56bad67ac65dd3c5f4101f8f +Subproject 22b42eab6ec6b3b321b6d54041b7b3a6e54af3c |