From 64d30b1db8d571bc3b0d8947a81c59b4bd353417 Mon Sep 17 00:00:00 2001 From: krasimir Date: Fri, 30 Jul 2004 22:15:47 +0000 Subject: [haddock @ 2004-07-30 22:15:45 by krasimir] more stuffs - support for separated compilation of packages - the contents page now uses DHTML TreeView - fixed copyFile bug --- src/Main.hs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/Main.hs') diff --git a/src/Main.hs b/src/Main.hs index 1070538b..11ce079d 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -195,6 +195,11 @@ run flags files = do [] -> Nothing us -> Just (last us) + maybe_html_help_format = + case [hhformat | Flag_HtmlHelp hhformat <- flags] of + [] -> Nothing + formats -> Just (last formats) + prologue <- getPrologue flags read_ifaces_s <- mapM readIface (map snd ifaces_to_read) @@ -213,12 +218,15 @@ run flags files = do die ("-h cannot be used with --gen-index or --gen-contents") when (Flag_GenContents `elem` flags) $ do - ppHtmlContents odir title maybe_index_url visible_read_ifaces prologue + ppHtmlContents odir title package maybe_html_help_format maybe_index_url visible_read_ifaces prologue copyHtmlBits odir libdir css_file when (Flag_GenIndex `elem` flags) $ do - ppHtmlIndex odir title maybe_contents_url visible_read_ifaces + ppHtmlIndex odir title package maybe_html_help_format maybe_contents_url visible_read_ifaces copyHtmlBits odir libdir css_file + + when (Flag_GenContents `elem` flags && Flag_GenIndex `elem` flags) $ do + ppHtmlHelpFiles title package visible_read_ifaces odir maybe_html_help_format parsed_mods <- mapM parse_file files @@ -255,11 +263,8 @@ run flags files = do | (mdl, i) <- these_mod_ifaces ]) when (Flag_Html `elem` flags) $ do - let hhformat = case [hhformat | Flag_HtmlHelp hhformat <- flags] of - [] -> Nothing - formats -> Just (last formats) ppHtml title package source_url these_mod_ifaces odir - prologue hhformat + prologue maybe_html_help_format maybe_contents_url maybe_index_url copyHtmlBits odir libdir css_file -- cgit v1.2.3