aboutsummaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2010-12-06 14:17:29 +0000
committerDavid Waern <david.waern@gmail.com>2010-12-06 14:17:29 +0000
commitc0c10eda300fa1ecc0c9a8a3fff01c3ba3a4883b (patch)
tree805a38cb60c5d6fd10fe16077768870389c6cf75 /src/Main.hs
parent32eaf3a13f22ff4ecbce395874e2a86f96a96782 (diff)
Add a flag --pretty-html for rendering indented html with newlines
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Main.hs b/src/Main.hs
index 472f56b7..9d056efe 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -30,7 +30,7 @@ import Haddock.Version
import Haddock.InterfaceFile
import Haddock.Options
import Haddock.Utils
-import Haddock.GhcUtils
+import Haddock.GhcUtils hiding (pretty)
import Control.Monad
import Control.Exception
@@ -190,6 +190,7 @@ render flags ifaces installedIfaces srcMap = do
let
title = fromMaybe "" (optTitle flags)
unicode = Flag_UseUnicode `elem` flags
+ pretty = Flag_PrettyHtml `elem` flags
opt_wiki_urls = wikiUrls flags
opt_contents_url = optContentsUrl flags
opt_index_url = optIndexUrl flags
@@ -219,13 +220,13 @@ render flags ifaces installedIfaces srcMap = do
when (Flag_GenIndex `elem` flags) $ do
ppHtmlIndex odir title pkgStr
themes opt_contents_url sourceUrls' opt_wiki_urls
- allVisibleIfaces
+ allVisibleIfaces pretty
copyHtmlBits odir libDir themes
when (Flag_GenContents `elem` flags) $ do
ppHtmlContents odir title pkgStr
themes opt_index_url sourceUrls' opt_wiki_urls
- allVisibleIfaces True prologue
+ allVisibleIfaces True prologue pretty
copyHtmlBits odir libDir themes
when (Flag_Html `elem` flags) $ do
@@ -233,6 +234,7 @@ render flags ifaces installedIfaces srcMap = do
prologue
themes sourceUrls' opt_wiki_urls
opt_contents_url opt_index_url unicode opt_qualification
+ pretty
copyHtmlBits odir libDir themes
when (Flag_Hoogle `elem` flags) $ do