diff options
author | Mark Lentczner <markl@glyphic.com> | 2010-07-23 06:19:35 +0000 |
---|---|---|
committer | Mark Lentczner <markl@glyphic.com> | 2010-07-23 06:19:35 +0000 |
commit | c6eab25b7b9b6b8fb077014de61324416e4f2816 (patch) | |
tree | be0efc955ea8bb9fa5548cfb3cd70f2c8bc9ca07 /src/Main.hs | |
parent | b4f6adb415fdef827e5c48fa2e9ba618ee62ab6d (diff) |
command like processing for theme selection
The bulk of the change is threadnig the selected theme set through functions
in Xhtml.hs so that the selected themes can be used when generating the page
output. There isn't much going on in most of these changes, just passing it
along. The real work is all done in Themes.hs.
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Main.hs b/src/Main.hs index 40b1d42a..b21f5a8b 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -19,6 +19,7 @@ module Main (main) where import Haddock.Backends.Xhtml +import Haddock.Backends.Xhtml.Themes (getThemes) import Haddock.Backends.LaTeX import Haddock.Backends.Hoogle import Haddock.Interface @@ -179,7 +180,6 @@ render flags ifaces installedIfaces = do opt_wiki_urls = optWikiUrls flags opt_contents_url = optContentsUrl flags opt_index_url = optIndexUrl flags - css_file = optCssFile flags odir = outputDir flags opt_latex_style = optLaTeXStyle flags @@ -195,25 +195,26 @@ render flags ifaces installedIfaces = do libDir <- getHaddockLibDir flags prologue <- getPrologue flags + themes <- getThemes libDir flags >>= either bye return when (Flag_GenIndex `elem` flags) $ do ppHtmlIndex odir title packageStr - opt_contents_url opt_source_urls opt_wiki_urls + themes opt_contents_url opt_source_urls opt_wiki_urls allVisibleIfaces - copyHtmlBits odir libDir css_file + copyHtmlBits odir libDir themes when (Flag_GenContents `elem` flags) $ do ppHtmlContents odir title packageStr - opt_index_url opt_source_urls opt_wiki_urls + themes opt_index_url opt_source_urls opt_wiki_urls allVisibleIfaces True prologue - copyHtmlBits odir libDir css_file + copyHtmlBits odir libDir themes when (Flag_Html `elem` flags) $ do ppHtml title packageStr visibleIfaces odir prologue - opt_source_urls opt_wiki_urls + themes opt_source_urls opt_wiki_urls opt_contents_url opt_index_url unicode - copyHtmlBits odir libDir css_file + copyHtmlBits odir libDir themes when (Flag_Hoogle `elem` flags) $ do let pkgName2 = if pkgName == "main" && title /= [] then title else pkgName |