diff options
author | simonmar <unknown> | 2002-07-10 10:26:11 +0000 |
---|---|---|
committer | simonmar <unknown> | 2002-07-10 10:26:11 +0000 |
commit | c9f149c64c44dcc7fa14d30767a205a991510430 (patch) | |
tree | 341044b69fb108f096e479e01f8b1562b31d9421 /src/HaddockHtml.hs | |
parent | 3dc04655c5aa80676489dd45ad6bb7d61013ec5b (diff) |
[haddock @ 2002-07-10 10:26:11 by simonmar]
Tweaks to the MS Help support: the extra files are now only generated
if you ask for them (--ms-help).
Diffstat (limited to 'src/HaddockHtml.hs')
-rw-r--r-- | src/HaddockHtml.hs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/HaddockHtml.hs b/src/HaddockHtml.hs index 23d4c512..3d5a4c95 100644 --- a/src/HaddockHtml.hs +++ b/src/HaddockHtml.hs @@ -49,9 +49,11 @@ ppHtml :: String -> String -- $libdir -> InstMaps -> Maybe Doc -- prologue text, maybe + -> Bool -- do MS Help stuff -> IO () -ppHtml title source_url ifaces odir maybe_css libdir inst_maps prologue = do +ppHtml title source_url ifaces odir maybe_css libdir inst_maps prologue + do_ms_help = do let css_file = case maybe_css of Nothing -> libdir ++ pathSeparator:cssFile @@ -71,10 +73,15 @@ ppHtml title source_url ifaces odir maybe_css libdir inst_maps prologue = do ppHtmlContents odir title source_url (map fst visible_ifaces) prologue ppHtmlIndex odir title visible_ifaces - ppHHContents odir (map fst visible_ifaces) - ppHHIndex odir visible_ifaces + + -- Generate index and contents page for MS help if requested + when do_ms_help $ do + ppHHContents odir (map fst visible_ifaces) + ppHHIndex odir visible_ifaces + mapM_ (ppHtmlModule odir title source_url inst_maps) visible_ifaces + contentsHtmlFile = "index.html" indexHtmlFile = "doc-index.html" subIndexHtmlFile k a = "doc-index-" ++ k:a:".html" |