@@ -24,6 +24,7 @@ module Haddock.Options (
24
24
optSourceCssFile ,
25
25
sourceUrls ,
26
26
wikiUrls ,
27
+ optParCount ,
27
28
optDumpInterfaceFile ,
28
29
optShowInterfaceFile ,
29
30
optLaTeXStyle ,
@@ -110,6 +111,7 @@ data Flag
110
111
| Flag_Reexport String
111
112
| Flag_SinceQualification String
112
113
| Flag_IgnoreLinkSymbol String
114
+ | Flag_ParCount (Maybe Int )
113
115
deriving (Eq , Show )
114
116
115
117
@@ -223,7 +225,9 @@ options backwardsCompat =
223
225
Option [] [" since-qual" ] (ReqArg Flag_SinceQualification " QUAL" )
224
226
" package qualification of @since, one of\n 'always' (default) or 'only-external'" ,
225
227
Option [] [" ignore-link-symbol" ] (ReqArg Flag_IgnoreLinkSymbol " SYMBOL" )
226
- " name of a symbol which does not trigger a warning in case of link issue"
228
+ " name of a symbol which does not trigger a warning in case of link issue" ,
229
+ Option [' j' ] [] (OptArg (\ count -> Flag_ParCount (fmap read count)) " n" )
230
+ " load modules in parallel"
227
231
]
228
232
229
233
@@ -306,10 +310,11 @@ optShowInterfaceFile flags = optLast [ str | Flag_ShowInterface str <- flags ]
306
310
optLaTeXStyle :: [Flag ] -> Maybe String
307
311
optLaTeXStyle flags = optLast [ str | Flag_LaTeXStyle str <- flags ]
308
312
309
-
310
313
optMathjax :: [Flag ] -> Maybe String
311
314
optMathjax flags = optLast [ str | Flag_Mathjax str <- flags ]
312
315
316
+ optParCount :: [Flag ] -> Maybe (Maybe Int )
317
+ optParCount flags = optLast [ n | Flag_ParCount n <- flags ]
313
318
314
319
qualification :: [Flag ] -> Either String QualOption
315
320
qualification flags =
0 commit comments