summaryrefslogtreecommitdiff
path: root/compiler/GHC/Parser/Lexer.x
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2020-09-07 21:50:39 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-09-09 11:20:03 -0400
commit7911d0d983a68eb0d54d7c1ba51326d6be737aae (patch)
treea099770f0b3e38ff6883b8a6d8c93035512af7b4 /compiler/GHC/Parser/Lexer.x
parentffae57921168365272bf7ce8aaa645917bfdf218 (diff)
downloadhaskell-7911d0d983a68eb0d54d7c1ba51326d6be737aae.tar.gz
Remove GENERATED pragma, as it is not being used
@alanz pointed out on ghc-devs that the payload of this pragma does not appear to be used anywhere. I (@bgamari) did some digging and traced the pragma's addition back to d386e0d2 (way back in 2006!). It appears that it was intended to be used by code generators for use in informing the code coveraging checker about generated code provenance. When it was added it used the pragma's "payload" fields as source location information to build an "ExternalBox". However, it looks like this was dropped a year later in 55a5d8d9. At this point it seems like the pragma serves no useful purpose. Given that it also is not documented, I think we should remove it. Updates haddock submodule Closes #18639
Diffstat (limited to 'compiler/GHC/Parser/Lexer.x')
-rw-r--r--compiler/GHC/Parser/Lexer.x2
1 files changed, 0 insertions, 2 deletions
diff --git a/compiler/GHC/Parser/Lexer.x b/compiler/GHC/Parser/Lexer.x
index 1a131fc321..c346df1d0d 100644
--- a/compiler/GHC/Parser/Lexer.x
+++ b/compiler/GHC/Parser/Lexer.x
@@ -743,7 +743,6 @@ data Token
| ITline_prag SourceText -- not usually produced, see 'UsePosPragsBit'
| ITcolumn_prag SourceText -- not usually produced, see 'UsePosPragsBit'
| ITscc_prag SourceText
- | ITgenerated_prag SourceText
| ITunpack_prag SourceText
| ITnounpack_prag SourceText
| ITann_prag SourceText
@@ -3289,7 +3288,6 @@ oneWordPrags = Map.fromList [
("warning", strtoken (\s -> ITwarning_prag (SourceText s))),
("deprecated", strtoken (\s -> ITdeprecated_prag (SourceText s))),
("scc", strtoken (\s -> ITscc_prag (SourceText s))),
- ("generated", strtoken (\s -> ITgenerated_prag (SourceText s))),
("unpack", strtoken (\s -> ITunpack_prag (SourceText s))),
("nounpack", strtoken (\s -> ITnounpack_prag (SourceText s))),
("ann", strtoken (\s -> ITann_prag (SourceText s))),