aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Options.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Haddock/Options.hs')
-rw-r--r--src/Haddock/Options.hs18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/Haddock/Options.hs b/src/Haddock/Options.hs
index 2e10827e..b166de46 100644
--- a/src/Haddock/Options.hs
+++ b/src/Haddock/Options.hs
@@ -51,9 +51,10 @@ data Flag
| Flag_Lib String
| Flag_OutputDir FilePath
| Flag_Prologue FilePath
- | Flag_SourceBaseURL String
- | Flag_SourceModuleURL String
- | Flag_SourceEntityURL String
+ | Flag_SourceBaseURL String
+ | Flag_SourceModuleURL String
+ | Flag_SourceEntityURL String
+ | Flag_SourceLEntityURL String
| Flag_WikiBaseURL String
| Flag_WikiModuleURL String
| Flag_WikiEntityURL String
@@ -114,6 +115,8 @@ options backwardsCompat =
"URL for a source code link for each module\n(using the %{FILE} or %{MODULE} vars)",
Option [] ["source-entity"] (ReqArg Flag_SourceEntityURL "URL")
"URL for a source code link for each entity\n(using the %{FILE}, %{MODULE}, %{NAME},\n%{KIND} or %{LINE} vars)",
+ Option [] ["source-entity-line"] (ReqArg Flag_SourceLEntityURL "URL")
+ "URL for a source code link for each entity.\nUsed if name links are unavailable, eg. for TH splices.",
Option [] ["comments-base"] (ReqArg Flag_WikiBaseURL "URL")
"URL for a comments link on the contents\nand index pages",
Option [] ["comments-module"] (ReqArg Flag_WikiModuleURL "URL")
@@ -216,11 +219,12 @@ optCssFile :: [Flag] -> Maybe FilePath
optCssFile flags = optLast [ str | Flag_CSS str <- flags ]
-sourceUrls :: [Flag] -> (Maybe String, Maybe String, Maybe String)
+sourceUrls :: [Flag] -> (Maybe String, Maybe String, Maybe String, Maybe String)
sourceUrls flags =
- (optLast [str | Flag_SourceBaseURL str <- flags]
- ,optLast [str | Flag_SourceModuleURL str <- flags]
- ,optLast [str | Flag_SourceEntityURL str <- flags])
+ (optLast [str | Flag_SourceBaseURL str <- flags]
+ ,optLast [str | Flag_SourceModuleURL str <- flags]
+ ,optLast [str | Flag_SourceEntityURL str <- flags]
+ ,optLast [str | Flag_SourceLEntityURL str <- flags])
wikiUrls :: [Flag] -> (Maybe String, Maybe String, Maybe String)