aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends/Xhtml.hs
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2014-09-18 13:38:11 -0700
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-12-12 06:39:35 +0000
commit6e95f42907970c9cbb9f6279509a4bf5542ffae4 (patch)
treeb988e9b46bf3417aff4ed799befcf86d2d04d47e /haddock-api/src/Haddock/Backends/Xhtml.hs
parent08332912f745dbd48c6e5fbf0c35e9828600b4db (diff)
Properly render package ID (not package key) in index, fixes #329.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Conflicts: haddock-api/src/Haddock/ModuleTree.hs
Diffstat (limited to 'haddock-api/src/Haddock/Backends/Xhtml.hs')
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml.hs14
1 files changed, 8 insertions, 6 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml.hs b/haddock-api/src/Haddock/Backends/Xhtml.hs
index d1176525..f0651049 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml.hs
@@ -60,7 +60,8 @@ import Module
--------------------------------------------------------------------------------
-ppHtml :: String
+ppHtml :: DynFlags
+ -> String -- ^ Title
-> Maybe String -- ^ Package
-> [Interface]
-> FilePath -- ^ Destination directory
@@ -75,7 +76,7 @@ ppHtml :: String
-> Bool -- ^ Output pretty html (newlines and indenting)
-> IO ()
-ppHtml doctitle maybe_package ifaces odir prologue
+ppHtml dflags doctitle maybe_package ifaces odir prologue
themes maybe_source_url maybe_wiki_url
maybe_contents_url maybe_index_url unicode
qual debug = do
@@ -84,7 +85,7 @@ ppHtml doctitle maybe_package ifaces odir prologue
visible i = OptHide `notElem` ifaceOptions i
when (isNothing maybe_contents_url) $
- ppHtmlContents odir doctitle maybe_package
+ ppHtmlContents dflags odir doctitle maybe_package
themes maybe_index_url maybe_source_url maybe_wiki_url
(map toInstalledIface visible_ifaces)
False -- we don't want to display the packages in a single-package contents
@@ -239,7 +240,8 @@ moduleInfo iface =
ppHtmlContents
- :: FilePath
+ :: DynFlags
+ -> FilePath
-> String
-> Maybe String
-> Themes
@@ -250,10 +252,10 @@ ppHtmlContents
-> Bool
-> Qualification -- ^ How to qualify names
-> IO ()
-ppHtmlContents odir doctitle _maybe_package
+ppHtmlContents dflags odir doctitle _maybe_package
themes maybe_index_url
maybe_source_url maybe_wiki_url ifaces showPkgs prologue debug qual = do
- let tree = mkModuleTree showPkgs
+ let tree = mkModuleTree dflags showPkgs
[(instMod iface, toInstalledDescription iface) | iface <- ifaces]
html =
headHtml doctitle Nothing themes +++