aboutsummaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorMark Lentczner <markl@glyphic.com>2010-03-20 22:30:11 +0000
committerMark Lentczner <markl@glyphic.com>2010-03-20 22:30:11 +0000
commit76ca41c4746073c0dc31acd0fb651d06bca4243f (patch)
tree808a6a1d89252c57e343bdcaff52512fc78b7151 /src/Main.hs
parent8771bb0a27598470f034c93128ac6848180f76b1 (diff)
First, experimental XHTML rendering
switch to using the xhtml package copied Html.hs to Xhtml.hs and split into sub-modules under Haddock/Backends/Xhtml and detabify moved footer into div, got ready for iface change headers converted to semantic markup contents in semantic markup summary as semantic markup description in semantic markup, info block in header fixed factored out rendering so during debug it can be readable (see renderToString)
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 1f4867e4..9a7aa47f 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -19,7 +19,8 @@
module Main (main) where
-import Haddock.Backends.Html
+import qualified Haddock.Backends.Html as Html
+import qualified Haddock.Backends.Xhtml as Xhtml
import Haddock.Backends.Hoogle
import Haddock.Interface
import Haddock.Lex
@@ -224,6 +225,13 @@ render flags ifaces installedIfaces = do
packageStr = Just (modulePackageString packageMod)
(pkgName,pkgVer) = modulePackageInfo packageMod
+ -- which HTML redering to use
+ pick htmlF xhtmlF = if (Flag_Xhtml `elem` flags) then xhtmlF else htmlF
+ ppHtmlIndex = pick Html.ppHtmlIndex Xhtml.ppHtmlIndex
+ ppHtmlHelpFiles = pick Html.ppHtmlHelpFiles Xhtml.ppHtmlHelpFiles
+ ppHtmlContents = pick Html.ppHtmlContents Xhtml.ppHtmlContents
+ ppHtml = pick Html.ppHtml Xhtml.ppHtml
+ copyHtmlBits = pick Html.copyHtmlBits Xhtml.copyHtmlBits
when (Flag_GenIndex `elem` flags) $ do
ppHtmlIndex odir title packageStr maybe_html_help_format