Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tentative (non-working) patch
From 68cebd2b5fc2ef449e725dfe08d857e43d61dd97 Mon Sep 17 00:00:00 2001
From: Alfredo Di Napoli <alfredo.dinapoli@gmail.com>
Date: Thu, 19 Jun 2014 08:54:06 +0200
Subject: [PATCH] Tweaked docsym and Lexer as tentative fix for #8226
---
compiler/main/HeaderInfo.hs | 4 ----
compiler/parser/Lexer.x | 6 +-----
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/compiler/main/HeaderInfo.hs b/compiler/main/HeaderInfo.hs
index fcf235b..d166413 100644
--- a/compiler/main/HeaderInfo.hs
+++ b/compiler/main/HeaderInfo.hs
@@ -241,10 +241,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 _ = []
diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x
index 3d02393..b0a292e 100644
--- a/compiler/parser/Lexer.x
+++ b/compiler/parser/Lexer.x
@@ -176,7 +176,7 @@ $tab+ { warn Opt_WarnTabs (text "Tab character") }
-- space followed by a Haddock comment symbol (docsym) (in which case we'd
-- have a Haddock comment). The rules then munch the rest of the line.
-"-- " ~[$docsym \#] .* { lineCommentToken }
+"-- " ~[$docsym] .* { lineCommentToken }
"--" [^$symbol : \ ] .* { lineCommentToken }
-- Next, match Haddock comments if no -haddock flag
@@ -281,8 +281,6 @@ $tab+ { warn Opt_WarnTabs (text "Tab character") }
<option_prags> {
"{-#" $whitechar* $pragmachar+ / { known_pragma fileHeaderPrags }
{ dispatch_pragmas fileHeaderPrags }
-
- "-- #" { multiline_doc_comment }
}
<0> {
@@ -622,7 +620,6 @@ data Token
| ITdocCommentNamed String -- something beginning '-- $'
| ITdocSection Int String -- a section heading
| ITdocOptions String -- doc options (prune, ignore-exports, etc)
- | ITdocOptionsOld String -- doc options declared "-- # ..."-style
| ITlineComment String -- comment starting by "--"
| ITblockComment String -- comment in {- -}
@@ -942,7 +939,6 @@ withLexedDocType lexDocComment = do
'^' -> lexDocComment input ITdocCommentPrev False
'$' -> lexDocComment input ITdocCommentNamed False
'*' -> lexDocSection 1 input
- '#' -> lexDocComment input ITdocOptionsOld False
_ -> panic "withLexedDocType: Bad doc type"
where
lexDocSection n input = case alexGetChar' input of
--
1.9.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.