aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Options.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-02-04 21:49:05 -0500
committerBen Gamari <ben@smart-cactus.org>2021-02-06 11:53:31 -0500
commitbf8ba2525e95319bdbcfc81d06448b646eba3a57 (patch)
tree83aac2bf137fccb8ae49916da9265b7b7fd41833 /haddock-api/src/Haddock/Options.hs
parente1230ede3d1c77a6916e318aefcd47829e56035c (diff)
parent1bdbf284b4ba20ee1738b13c4e3414384955f6f3 (diff)
Merge remote-tracking branch 'origin/ghc-head' into wip/ghc-head-merge
Diffstat (limited to 'haddock-api/src/Haddock/Options.hs')
-rw-r--r--haddock-api/src/Haddock/Options.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Options.hs b/haddock-api/src/Haddock/Options.hs
index dd7b38cb..4d22505f 100644
--- a/haddock-api/src/Haddock/Options.hs
+++ b/haddock-api/src/Haddock/Options.hs
@@ -24,6 +24,7 @@ module Haddock.Options (
optSourceCssFile,
sourceUrls,
wikiUrls,
+ optParCount,
optDumpInterfaceFile,
optShowInterfaceFile,
optLaTeXStyle,
@@ -110,6 +111,7 @@ data Flag
| Flag_Reexport String
| Flag_SinceQualification String
| Flag_IgnoreLinkSymbol String
+ | Flag_ParCount (Maybe Int)
deriving (Eq, Show)
@@ -223,7 +225,9 @@ options backwardsCompat =
Option [] ["since-qual"] (ReqArg Flag_SinceQualification "QUAL")
"package qualification of @since, one of\n'always' (default) or 'only-external'",
Option [] ["ignore-link-symbol"] (ReqArg Flag_IgnoreLinkSymbol "SYMBOL")
- "name of a symbol which does not trigger a warning in case of link issue"
+ "name of a symbol which does not trigger a warning in case of link issue",
+ Option ['j'] [] (OptArg (\count -> Flag_ParCount (fmap read count)) "n")
+ "load modules in parallel"
]
@@ -306,10 +310,11 @@ optShowInterfaceFile flags = optLast [ str | Flag_ShowInterface str <- flags ]
optLaTeXStyle :: [Flag] -> Maybe String
optLaTeXStyle flags = optLast [ str | Flag_LaTeXStyle str <- flags ]
-
optMathjax :: [Flag] -> Maybe String
optMathjax flags = optLast [ str | Flag_Mathjax str <- flags ]
+optParCount :: [Flag] -> Maybe (Maybe Int)
+optParCount flags = optLast [ n | Flag_ParCount n <- flags ]
qualification :: [Flag] -> Either String QualOption
qualification flags =