summaryrefslogtreecommitdiff
path: root/compiler/main/HeaderInfo.hs
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2016-02-19 10:27:02 +0100
committerThomas Miedema <thomasmiedema@gmail.com>2016-02-19 14:10:04 +0100
commit2f733b3a4b95a35dfdd43915afec9f0f615edacd (patch)
tree2b1e47f4c9eacbdb1dc723f6e7410d82369cd615 /compiler/main/HeaderInfo.hs
parent8b073f6c5be69e024eb20a2b296c94be54ec82ac (diff)
downloadhaskell-2f733b3a4b95a35dfdd43915afec9f0f615edacd.tar.gz
Delete support for deprecated "-- # ..."-style haddock options
A long time ago, you could use `"-- # <haddock options>"` to mean that `<haddock options.` should be passed to `haddock`. Since 2007 (03d8585e0940e28e024548654fe3505685aca94f), using `OPTIONS_HADDOCK` is the preferred way to do this. Why is ok to remove support for "-- # .."? * It is not mentioned in the Haddock user's guide, nor are there any tests that use it. * Ever since 2011 (b3e30449aa6d6eaa978eb3c7447ca85985d9d251), it doesn't actually work anymore. The function `getOptionsFromFile` uses `gopt_unset dflags Opt_Haddock` for other reasons, so even when running ghc with `--haddock`, the following rule always fires when the lexer sees "-- # ..", and it gets treated as a normal comment: ``` -- Next, match Haddock comments if no -haddock flag "-- " [$docsym \#] .* / { ifExtension (not . haddockEnabled) } { lineCommentToken } ``` Reviewed by: bgamari Differential Revision: https://phabricator.haskell.org/D1932
Diffstat (limited to 'compiler/main/HeaderInfo.hs')
-rw-r--r--compiler/main/HeaderInfo.hs4
1 files changed, 0 insertions, 4 deletions
diff --git a/compiler/main/HeaderInfo.hs b/compiler/main/HeaderInfo.hs
index 3eef327f08..600b22cbe7 100644
--- a/compiler/main/HeaderInfo.hs
+++ b/compiler/main/HeaderInfo.hs
@@ -251,10 +251,6 @@ getOptions' dflags toks
= map (L (getLoc open)) ["-haddock-opts", removeSpaces str]
++ parseToks xs
parseToks (open:xs)
- | ITdocOptionsOld str <- getToken open
- = map (L (getLoc open)) ["-haddock-opts", removeSpaces str]
- ++ parseToks xs
- parseToks (open:xs)
| ITlanguage_prag <- getToken open
= parseLanguage xs
parseToks (comment:xs) -- Skip over comments