From c9f149c64c44dcc7fa14d30767a205a991510430 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 10 Jul 2002 10:26:11 +0000 Subject: [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). --- src/HaddockHtml.hs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/HaddockHtml.hs') 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" -- cgit v1.2.3