Fri Sep 3 14:06:25 PDT 2010 John Millikin * Use modified version of "xhtml" library to render compliant HTML 4.01. Fri Sep 3 14:06:36 PDT 2010 John Millikin * Generate valid identifiers for named anchors and group tags. Fri Sep 3 14:09:34 PDT 2010 John Millikin * Support generating XHTML. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 New patches: [Use modified version of "xhtml" library to render compliant HTML 4.01. John Millikin **20100903210625 Ignore-this: 63f15c1faa2b7ab26179ff9b33038d16 ] { hunk ./haddock.cabal 83 pretty, containers, array, - - xhtml >= 3000.2 && < 3000.3, + xhtml >= 3000.3 && < 3000.4, Cabal >= 1.5, ghc >= 6.12 && < 6.16 hunk ./haddock.cabal 143 pretty, containers, array, - - xhtml >= 3000.2 && < 3000.3, + xhtml >= 3000.3 && < 3000.4, Cabal >= 1.5, ghc >= 6.12 && < 6.14 hunk ./src/Haddock/Backends/Xhtml.hs 32 import Haddock.Types import Haddock.Version import Haddock.Utils - -import Text.XHtml hiding ( name, title, p, quote ) +import Text.XHtml hiding ( p ) +import Text.XHtml.Strict hiding ( name, title, quote ) +import Text.XHtml.Transitional (target) import Haddock.GhcUtils import Control.Monad ( when, unless ) hunk ./src/Haddock/Backends/Xhtml.hs 66 -> FilePath -- destination directory -> Maybe (Doc GHC.RdrName) -- prologue text, maybe -> Themes -- themes + -> DocType -- Doctype (HTML or XHTML) -> SourceURLs -- the source URL (--source) -> WikiURLs -- the wiki URL (--wiki) -> Maybe String -- the contents URL (--use-contents) hunk ./src/Haddock/Backends/Xhtml.hs 75 -> IO () ppHtml doctitle maybe_package ifaces odir prologue - - themes maybe_source_url maybe_wiki_url + themes doctype maybe_source_url maybe_wiki_url maybe_contents_url maybe_index_url unicode = do let visible_ifaces = filter visible ifaces hunk ./src/Haddock/Backends/Xhtml.hs 82 visible i = OptHide `notElem` ifaceOptions i when (not (isJust maybe_contents_url)) $ ppHtmlContents odir doctitle maybe_package - - themes maybe_index_url maybe_source_url maybe_wiki_url + themes doctype 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 prologue hunk ./src/Haddock/Backends/Xhtml.hs 89 when (not (isJust maybe_index_url)) $ ppHtmlIndex odir doctitle maybe_package - - themes maybe_contents_url maybe_source_url maybe_wiki_url + themes doctype maybe_contents_url maybe_source_url maybe_wiki_url (map toInstalledIface visible_ifaces) hunk ./src/Haddock/Backends/Xhtml.hs 92 - - mapM_ (ppHtmlModule odir doctitle themes + mapM_ (ppHtmlModule odir doctitle themes doctype maybe_source_url maybe_wiki_url maybe_contents_url maybe_index_url unicode) visible_ifaces hunk ./src/Haddock/Backends/Xhtml.hs 221 -> String -> Maybe String -> Themes + -> DocType -> Maybe String -> SourceURLs -> WikiURLs hunk ./src/Haddock/Backends/Xhtml.hs 228 -> [InstalledInterface] -> Bool -> Maybe (Doc GHC.RdrName) -> IO () ppHtmlContents odir doctitle _maybe_package - - themes maybe_index_url + themes doctype maybe_index_url maybe_source_url maybe_wiki_url ifaces showPkgs prologue = do let tree = mkModuleTree showPkgs [(instMod iface, toInstalledDescription iface) | iface <- ifaces] hunk ./src/Haddock/Backends/Xhtml.hs 241 ppModuleTree tree ] createDirectoryIfMissing True odir - - writeFile (joinPath [odir, contentsHtmlFile]) (renderToString html) + writeHTML (joinPath [odir, contentsHtmlFile]) doctype html -- XXX: think of a better place for this? hunk ./src/Haddock/Backends/Xhtml.hs 244 - - ppHtmlContentsFrame odir doctitle themes ifaces + ppHtmlContentsFrame odir doctitle themes doctype ifaces ppPrologue :: String -> Maybe (Doc GHC.RdrName) -> Html hunk ./src/Haddock/Backends/Xhtml.hs 318 ppHtmlContentsFrame :: FilePath -> String -> Themes - - -> [InstalledInterface] -> IO () - -ppHtmlContentsFrame odir doctitle themes ifaces = do + -> DocType -> [InstalledInterface] -> IO () +ppHtmlContentsFrame odir doctitle themes doctype ifaces = do let mods = flatModuleTree ifaces html = headHtml doctitle Nothing themes +++ hunk ./src/Haddock/Backends/Xhtml.hs 327 (sectionName << "Modules" +++ ulist << [ li ! [theclass "module"] << m | m <- mods ]) createDirectoryIfMissing True odir - - writeFile (joinPath [odir, frameIndexHtmlFile]) (renderToString html) + writeHTML (joinPath [odir, frameIndexHtmlFile]) doctype html -------------------------------------------------------------------------------- hunk ./src/Haddock/Backends/Xhtml.hs 339 -> String -> Maybe String -> Themes + -> DocType -> Maybe String -> SourceURLs -> WikiURLs hunk ./src/Haddock/Backends/Xhtml.hs 345 -> [InstalledInterface] -> IO () - -ppHtmlIndex odir doctitle _maybe_package themes +ppHtmlIndex odir doctitle _maybe_package themes doctype maybe_contents_url maybe_source_url maybe_wiki_url ifaces = do let html = indexPage split_indices Nothing (if split_indices then [] else index) hunk ./src/Haddock/Backends/Xhtml.hs 355 when split_indices $ mapM_ (do_sub_index index) initialChars - - writeFile (joinPath [odir, indexHtmlFile]) (renderToString html) + writeHTML (joinPath [odir, indexHtmlFile]) doctype html where indexPage showLetters ch items = hunk ./src/Haddock/Backends/Xhtml.hs 394 do_sub_index this_ix c = unless (null index_part) $ - - writeFile (joinPath [odir, subIndexHtmlFile c]) (renderToString html) + writeHTML (joinPath [odir, subIndexHtmlFile c]) doctype html where html = indexPage True (Just c) index_part index_part = [(n,stuff) | (n,stuff) <- this_ix, toUpper (head n) == c] hunk ./src/Haddock/Backends/Xhtml.hs 454 ppHtmlModule - - :: FilePath -> String -> Themes + :: FilePath -> String -> Themes -> DocType -> SourceURLs -> WikiURLs -> Maybe String -> Maybe String -> Bool -> Interface -> IO () hunk ./src/Haddock/Backends/Xhtml.hs 458 - -ppHtmlModule odir doctitle themes +ppHtmlModule odir doctitle themes doctype maybe_source_url maybe_wiki_url maybe_contents_url maybe_index_url unicode iface = do let hunk ./src/Haddock/Backends/Xhtml.hs 474 ] createDirectoryIfMissing True odir - - writeFile (joinPath [odir, moduleHtmlFile mdl]) (renderToString html) - - ppHtmlModuleMiniSynopsis odir doctitle themes iface unicode + writeHTML (joinPath [odir, moduleHtmlFile mdl]) doctype html + ppHtmlModuleMiniSynopsis odir doctitle themes doctype iface unicode ppHtmlModuleMiniSynopsis :: FilePath -> String -> Themes hunk ./src/Haddock/Backends/Xhtml.hs 479 - - -> Interface -> Bool -> IO () - -ppHtmlModuleMiniSynopsis odir _doctitle themes iface unicode = do + -> DocType -> Interface -> Bool -> IO () +ppHtmlModuleMiniSynopsis odir _doctitle themes doctype iface unicode = do let mdl = ifaceMod iface html = headHtml (moduleString mdl) Nothing themes +++ hunk ./src/Haddock/Backends/Xhtml.hs 488 (divModuleHeader << sectionName << moduleString mdl +++ miniSynopsis mdl iface unicode) createDirectoryIfMissing True odir - - writeFile (joinPath [odir, "mini_" ++ moduleHtmlFile mdl]) (renderToString html) + writeHTML (joinPath [odir, "mini_" ++ moduleHtmlFile mdl]) doctype html ifaceToHtml :: SourceURLs -> WikiURLs -> Interface -> Bool -> Html hunk ./src/Haddock/Backends/Xhtml/Decl.hs 32 import Control.Monad ( join ) import qualified Data.Map as Map import Data.Maybe - -import Text.XHtml hiding ( name, title, p, quote ) +import Text.XHtml hiding ( p ) import BasicTypes ( IPName(..), Boxity(..) ) import GHC hunk ./src/Haddock/Backends/Xhtml/DocMarkup.hs 28 import Haddock.Types import Haddock.Utils - -import Text.XHtml hiding ( name, title, p, quote ) +import Text.XHtml hiding ( p ) +import Text.XHtml.Strict hiding ( name, title, quote ) import GHC import Name hunk ./src/Haddock/Backends/Xhtml/Layout.hs 46 import Haddock.Utils (makeAnchorId) import qualified Data.Map as Map - -import Text.XHtml hiding ( name, title, p, quote ) +import Text.XHtml hiding ( p ) +import Text.XHtml.Strict hiding ( name, title, quote ) import FastString ( unpackFS ) import GHC hunk ./src/Haddock/Backends/Xhtml/Names.hs 26 import Haddock.Types import Haddock.Utils - -import Text.XHtml hiding ( name, title, p, quote ) +import Text.XHtml hiding ( p ) +import Text.XHtml.Strict hiding ( name, title, quote ) import GHC import Name hunk ./src/Haddock/Backends/Xhtml/Themes.hs 29 import System.Directory import System.FilePath - -import Text.XHtml hiding ( name, title, p, quote, () ) - -import qualified Text.XHtml as XHtml +import Text.XHtml hiding ( p, () ) +import Text.XHtml.Strict hiding ( name, title, quote ) +import qualified Text.XHtml.Strict as XHtml -------------------------------------------------------------------------------- hunk ./src/Haddock/Backends/Xhtml/Utils.hs 28 hsep, collapseSection, collapseToggle, collapseControl, + writeHTML ) where hunk ./src/Haddock/Backends/Xhtml/Utils.hs 37 import Data.Maybe - -import Text.XHtml hiding ( name, title, p, quote ) - -import qualified Text.XHtml as XHtml +import Text.XHtml hiding ( p ) +import Text.XHtml.Strict hiding ( name, title, quote ) +import qualified Text.XHtml.Strict as XHtml import GHC ( SrcSpan, srcSpanStartLine, Name ) import Module ( Module ) hunk ./src/Haddock/Backends/Xhtml/Utils.hs 45 import Name ( getOccString, nameOccName, isValOcc ) +#if MIN_VERSION_base(4,2,0) +import System.IO ( withFile, IOMode (..), hSetEncoding, hPutStr, utf8) +#endif + spliceURL :: Maybe FilePath -> Maybe Module -> Maybe GHC.Name -> Maybe SrcSpan -> String -> String hunk ./src/Haddock/Backends/Xhtml/Utils.hs 93 run (c:rest) = c : run rest - -renderToString :: Html -> String +renderToString :: DocType -> Html -> String renderToString = showHtml -- for production --renderToString = prettyHtml -- for debugging hunk ./src/Haddock/Backends/Xhtml/Utils.hs 208 pick :: Bool -> a -> a -> a pick True t _ = t pick False _ f = f + +-- | Renders HTML to a string, and tries to write it to a file in UTF8. +-- On systems without encoding-aware handles, just uses 'writeFile'. +writeHTML :: FilePath -> DocType -> Html -> IO () +writeHTML path doctype html = writeUTF8 path string + where + string = renderToString doctype html + +writeUTF8 :: FilePath -> String -> IO () +#if MIN_VERSION_base(4,2,0) +writeUTF8 path str = withFile path WriteMode $ \h -> do + hSetEncoding h utf8 + hPutStr h str +#else +writeUTF8 = writeFile +#endif hunk ./src/Haddock/Options.hs 96 -- Option ['S'] ["docbook"] (NoArg Flag_DocBook) -- "output in DocBook XML", Option ['h'] ["html"] (NoArg Flag_Html) - - "output in HTML (XHTML 1.0)", + "output in HTML (HTML 4.01)", Option [] ["latex"] (NoArg Flag_LaTeX) "use experimental LaTeX rendering", Option [] ["latex-style"] (ReqArg Flag_LaTeXStyle "FILE") "provide your own LaTeX style in FILE", Option ['U'] ["use-unicode"] (NoArg Flag_UseUnicode) "use Unicode in HTML output", hunk ./src/Main.hs 43 import System.IO import System.Exit import System.Environment +import Text.XHtml.Strict (html4_strict) #if defined(mingw32_HOST_OS) import Foreign hunk ./src/Main.hs 196 opt_index_url = optIndexUrl flags odir = outputDir flags opt_latex_style = optLaTeXStyle flags + opt_doctype = html4_strict visibleIfaces = [ i | i <- ifaces, OptHide `notElem` ifaceOptions i ] hunk ./src/Main.hs 219 when (Flag_GenIndex `elem` flags) $ do ppHtmlIndex odir title pkgStr - - themes opt_contents_url sourceUrls' opt_wiki_urls + themes opt_doctype opt_contents_url sourceUrls' opt_wiki_urls allVisibleIfaces copyHtmlBits odir libDir themes hunk ./src/Main.hs 225 when (Flag_GenContents `elem` flags) $ do ppHtmlContents odir title pkgStr - - themes opt_index_url sourceUrls' opt_wiki_urls + themes opt_doctype opt_index_url sourceUrls' opt_wiki_urls allVisibleIfaces True prologue copyHtmlBits odir libDir themes hunk ./src/Main.hs 232 when (Flag_Html `elem` flags) $ do ppHtml title pkgStr visibleIfaces odir prologue - - themes sourceUrls' opt_wiki_urls + themes opt_doctype sourceUrls' opt_wiki_urls opt_contents_url opt_index_url unicode copyHtmlBits odir libDir themes } [Generate valid identifiers for named anchors and group tags. John Millikin **20100903210636 Ignore-this: 1690f829b7560b3d670150af8cff800c ] { hunk ./src/Haddock/Backends/Xhtml.hs 622 processExport :: Bool -> LinksInfo -> Bool -> (ExportItem DocName) -> Maybe Html processExport summary _ _ (ExportGroup lev id0 doc) - - = nothingIf summary $ groupTag lev ! [identifier id0] << docToHtml doc + = nothingIf summary $ groupTag lev ! [identifier $ "group-" ++ id0] << docToHtml doc processExport summary links unicode (ExportDecl decl doc subdocs insts) = processDecl summary $ ppDecl summary links decl doc insts subdocs unicode processExport summary _ _ (ExportNoDecl y []) hunk ./src/Haddock/Backends/Xhtml/Utils.hs 174 -- | Generate a named anchor namedAnchor :: String -> Html -> Html - -namedAnchor n = anchor ! [XHtml.name n] +namedAnchor n = anchor ! [XHtml.identifier n] linkedAnchor :: String -> Html -> Html } [Support generating XHTML. John Millikin **20100903210934 Ignore-this: ac91e8e2240080f8e729d775c8354d61 ] { hunk ./haddock.cabal 54 data-files: html/frames.html + html/frames.xhtml html/haddock-util.js html/Classic.theme/haskell_icon.gif html/Classic.theme/minus.gif hunk ./html/frames.html 2 - - + PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" + "http://www.w3.org/TR/html4/frameset.dtd"> + + + + + + + + + hunk ./html/haddock-util.js 235 function reframe() { setCookie("haddock-reframe", document.URL); - - window.location = "frames.html"; + if (document.xmlVersion) { + window.location = "frames.xhtml"; + } + else { + window.location = "frames.html"; + } } function postReframe() { hunk ./src/Haddock/Backends/Xhtml.hs 97 maybe_contents_url maybe_index_url unicode) visible_ifaces - -copyHtmlBits :: FilePath -> FilePath -> Themes -> IO () - -copyHtmlBits odir libdir themes = do +copyHtmlBits :: String -> FilePath -> FilePath -> Themes -> IO () +copyHtmlBits ext odir libdir themes = do let libhtmldir = joinPath [libdir, "html"] copyCssFile f = do hunk ./src/Haddock/Backends/Xhtml.hs 106 copyLibFile f = do copyFile (joinPath [libhtmldir, f]) (joinPath [odir, f]) mapM_ copyCssFile (cssFiles themes) - - mapM_ copyLibFile [ jsFile, framesFile ] + mapM_ copyLibFile [ jsFile, framesFile ext ] headHtml :: String -> Maybe String -> Themes -> Html hunk ./src/Haddock/Backends/Xhtml.hs 151 Nothing - -contentsButton :: Maybe String -> Maybe Html - -contentsButton maybe_contents_url +contentsButton :: String -> Maybe String -> Maybe Html +contentsButton ext maybe_contents_url = Just (anchor ! [href url] << "Contents") hunk ./src/Haddock/Backends/Xhtml.hs 154 - - where url = maybe contentsHtmlFile id maybe_contents_url + where url = maybe (contentsHtmlFile ext) id maybe_contents_url hunk ./src/Haddock/Backends/Xhtml.hs 157 - -indexButton :: Maybe String -> Maybe Html - -indexButton maybe_index_url +indexButton :: String -> Maybe String -> Maybe Html +indexButton ext maybe_index_url = Just (anchor ! [href url] << "Index") hunk ./src/Haddock/Backends/Xhtml.hs 160 - - where url = maybe indexHtmlFile id maybe_index_url + where url = maybe (indexHtmlFile ext) id maybe_index_url hunk ./src/Haddock/Backends/Xhtml.hs 163 - -bodyHtml :: String -> Maybe Interface +bodyHtml :: String -> Maybe Interface -> DocType -> SourceURLs -> WikiURLs -> Maybe String -> Maybe String -> Html -> Html hunk ./src/Haddock/Backends/Xhtml.hs 167 - -bodyHtml doctitle iface +bodyHtml doctitle iface doctype maybe_source_url maybe_wiki_url maybe_contents_url maybe_index_url pageContent = hunk ./src/Haddock/Backends/Xhtml.hs 171 + let ext = doctypeExtension doctype in body << [ divPackageHeader << [ unordList (catMaybes [ hunk ./src/Haddock/Backends/Xhtml.hs 177 srcButton maybe_source_url iface, wikiButton maybe_wiki_url (ifaceMod `fmap` iface), - - contentsButton maybe_contents_url, - - indexButton maybe_index_url]) + contentsButton ext maybe_contents_url, + indexButton ext maybe_index_url]) ! [theclass "links", identifier "page-menu"], nonEmpty sectionName << doctitle ], hunk ./src/Haddock/Backends/Xhtml.hs 233 maybe_source_url maybe_wiki_url ifaces showPkgs prologue = do let tree = mkModuleTree showPkgs [(instMod iface, toInstalledDescription iface) | iface <- ifaces] + ext = doctypeExtension doctype html = headHtml doctitle Nothing themes +++ hunk ./src/Haddock/Backends/Xhtml.hs 236 - - bodyHtml doctitle Nothing + bodyHtml doctitle Nothing doctype maybe_source_url maybe_wiki_url Nothing maybe_index_url << [ hunk ./src/Haddock/Backends/Xhtml.hs 239 - - ppPrologue doctitle prologue, - - ppModuleTree tree + ppPrologue doctitle ext prologue, + ppModuleTree ext tree ] createDirectoryIfMissing True odir hunk ./src/Haddock/Backends/Xhtml.hs 243 - - writeHTML (joinPath [odir, contentsHtmlFile]) doctype html + writeHTML (joinPath [odir, contentsHtmlFile ext]) doctype html -- XXX: think of a better place for this? ppHtmlContentsFrame odir doctitle themes doctype ifaces hunk ./src/Haddock/Backends/Xhtml.hs 249 - -ppPrologue :: String -> Maybe (Doc GHC.RdrName) -> Html - -ppPrologue _ Nothing = noHtml - -ppPrologue title (Just doc) = - - docElement divDescription << (h1 << title +++ rdrDocToHtml doc) +ppPrologue :: String -> String -> Maybe (Doc GHC.RdrName) -> Html +ppPrologue _ _ Nothing = noHtml +ppPrologue title ext (Just doc) = + docElement divDescription << (h1 << title +++ rdrDocToHtml ext doc) hunk ./src/Haddock/Backends/Xhtml.hs 255 - -ppModuleTree :: [ModuleTree] -> Html - -ppModuleTree ts = - - divModuleList << (sectionName << "Modules" +++ mkNodeList [] "n" ts) +ppModuleTree :: String -> [ModuleTree] -> Html +ppModuleTree ext ts = + divModuleList << (sectionName << "Modules" +++ mkNodeList ext [] "n" ts) hunk ./src/Haddock/Backends/Xhtml.hs 260 - -mkNodeList :: [String] -> String -> [ModuleTree] -> Html - -mkNodeList ss p ts = case ts of +mkNodeList :: String -> [String] -> String -> [ModuleTree] -> Html +mkNodeList ext ss p ts = case ts of [] -> noHtml hunk ./src/Haddock/Backends/Xhtml.hs 263 - - _ -> unordList (zipWith (mkNode ss) ps ts) + _ -> unordList (zipWith (mkNode ext ss) ps ts) where ps = [ p ++ '.' : show i | i <- [(1::Int)..]] hunk ./src/Haddock/Backends/Xhtml.hs 268 - -mkNode :: [String] -> String -> ModuleTree -> Html - -mkNode ss p (Node s leaf pkg short ts) = +mkNode :: String -> [String] -> String -> ModuleTree -> Html +mkNode ext ss p (Node s leaf pkg short ts) = htmlModule +++ shortDescr +++ htmlPkg +++ subtree where modAttrs = case (ts, leaf) of hunk ./src/Haddock/Backends/Xhtml.hs 285 htmlModule = thespan ! modAttrs << (cBtn +++ if leaf - - then ppModule (mkModule (stringToPackageId (fromMaybe "" pkg)) + then ppModule ext (mkModule (stringToPackageId (fromMaybe "" pkg)) (mkModuleName mdl)) else toHtml s ) hunk ./src/Haddock/Backends/Xhtml.hs 292 mdl = intercalate "." (reverse (s:ss)) - - shortDescr = maybe noHtml origDocToHtml short + shortDescr = maybe noHtml (origDocToHtml ext) short htmlPkg = maybe noHtml (thespan ! [theclass "package"] <<) pkg hunk ./src/Haddock/Backends/Xhtml.hs 295 - - subtree = mkNodeList (s:ss) p ts ! collapseSection p True "" + subtree = mkNodeList ext (s:ss) p ts ! collapseSection p True "" -- | Turn a module tree into a flat list of full module names. E.g., hunk ./src/Haddock/Backends/Xhtml.hs 306 -- @ -- becomes -- @["A", "A.B", "A.B.C"]@ - -flatModuleTree :: [InstalledInterface] -> [Html] - -flatModuleTree ifaces = +flatModuleTree :: DocType -> [InstalledInterface] -> [Html] +flatModuleTree doctype ifaces = map (uncurry ppModule' . head) . groupBy ((==) `on` fst) . sortBy (comparing fst) hunk ./src/Haddock/Backends/Xhtml.hs 314 $ mods where mods = [ (moduleString mdl, mdl) | mdl <- map instMod ifaces ] + ext = doctypeExtension doctype ppModule' txt mdl = hunk ./src/Haddock/Backends/Xhtml.hs 316 - - anchor ! [href ((moduleHtmlFile mdl)), target mainFrameName] + anchor ! [href ((moduleHtmlFile ext mdl)), target mainFrameName] << toHtml txt hunk ./src/Haddock/Backends/Xhtml.hs 323 ppHtmlContentsFrame :: FilePath -> String -> Themes -> DocType -> [InstalledInterface] -> IO () ppHtmlContentsFrame odir doctitle themes doctype ifaces = do - - let mods = flatModuleTree ifaces + let mods = flatModuleTree doctype ifaces + ext = doctypeExtension doctype html = headHtml doctitle Nothing themes +++ miniBody << divModuleList << hunk ./src/Haddock/Backends/Xhtml.hs 331 (sectionName << "Modules" +++ ulist << [ li ! [theclass "module"] << m | m <- mods ]) createDirectoryIfMissing True odir - - writeHTML (joinPath [odir, frameIndexHtmlFile]) doctype html + writeHTML (joinPath [odir, frameIndexHtmlFile ext]) doctype html -------------------------------------------------------------------------------- hunk ./src/Haddock/Backends/Xhtml.hs 359 when split_indices $ mapM_ (do_sub_index index) initialChars - - writeHTML (joinPath [odir, indexHtmlFile]) doctype html + writeHTML (joinPath [odir, indexHtmlFile ext]) doctype html where indexPage showLetters ch items = hunk ./src/Haddock/Backends/Xhtml.hs 364 headHtml (doctitle ++ " (" ++ indexName ch ++ ")") Nothing themes +++ - - bodyHtml doctitle Nothing + bodyHtml doctitle Nothing doctype maybe_source_url maybe_wiki_url maybe_contents_url Nothing << [ if showLetters then indexInitialLetterLinks else noHtml, hunk ./src/Haddock/Backends/Xhtml.hs 385 indexInitialLetterLinks = divAlphabet << - - unordList [ anchor ! [href (subIndexHtmlFile c)] << [c] + unordList [ anchor ! [href (subIndexHtmlFile ext c)] << [c] | c <- initialChars , any ((==c) . toUpper . head . fst) index ] hunk ./src/Haddock/Backends/Xhtml.hs 398 do_sub_index this_ix c = unless (null index_part) $ - - writeHTML (joinPath [odir, subIndexHtmlFile c]) doctype html + writeHTML (joinPath [odir, subIndexHtmlFile ext c]) doctype html where html = indexPage True (Just c) index_part index_part = [(n,stuff) | (n,stuff) <- this_ix, toUpper (head n) == c] hunk ./src/Haddock/Backends/Xhtml.hs 442 | isDataOcc n = toHtml "Data Constructor" | otherwise = toHtml "Function" + ext = doctypeExtension doctype indexLinks nm entries = td ! [ theclass "module" ] << hsep (punctuate comma hunk ./src/Haddock/Backends/Xhtml.hs 447 [ if visible then - - linkId mdl (Just nm) << toHtml (moduleString mdl) + linkId ext mdl (Just nm) << toHtml (moduleString mdl) else toHtml (moduleString mdl) | (mdl, visible) <- entries ]) hunk ./src/Haddock/Backends/Xhtml.hs 469 let mdl = ifaceMod iface mdl_str = moduleString mdl + ext = doctypeExtension doctype html = hunk ./src/Haddock/Backends/Xhtml.hs 471 - - headHtml mdl_str (Just $ "mini_" ++ moduleHtmlFile mdl) themes +++ - - bodyHtml doctitle (Just iface) + headHtml mdl_str (Just $ "mini_" ++ moduleHtmlFile ext mdl) themes +++ + bodyHtml doctitle (Just iface) doctype maybe_source_url maybe_wiki_url maybe_contents_url maybe_index_url << [ divModuleHeader << (moduleInfo iface +++ (sectionName << mdl_str)), hunk ./src/Haddock/Backends/Xhtml.hs 476 - - ifaceToHtml maybe_source_url maybe_wiki_url iface unicode + ifaceToHtml ext maybe_source_url maybe_wiki_url iface unicode ] createDirectoryIfMissing True odir hunk ./src/Haddock/Backends/Xhtml.hs 480 - - writeHTML (joinPath [odir, moduleHtmlFile mdl]) doctype html + writeHTML (joinPath [odir, moduleHtmlFile ext mdl]) doctype html ppHtmlModuleMiniSynopsis odir doctitle themes doctype iface unicode hunk ./src/Haddock/Backends/Xhtml.hs 488 -> DocType -> Interface -> Bool -> IO () ppHtmlModuleMiniSynopsis odir _doctitle themes doctype iface unicode = do let mdl = ifaceMod iface + ext = doctypeExtension doctype html = headHtml (moduleString mdl) Nothing themes +++ miniBody << hunk ./src/Haddock/Backends/Xhtml.hs 493 (divModuleHeader << sectionName << moduleString mdl +++ - - miniSynopsis mdl iface unicode) + miniSynopsis ext mdl iface unicode) createDirectoryIfMissing True odir hunk ./src/Haddock/Backends/Xhtml.hs 495 - - writeHTML (joinPath [odir, "mini_" ++ moduleHtmlFile mdl]) doctype html + writeHTML (joinPath [odir, "mini_" ++ moduleHtmlFile ext mdl]) doctype html hunk ./src/Haddock/Backends/Xhtml.hs 498 - -ifaceToHtml :: SourceURLs -> WikiURLs -> Interface -> Bool -> Html - -ifaceToHtml maybe_source_url maybe_wiki_url iface unicode - - = ppModuleContents exports +++ +ifaceToHtml :: String -> SourceURLs -> WikiURLs -> Interface -> Bool -> Html +ifaceToHtml ext maybe_source_url maybe_wiki_url iface unicode + = ppModuleContents ext exports +++ description +++ synopsis +++ divInterface (maybe_doc_hdr +++ bdy) hunk ./src/Haddock/Backends/Xhtml.hs 520 = case ifaceRnDoc iface of Nothing -> noHtml Just doc -> divDescription $ - - sectionName << "Description" +++ docSection doc + sectionName << "Description" +++ docSection ext doc -- omit the synopsis if there are no documentation annotations at all synopsis hunk ./src/Haddock/Backends/Xhtml.hs 529 = divSynposis $ paragraph ! collapseControl "syn" False "caption" << "Synopsis" +++ shortDeclList ( - - mapMaybe (processExport True linksInfo unicode) exports + mapMaybe (processExport ext True linksInfo unicode) exports ) ! (collapseSection "syn" False "" ++ collapseToggle "syn") -- if the documentation doesn't begin with a section header, then hunk ./src/Haddock/Backends/Xhtml.hs 542 bdy = foldr (+++) noHtml $ - - mapMaybe (processExport False linksInfo unicode) exports + mapMaybe (processExport ext False linksInfo unicode) exports linksInfo = (maybe_source_url, maybe_wiki_url) hunk ./src/Haddock/Backends/Xhtml.hs 547 - -miniSynopsis :: Module -> Interface -> Bool -> Html - -miniSynopsis mdl iface unicode = - - divInterface << mapMaybe (processForMiniSynopsis mdl unicode) exports +miniSynopsis :: String -> Module -> Interface -> Bool -> Html +miniSynopsis ext mdl iface unicode = + divInterface << mapMaybe (processForMiniSynopsis ext mdl unicode) exports where exports = numberSectionHeadings (ifaceRnExportItems iface) hunk ./src/Haddock/Backends/Xhtml.hs 554 - -processForMiniSynopsis :: Module -> Bool -> ExportItem DocName -> Maybe Html - -processForMiniSynopsis mdl unicode (ExportDecl (L _loc decl0) _doc _ _insts) = +processForMiniSynopsis :: String -> Module -> Bool -> ExportItem DocName -> Maybe Html +processForMiniSynopsis ext mdl unicode (ExportDecl (L _loc decl0) _doc _ _insts) = ((divTopDecl <<).(declElem <<)) `fmap` case decl0 of hunk ./src/Haddock/Backends/Xhtml.hs 557 - - TyClD d -> let b = ppTyClBinderWithVarsMini mdl d in case d of + TyClD d -> let b = ppTyClBinderWithVarsMini ext mdl d in case d of (TyFamily{}) -> Just $ ppTyFamHeader True False d unicode (TyData{tcdTyPats = ps}) | Nothing <- ps -> Just $ keyword "data" <+> b hunk ./src/Haddock/Backends/Xhtml.hs 568 (ClassDecl {}) -> Just $ keyword "class" <+> b _ -> Nothing SigD (TypeSig (L _ n) (L _ _)) -> - - Just $ ppNameMini mdl (docNameOcc n) + Just $ ppNameMini ext mdl (docNameOcc n) _ -> Nothing hunk ./src/Haddock/Backends/Xhtml.hs 570 - -processForMiniSynopsis _ _ (ExportGroup lvl _id txt) = - - Just $ groupTag lvl << docToHtml txt - -processForMiniSynopsis _ _ _ = Nothing +processForMiniSynopsis ext _ _ (ExportGroup lvl _id txt) = + Just $ groupTag lvl << docToHtml ext txt +processForMiniSynopsis _ _ _ _ = Nothing hunk ./src/Haddock/Backends/Xhtml.hs 575 - -ppNameMini :: Module -> OccName -> Html - -ppNameMini mdl nm = - - anchor ! [ href (moduleNameUrl mdl nm) +ppNameMini :: String -> Module -> OccName -> Html +ppNameMini ext mdl nm = + anchor ! [ href (moduleNameUrl ext mdl nm) , target mainFrameName ] << ppBinder' nm hunk ./src/Haddock/Backends/Xhtml.hs 582 - -ppTyClBinderWithVarsMini :: Module -> TyClDecl DocName -> Html - -ppTyClBinderWithVarsMini mdl decl = +ppTyClBinderWithVarsMini :: String -> Module -> TyClDecl DocName -> Html +ppTyClBinderWithVarsMini ext mdl decl = let n = unLoc $ tcdLName decl ns = tyvarNames $ tcdTyVars decl hunk ./src/Haddock/Backends/Xhtml.hs 586 - - in ppTypeApp n ns (ppNameMini mdl . docNameOcc) ppTyName + in ppTypeApp n ns (ppNameMini ext mdl . docNameOcc) ppTyName hunk ./src/Haddock/Backends/Xhtml.hs 589 - -ppModuleContents :: [ExportItem DocName] -> Html - -ppModuleContents exports +ppModuleContents :: String -> [ExportItem DocName] -> Html +ppModuleContents ext exports | null sections = noHtml | otherwise = contentsDiv where hunk ./src/Haddock/Backends/Xhtml.hs 606 | lev <= n = ( [], items ) | otherwise = ( html:secs, rest2 ) where - - html = linkedAnchor id0 << docToHtml doc +++ mk_subsections ssecs + html = linkedAnchor id0 << docToHtml ext doc +++ mk_subsections ssecs (ssecs, rest1) = process lev rest (secs, rest2) = process n rest1 process n (_ : rest) = process n rest hunk ./src/Haddock/Backends/Xhtml.hs 627 = other : go n es - -processExport :: Bool -> LinksInfo -> Bool -> (ExportItem DocName) -> Maybe Html - -processExport summary _ _ (ExportGroup lev id0 doc) - - = nothingIf summary $ groupTag lev ! [identifier $ "group-" ++ id0] << docToHtml doc - -processExport summary links unicode (ExportDecl decl doc subdocs insts) - - = processDecl summary $ ppDecl summary links decl doc insts subdocs unicode - -processExport summary _ _ (ExportNoDecl y []) - - = processDeclOneLiner summary $ ppDocName y - -processExport summary _ _ (ExportNoDecl y subs) - - = processDeclOneLiner summary $ ppDocName y +++ parenList (map ppDocName subs) - -processExport summary _ _ (ExportDoc doc) - - = nothingIf summary $ docSection doc - -processExport summary _ _ (ExportModule mdl) - - = processDeclOneLiner summary $ toHtml "module" <+> ppModule mdl +processExport :: String -> Bool -> LinksInfo -> Bool -> (ExportItem DocName) -> Maybe Html +processExport ext summary _ _ (ExportGroup lev id0 doc) + = nothingIf summary $ groupTag lev ! [identifier $ "group-" ++ id0] << docToHtml ext doc +processExport ext summary links unicode (ExportDecl decl doc subdocs insts) + = processDecl summary $ ppDecl summary links decl doc insts subdocs unicode ext +processExport ext summary _ _ (ExportNoDecl y []) + = processDeclOneLiner summary $ ppDocName ext y +processExport ext summary _ _ (ExportNoDecl y subs) + = processDeclOneLiner summary $ ppDocName ext y +++ parenList (map (ppDocName ext) subs) +processExport ext summary _ _ (ExportDoc doc) + = nothingIf summary $ docSection ext doc +processExport ext summary _ _ (ExportModule mdl) + = processDeclOneLiner summary $ toHtml "module" <+> ppModule ext mdl nothingIf :: Bool -> a -> Maybe a hunk ./src/Haddock/Backends/Xhtml/Decl.hs 42 -- TODO: use DeclInfo DocName or something ppDecl :: Bool -> LinksInfo -> LHsDecl DocName -> - - DocForDecl DocName -> [DocInstance DocName] -> [(DocName, DocForDecl DocName)] -> Bool -> Html - -ppDecl summ links (L loc decl) (mbDoc, fnArgsDoc) instances subdocs unicode = case decl of - - TyClD d@(TyFamily {}) -> ppTyFam summ False links loc mbDoc d unicode + DocForDecl DocName -> [DocInstance DocName] -> [(DocName, DocForDecl DocName)] -> Bool -> String -> Html +ppDecl summ links (L loc decl) (mbDoc, fnArgsDoc) instances subdocs unicode ext = case decl of + TyClD d@(TyFamily {}) -> ppTyFam summ False links loc mbDoc d unicode ext TyClD d@(TyData {}) hunk ./src/Haddock/Backends/Xhtml/Decl.hs 46 - - | Nothing <- tcdTyPats d -> ppDataDecl summ links instances subdocs loc mbDoc d unicode + | Nothing <- tcdTyPats d -> ppDataDecl summ links instances subdocs loc mbDoc d unicode ext | Just _ <- tcdTyPats d -> ppDataInst summ links loc mbDoc d TyClD d@(TySynonym {}) hunk ./src/Haddock/Backends/Xhtml/Decl.hs 49 - - | Nothing <- tcdTyPats d -> ppTySyn summ links loc (mbDoc, fnArgsDoc) d unicode - - | Just _ <- tcdTyPats d -> ppTyInst summ False links loc mbDoc d unicode - - TyClD d@(ClassDecl {}) -> ppClassDecl summ links instances loc mbDoc subdocs d unicode - - SigD (TypeSig (L _ n) (L _ t)) -> ppFunSig summ links loc (mbDoc, fnArgsDoc) n t unicode - - ForD d -> ppFor summ links loc (mbDoc, fnArgsDoc) d unicode + | Nothing <- tcdTyPats d -> ppTySyn summ links loc (mbDoc, fnArgsDoc) d unicode ext + | Just _ <- tcdTyPats d -> ppTyInst summ False links loc mbDoc d unicode ext + TyClD d@(ClassDecl {}) -> ppClassDecl summ links instances loc mbDoc subdocs d unicode ext + SigD (TypeSig (L _ n) (L _ t)) -> ppFunSig summ links loc (mbDoc, fnArgsDoc) n t unicode ext + ForD d -> ppFor summ links loc (mbDoc, fnArgsDoc) d unicode ext InstD _ -> noHtml _ -> error "declaration not supported by ppDecl" hunk ./src/Haddock/Backends/Xhtml/Decl.hs 59 ppFunSig :: Bool -> LinksInfo -> SrcSpan -> DocForDecl DocName -> - - DocName -> HsType DocName -> Bool -> Html - -ppFunSig summary links loc doc docname typ unicode = + DocName -> HsType DocName -> Bool -> String -> Html +ppFunSig summary links loc doc docname typ unicode ext = ppTypeOrFunSig summary links loc docname typ doc hunk ./src/Haddock/Backends/Xhtml/Decl.hs 62 - - (ppTypeSig summary occname typ unicode, ppBinder False occname, dcolon unicode) unicode + (ppTypeSig summary occname typ unicode ext, ppBinder False occname, dcolon unicode) unicode ext where occname = docNameOcc docname hunk ./src/Haddock/Backends/Xhtml/Decl.hs 68 ppTypeOrFunSig :: Bool -> LinksInfo -> SrcSpan -> DocName -> HsType DocName -> - - DocForDecl DocName -> (Html, Html, Html) -> Bool -> Html - -ppTypeOrFunSig summary links loc docname typ (doc, argDocs) (pref1, pref2, sep) unicode + DocForDecl DocName -> (Html, Html, Html) -> Bool -> String -> Html +ppTypeOrFunSig summary links loc docname typ (doc, argDocs) (pref1, pref2, sep) unicode ext | summary = pref1 hunk ./src/Haddock/Backends/Xhtml/Decl.hs 71 - - | Map.null argDocs = topDeclElem links loc docname pref1 +++ maybeDocSection doc + | Map.null argDocs = topDeclElem links loc docname pref1 +++ maybeDocSection ext doc | otherwise = topDeclElem links loc docname pref2 +++ hunk ./src/Haddock/Backends/Xhtml/Decl.hs 73 - - subArguments (do_args 0 sep typ) +++ maybeDocSection doc + subArguments ext (do_args 0 sep typ) +++ maybeDocSection ext doc where argDoc n = Map.lookup n argDocs hunk ./src/Haddock/Backends/Xhtml/Decl.hs 82 do_args n leader (HsForAllTy Explicit tvs lctxt ltype) = (leader <+> hsep (forallSymbol unicode : ppTyVars tvs ++ [dot]) <+> - - ppLContextNoArrow lctxt unicode, + ppLContextNoArrow lctxt unicode ext, Nothing, []) : do_largs n (darrow unicode) ltype do_args n leader (HsForAllTy Implicit _ lctxt ltype) hunk ./src/Haddock/Backends/Xhtml/Decl.hs 87 | not (null (unLoc lctxt)) - - = (leader <+> ppLContextNoArrow lctxt unicode, + = (leader <+> ppLContextNoArrow lctxt unicode ext, Nothing, []) : do_largs n (darrow unicode) ltype -- if we're not showing any 'forall' or class constraints or hunk ./src/Haddock/Backends/Xhtml/Decl.hs 95 | otherwise = do_largs n leader ltype do_args n leader (HsFunTy lt r) - - = (leader <+> ppLFunLhType unicode lt, argDoc n, []) + = (leader <+> ppLFunLhType unicode ext lt, argDoc n, []) : do_largs (n+1) (arrow unicode) r do_args n leader t hunk ./src/Haddock/Backends/Xhtml/Decl.hs 98 - - = (leader <+> ppType unicode t, argDoc n, []) : [] + = (leader <+> ppType unicode ext t, argDoc n, []) : [] ppTyVars :: [LHsTyVarBndr DocName] -> [Html] hunk ./src/Haddock/Backends/Xhtml/Decl.hs 109 tyvarNames = map (getName . hsTyVarName . unLoc) - -ppFor :: Bool -> LinksInfo -> SrcSpan -> DocForDecl DocName -> ForeignDecl DocName -> Bool -> Html - -ppFor summary links loc doc (ForeignImport (L _ name) (L _ typ) _) unicode - - = ppFunSig summary links loc doc name typ unicode - -ppFor _ _ _ _ _ _ = error "ppFor" +ppFor :: Bool -> LinksInfo -> SrcSpan -> DocForDecl DocName -> ForeignDecl DocName -> Bool -> String -> Html +ppFor summary links loc doc (ForeignImport (L _ name) (L _ typ) _) unicode ext + = ppFunSig summary links loc doc name typ unicode ext +ppFor _ _ _ _ _ _ _ = error "ppFor" -- we skip type patterns for now hunk ./src/Haddock/Backends/Xhtml/Decl.hs 116 - -ppTySyn :: Bool -> LinksInfo -> SrcSpan -> DocForDecl DocName -> TyClDecl DocName -> Bool -> Html - -ppTySyn summary links loc doc (TySynonym (L _ name) ltyvars _ ltype) unicode +ppTySyn :: Bool -> LinksInfo -> SrcSpan -> DocForDecl DocName -> TyClDecl DocName -> Bool -> String -> Html +ppTySyn summary links loc doc (TySynonym (L _ name) ltyvars _ ltype) unicode ext = ppTypeOrFunSig summary links loc name (unLoc ltype) doc hunk ./src/Haddock/Backends/Xhtml/Decl.hs 119 - - (full, hdr, spaceHtml +++ equals) unicode + (full, hdr, spaceHtml +++ equals) unicode ext where hdr = hsep ([keyword "type", ppBinder summary occ] ++ ppTyVars ltyvars) hunk ./src/Haddock/Backends/Xhtml/Decl.hs 122 - - full = hdr <+> equals <+> ppLType unicode ltype + full = hdr <+> equals <+> ppLType unicode ext ltype occ = docNameOcc name hunk ./src/Haddock/Backends/Xhtml/Decl.hs 124 - -ppTySyn _ _ _ _ _ _ = error "declaration not supported by ppTySyn" +ppTySyn _ _ _ _ _ _ _ = error "declaration not supported by ppTySyn" hunk ./src/Haddock/Backends/Xhtml/Decl.hs 127 - -ppTypeSig :: Bool -> OccName -> HsType DocName -> Bool -> Html - -ppTypeSig summary nm ty unicode = ppBinder summary nm <+> dcolon unicode <+> ppType unicode ty +ppTypeSig :: Bool -> OccName -> HsType DocName -> Bool -> String -> Html +ppTypeSig summary nm ty unicode ext = ppBinder summary nm <+> dcolon unicode <+> ppType unicode ext ty ppTyName :: Name -> Html hunk ./src/Haddock/Backends/Xhtml/Decl.hs 157 ppTyClBinderWithVars summary decl <+> case tcdKind decl of - - Just kind -> dcolon unicode <+> ppKind kind + Just kind -> dcolon unicode <+> ppKind kind Nothing -> noHtml hunk ./src/Haddock/Backends/Xhtml/Decl.hs 162 ppTyFam :: Bool -> Bool -> LinksInfo -> SrcSpan -> Maybe (Doc DocName) -> - - TyClDecl DocName -> Bool -> Html - -ppTyFam summary associated links loc mbDoc decl unicode + TyClDecl DocName -> Bool -> String -> Html +ppTyFam summary associated links loc mbDoc decl unicode ext | summary = ppTyFamHeader True associated decl unicode hunk ./src/Haddock/Backends/Xhtml/Decl.hs 166 - - | otherwise = header_ +++ maybeDocSection mbDoc +++ instancesBit + | otherwise = header_ +++ maybeDocSection ext mbDoc +++ instancesBit where docname = tcdName decl hunk ./src/Haddock/Backends/Xhtml/Decl.hs 173 header_ = topDeclElem links loc docname (ppTyFamHeader summary associated decl unicode) - - instancesBit = ppInstances instances docname unicode + instancesBit = ppInstances instances docname unicode ext -- TODO: get the instances instances = [] hunk ./src/Haddock/Backends/Xhtml/Decl.hs 202 ppTyInst :: Bool -> Bool -> LinksInfo -> SrcSpan -> Maybe (Doc DocName) -> - - TyClDecl DocName -> Bool -> Html - -ppTyInst summary associated links loc mbDoc decl unicode + TyClDecl DocName -> Bool -> String -> Html +ppTyInst summary associated links loc mbDoc decl unicode ext hunk ./src/Haddock/Backends/Xhtml/Decl.hs 205 - - | summary = ppTyInstHeader True associated decl unicode - - | otherwise = header_ +++ maybeDocSection mbDoc + | summary = ppTyInstHeader True associated decl unicode ext + | otherwise = header_ +++ maybeDocSection ext mbDoc where docname = tcdName decl hunk ./src/Haddock/Backends/Xhtml/Decl.hs 211 - - header_ = topDeclElem links loc docname (ppTyInstHeader summary associated decl unicode) + header_ = topDeclElem links loc docname (ppTyInstHeader summary associated decl unicode ext) hunk ./src/Haddock/Backends/Xhtml/Decl.hs 214 - -ppTyInstHeader :: Bool -> Bool -> TyClDecl DocName -> Bool -> Html - -ppTyInstHeader _ _ decl unicode = +ppTyInstHeader :: Bool -> Bool -> TyClDecl DocName -> Bool -> String -> Html +ppTyInstHeader _ _ decl unicode ext = keyword "type instance" <+> hunk ./src/Haddock/Backends/Xhtml/Decl.hs 217 - - ppAppNameTypes (tcdName decl) typeArgs unicode + ppAppNameTypes (tcdName decl) typeArgs unicode ext where typeArgs = map unLoc . fromJust . tcdTyPats $ decl hunk ./src/Haddock/Backends/Xhtml/Decl.hs 227 -------------------------------------------------------------------------------- - -ppAssocType :: Bool -> LinksInfo -> DocForDecl DocName -> LTyClDecl DocName -> Bool -> Html - -ppAssocType summ links doc (L loc decl) unicode = +ppAssocType :: Bool -> LinksInfo -> DocForDecl DocName -> LTyClDecl DocName -> Bool -> String -> Html +ppAssocType summ links doc (L loc decl) unicode ext = case decl of hunk ./src/Haddock/Backends/Xhtml/Decl.hs 230 - - TyFamily {} -> ppTyFam summ True links loc (fst doc) decl unicode - - TySynonym {} -> ppTySyn summ links loc doc decl unicode + TyFamily {} -> ppTyFam summ True links loc (fst doc) decl unicode ext + TySynonym {} -> ppTySyn summ links loc doc decl unicode ext _ -> error "declaration type not supported by ppAssocType" hunk ./src/Haddock/Backends/Xhtml/Decl.hs 252 -- | Print an application of a DocName and a list of HsTypes - -ppAppNameTypes :: DocName -> [HsType DocName] -> Bool -> Html - -ppAppNameTypes n ts unicode = ppTypeApp n ts ppDocName (ppParendType unicode) +ppAppNameTypes :: DocName -> [HsType DocName] -> Bool -> String -> Html +ppAppNameTypes n ts unicode ext = ppTypeApp n ts (ppDocName ext) (ppParendType unicode ext) -- | Print an application of a DocName and a list of Names hunk ./src/Haddock/Backends/Xhtml/Decl.hs 279 ------------------------------------------------------------------------------- - -ppLContext, ppLContextNoArrow :: Located (HsContext DocName) -> Bool -> Html +ppLContext, ppLContextNoArrow :: Located (HsContext DocName) -> Bool -> String -> Html ppLContext = ppContext . unLoc ppLContextNoArrow = ppContextNoArrow . unLoc hunk ./src/Haddock/Backends/Xhtml/Decl.hs 284 - -ppContextNoArrow :: HsContext DocName -> Bool -> Html - -ppContextNoArrow [] _ = noHtml - -ppContextNoArrow cxt unicode = pp_hs_context (map unLoc cxt) unicode +ppContextNoArrow :: HsContext DocName -> Bool -> String -> Html +ppContextNoArrow [] _ _ = noHtml +ppContextNoArrow cxt unicode ext = pp_hs_context (map unLoc cxt) unicode ext hunk ./src/Haddock/Backends/Xhtml/Decl.hs 289 - -ppContextNoLocs :: [HsPred DocName] -> Bool -> Html - -ppContextNoLocs [] _ = noHtml - -ppContextNoLocs cxt unicode = pp_hs_context cxt unicode <+> darrow unicode +ppContextNoLocs :: [HsPred DocName] -> Bool -> String -> Html +ppContextNoLocs [] _ _ = noHtml +ppContextNoLocs cxt unicode ext = pp_hs_context cxt unicode ext <+> darrow unicode hunk ./src/Haddock/Backends/Xhtml/Decl.hs 294 - -ppContext :: HsContext DocName -> Bool -> Html - -ppContext cxt unicode = ppContextNoLocs (map unLoc cxt) unicode +ppContext :: HsContext DocName -> Bool -> String -> Html +ppContext cxt unicode ext = ppContextNoLocs (map unLoc cxt) unicode ext hunk ./src/Haddock/Backends/Xhtml/Decl.hs 298 - -pp_hs_context :: [HsPred DocName] -> Bool -> Html - -pp_hs_context [] _ = noHtml - -pp_hs_context [p] unicode = ppPred unicode p - -pp_hs_context cxt unicode = parenList (map (ppPred unicode) cxt) +pp_hs_context :: [HsPred DocName] -> Bool -> String -> Html +pp_hs_context [] _ _ = noHtml +pp_hs_context [p] unicode ext = ppPred unicode ext p +pp_hs_context cxt unicode ext = parenList (map (ppPred unicode ext) cxt) hunk ./src/Haddock/Backends/Xhtml/Decl.hs 304 - -ppPred :: Bool -> HsPred DocName -> Html - -ppPred unicode (HsClassP n ts) = ppAppNameTypes n (map unLoc ts) unicode - -ppPred unicode (HsEqualP t1 t2) = ppLType unicode t1 <+> toHtml "~" <+> ppLType unicode t2 - -ppPred unicode (HsIParam (IPName n) t) - - = toHtml "?" +++ ppDocName n <+> dcolon unicode <+> ppLType unicode t +ppPred :: Bool -> String -> HsPred DocName -> Html +ppPred unicode ext (HsClassP n ts) = ppAppNameTypes n (map unLoc ts) unicode ext +ppPred unicode ext (HsEqualP t1 t2) = ppLType unicode ext t1 <+> toHtml "~" <+> ppLType unicode ext t2 +ppPred unicode ext (HsIParam (IPName n) t) + = toHtml "?" +++ ppDocName ext n <+> dcolon unicode <+> ppLType unicode ext t ------------------------------------------------------------------------------- hunk ./src/Haddock/Backends/Xhtml/Decl.hs 318 ppClassHdr :: Bool -> Located [LHsPred DocName] -> DocName -> [Located (HsTyVarBndr DocName)] -> [Located ([DocName], [DocName])] - - -> Bool -> Html - -ppClassHdr summ lctxt n tvs fds unicode = + -> Bool -> String -> Html +ppClassHdr summ lctxt n tvs fds unicode ext = keyword "class" hunk ./src/Haddock/Backends/Xhtml/Decl.hs 321 - - <+> (if not . null . unLoc $ lctxt then ppLContext lctxt unicode else noHtml) + <+> (if not . null . unLoc $ lctxt then ppLContext lctxt unicode ext else noHtml) <+> ppAppDocNameNames summ n (tyvarNames $ tvs) hunk ./src/Haddock/Backends/Xhtml/Decl.hs 323 - - <+> ppFds fds unicode + <+> ppFds fds unicode ext hunk ./src/Haddock/Backends/Xhtml/Decl.hs 326 - -ppFds :: [Located ([DocName], [DocName])] -> Bool -> Html - -ppFds fds unicode = +ppFds :: [Located ([DocName], [DocName])] -> Bool -> String -> Html +ppFds fds unicode ext = if null fds then noHtml else char '|' <+> hsep (punctuate comma (map (fundep . unLoc) fds)) where hunk ./src/Haddock/Backends/Xhtml/Decl.hs 331 - - fundep (vars1,vars2) = hsep (map ppDocName vars1) <+> arrow unicode <+> - - hsep (map ppDocName vars2) + fundep (vars1,vars2) = hsep (map (ppDocName ext) vars1) <+> arrow unicode <+> + hsep (map (ppDocName ext) vars2) hunk ./src/Haddock/Backends/Xhtml/Decl.hs 335 - -ppShortClassDecl :: Bool -> LinksInfo -> TyClDecl DocName -> SrcSpan -> [(DocName, DocForDecl DocName)] -> Bool -> Html - -ppShortClassDecl summary links (ClassDecl lctxt lname tvs fds sigs _ ats _) loc subdocs unicode = +ppShortClassDecl :: Bool -> LinksInfo -> TyClDecl DocName -> SrcSpan -> [(DocName, DocForDecl DocName)] -> Bool -> String -> Html +ppShortClassDecl summary links (ClassDecl lctxt lname tvs fds sigs _ ats _) loc subdocs unicode ext = if null sigs && null ats then (if summary then id else topDeclElem links loc nm) hdr else (if summary then id else topDeclElem links loc nm) (hdr <+> keyword "where") hunk ./src/Haddock/Backends/Xhtml/Decl.hs 342 +++ shortSubDecls ( - - [ ppAssocType summary links doc at unicode | at <- ats + [ ppAssocType summary links doc at unicode ext | at <- ats , let doc = lookupAnySubdoc (tcdName $ unL at) subdocs ] ++ hunk ./src/Haddock/Backends/Xhtml/Decl.hs 345 - - [ ppFunSig summary links loc doc n typ unicode + [ ppFunSig summary links loc doc n typ unicode ext | L _ (TypeSig (L _ n) (L _ typ)) <- sigs , let doc = lookupAnySubdoc n subdocs ] ) hunk ./src/Haddock/Backends/Xhtml/Decl.hs 350 where - - hdr = ppClassHdr summary lctxt (unLoc lname) tvs fds unicode + hdr = ppClassHdr summary lctxt (unLoc lname) tvs fds unicode ext nm = unLoc lname hunk ./src/Haddock/Backends/Xhtml/Decl.hs 352 - -ppShortClassDecl _ _ _ _ _ _ = error "declaration type not supported by ppShortClassDecl" +ppShortClassDecl _ _ _ _ _ _ _ = error "declaration type not supported by ppShortClassDecl" hunk ./src/Haddock/Backends/Xhtml/Decl.hs 358 ppClassDecl :: Bool -> LinksInfo -> [DocInstance DocName] -> SrcSpan -> Maybe (Doc DocName) -> [(DocName, DocForDecl DocName)] - - -> TyClDecl DocName -> Bool -> Html + -> TyClDecl DocName -> Bool -> String -> Html ppClassDecl summary links instances loc mbDoc subdocs hunk ./src/Haddock/Backends/Xhtml/Decl.hs 360 - - decl@(ClassDecl lctxt lname ltyvars lfds lsigs _ ats _) unicode - - | summary = ppShortClassDecl summary links decl loc subdocs unicode - - | otherwise = classheader +++ maybeDocSection mbDoc + decl@(ClassDecl lctxt lname ltyvars lfds lsigs _ ats _) unicode ext + | summary = ppShortClassDecl summary links decl loc subdocs unicode ext + | otherwise = classheader +++ maybeDocSection ext mbDoc +++ atBit +++ methodBit +++ instancesBit where classheader hunk ./src/Haddock/Backends/Xhtml/Decl.hs 366 - - | null lsigs = topDeclElem links loc nm (hdr unicode) - - | otherwise = topDeclElem links loc nm (hdr unicode <+> keyword "where") + | null lsigs = topDeclElem links loc nm (hdr unicode ext) + | otherwise = topDeclElem links loc nm (hdr unicode ext <+> keyword "where") nm = unLoc $ tcdLName decl hunk ./src/Haddock/Backends/Xhtml/Decl.hs 373 hdr = ppClassHdr summary lctxt (unLoc lname) ltyvars lfds - - atBit = subAssociatedTypes [ ppAssocType summary links doc at unicode + atBit = subAssociatedTypes [ ppAssocType summary links doc at unicode ext | at <- ats , let doc = lookupAnySubdoc (tcdName $ unL at) subdocs ] hunk ./src/Haddock/Backends/Xhtml/Decl.hs 377 - - methodBit = subMethods [ ppFunSig summary links loc doc n typ unicode + methodBit = subMethods [ ppFunSig summary links loc doc n typ unicode ext | L _ (TypeSig (L _ n) (L _ typ)) <- lsigs , let doc = lookupAnySubdoc n subdocs ] hunk ./src/Haddock/Backends/Xhtml/Decl.hs 381 - - instancesBit = ppInstances instances nm unicode + instancesBit = ppInstances instances nm unicode ext hunk ./src/Haddock/Backends/Xhtml/Decl.hs 383 - -ppClassDecl _ _ _ _ _ _ _ _ = error "declaration type not supported by ppShortClassDecl" +ppClassDecl _ _ _ _ _ _ _ _ _ = error "declaration type not supported by ppShortClassDecl" hunk ./src/Haddock/Backends/Xhtml/Decl.hs 386 - -ppInstances :: [DocInstance DocName] -> DocName -> Bool -> Html - -ppInstances instances baseName unicode - - = subInstances instName (map instDecl instances) +ppInstances :: [DocInstance DocName] -> DocName -> Bool -> String -> Html +ppInstances instances baseName unicode ext + = subInstances ext instName (map instDecl instances) where instName = getOccString $ getName baseName instDecl :: DocInstance DocName -> SubDecl hunk ./src/Haddock/Backends/Xhtml/Decl.hs 393 instDecl (inst, maybeDoc) = (instHead inst, maybeDoc, []) - - instHead ([], n, ts) = ppAppNameTypes n ts unicode - - instHead (ctxt, n, ts) = ppContextNoLocs ctxt unicode <+> ppAppNameTypes n ts unicode + instHead ([], n, ts) = ppAppNameTypes n ts unicode ext + instHead (ctxt, n, ts) = ppContextNoLocs ctxt unicode ext <+> ppAppNameTypes n ts unicode ext lookupAnySubdoc :: (Eq name1) => hunk ./src/Haddock/Backends/Xhtml/Decl.hs 410 -- TODO: print contexts - -ppShortDataDecl :: Bool -> LinksInfo -> SrcSpan -> TyClDecl DocName -> Bool -> Html - -ppShortDataDecl summary _links _loc dataDecl unicode +ppShortDataDecl :: Bool -> LinksInfo -> SrcSpan -> TyClDecl DocName -> Bool -> String -> Html +ppShortDataDecl summary _links _loc dataDecl unicode ext | [] <- cons = dataHeader hunk ./src/Haddock/Backends/Xhtml/Decl.hs 416 | [lcon] <- cons, ResTyH98 <- resTy, - - (cHead,cBody,cFoot) <- ppShortConstrParts summary (unLoc lcon) unicode + (cHead,cBody,cFoot) <- ppShortConstrParts summary (unLoc lcon) unicode ext = (dataHeader <+> equals <+> cHead) +++ cBody +++ cFoot | ResTyH98 <- resTy = dataHeader hunk ./src/Haddock/Backends/Xhtml/Decl.hs 426 +++ shortSubDecls (map doGADTConstr cons) where - - dataHeader = ppDataHeader summary dataDecl unicode - - doConstr c con = toHtml [c] <+> ppShortConstr summary (unLoc con) unicode - - doGADTConstr con = ppShortConstr summary (unLoc con) unicode + dataHeader = ppDataHeader summary dataDecl unicode ext + doConstr c con = toHtml [c] <+> ppShortConstr summary (unLoc con) unicode ext + doGADTConstr con = ppShortConstr summary (unLoc con) unicode ext cons = tcdCons dataDecl resTy = (con_res . unLoc . head) cons hunk ./src/Haddock/Backends/Xhtml/Decl.hs 436 ppDataDecl :: Bool -> LinksInfo -> [DocInstance DocName] -> [(DocName, DocForDecl DocName)] -> - - SrcSpan -> Maybe (Doc DocName) -> TyClDecl DocName -> Bool -> Html - -ppDataDecl summary links instances subdocs loc mbDoc dataDecl unicode + SrcSpan -> Maybe (Doc DocName) -> TyClDecl DocName -> Bool -> String -> Html +ppDataDecl summary links instances subdocs loc mbDoc dataDecl unicode ext hunk ./src/Haddock/Backends/Xhtml/Decl.hs 439 - - | summary = ppShortDataDecl summary links loc dataDecl unicode - - | otherwise = header_ +++ maybeDocSection mbDoc +++ constrBit +++ instancesBit + | summary = ppShortDataDecl summary links loc dataDecl unicode ext + | otherwise = header_ +++ maybeDocSection ext mbDoc +++ constrBit +++ instancesBit where docname = unLoc . tcdLName $ dataDecl hunk ./src/Haddock/Backends/Xhtml/Decl.hs 447 cons = tcdCons dataDecl resTy = (con_res . unLoc . head) cons - - header_ = topDeclElem links loc docname (ppDataHeader summary dataDecl unicode + header_ = topDeclElem links loc docname (ppDataHeader summary dataDecl unicode ext <+> whereBit) whereBit hunk ./src/Haddock/Backends/Xhtml/Decl.hs 456 ResTyGADT _ -> keyword "where" _ -> noHtml - - constrBit = subConstructors - - (map (ppSideBySideConstr subdocs unicode) cons) + constrBit = subConstructors ext + (map (ppSideBySideConstr subdocs unicode ext) cons) hunk ./src/Haddock/Backends/Xhtml/Decl.hs 459 - - instancesBit = ppInstances instances docname unicode + instancesBit = ppInstances instances docname unicode ext hunk ./src/Haddock/Backends/Xhtml/Decl.hs 463 - -ppShortConstr :: Bool -> ConDecl DocName -> Bool -> Html - -ppShortConstr summary con unicode = cHead <+> cBody <+> cFoot +ppShortConstr :: Bool -> ConDecl DocName -> Bool -> String -> Html +ppShortConstr summary con unicode ext = cHead <+> cBody <+> cFoot where hunk ./src/Haddock/Backends/Xhtml/Decl.hs 466 - - (cHead,cBody,cFoot) = ppShortConstrParts summary con unicode + (cHead,cBody,cFoot) = ppShortConstrParts summary con unicode ext -- returns three pieces: header, body, footer so that header & footer can be hunk ./src/Haddock/Backends/Xhtml/Decl.hs 471 -- incorporated into the declaration - -ppShortConstrParts :: Bool -> ConDecl DocName -> Bool -> (Html, Html, Html) - -ppShortConstrParts summary con unicode = case con_res con of +ppShortConstrParts :: Bool -> ConDecl DocName -> Bool -> String -> (Html, Html, Html) +ppShortConstrParts summary con unicode ext = case con_res con of ResTyH98 -> case con_details con of PrefixCon args -> hunk ./src/Haddock/Backends/Xhtml/Decl.hs 475 - - (header_ unicode +++ hsep (ppBinder summary occ : map (ppLParendType unicode) args), + (header_ unicode ext +++ hsep (ppBinder summary occ : map (ppLParendType unicode ext) args), noHtml, noHtml) RecCon fields -> hunk ./src/Haddock/Backends/Xhtml/Decl.hs 478 - - (header_ unicode +++ ppBinder summary occ <+> char '{', + (header_ unicode ext +++ ppBinder summary occ <+> char '{', doRecordFields fields, char '}') InfixCon arg1 arg2 -> hunk ./src/Haddock/Backends/Xhtml/Decl.hs 482 - - (header_ unicode +++ hsep [ppLParendType unicode arg1, ppBinder summary occ, ppLParendType unicode arg2], + (header_ unicode ext +++ hsep [ppLParendType unicode ext arg1, ppBinder summary occ, ppLParendType unicode ext arg2], noHtml, noHtml) ResTyGADT resTy -> case con_details con of hunk ./src/Haddock/Backends/Xhtml/Decl.hs 494 -- (except each field gets its own line in docs, to match -- non-GADT records) RecCon fields -> (ppBinder summary occ <+> dcolon unicode <+> - - ppForAll forall ltvs lcontext unicode <+> char '{', + ppForAll forall ltvs lcontext unicode ext <+> char '{', doRecordFields fields, hunk ./src/Haddock/Backends/Xhtml/Decl.hs 496 - - char '}' <+> arrow unicode <+> ppLType unicode resTy) + char '}' <+> arrow unicode <+> ppLType unicode ext resTy) InfixCon arg1 arg2 -> (doGADTCon [arg1, arg2] resTy, noHtml, noHtml) where hunk ./src/Haddock/Backends/Xhtml/Decl.hs 500 - - doRecordFields fields = shortSubDecls (map (ppShortField summary unicode) fields) + doRecordFields fields = shortSubDecls (map (ppShortField summary unicode ext) fields) doGADTCon args resTy = ppBinder summary occ <+> dcolon unicode <+> hsep [ hunk ./src/Haddock/Backends/Xhtml/Decl.hs 502 - - ppForAll forall ltvs lcontext unicode, - - ppLType unicode (foldr mkFunTy resTy args) ] + ppForAll forall ltvs lcontext unicode ext, + ppLType unicode ext (foldr mkFunTy resTy args) ] header_ = ppConstrHdr forall tyVars context occ = docNameOcc . unLoc . con_name $ con hunk ./src/Haddock/Backends/Xhtml/Decl.hs 517 -- ppConstrHdr is for (non-GADT) existentials constructors' syntax #if __GLASGOW_HASKELL__ == 612 - -ppConstrHdr :: HsExplicitForAll -> [Name] -> HsContext DocName -> Bool -> Html +ppConstrHdr :: HsExplicitForAll -> [Name] -> HsContext DocName -> Bool -> String -> Html #else hunk ./src/Haddock/Backends/Xhtml/Decl.hs 519 - -ppConstrHdr :: HsExplicitFlag -> [Name] -> HsContext DocName -> Bool -> Html +ppConstrHdr :: HsExplicitFlag -> [Name] -> HsContext DocName -> Bool -> String -> Html #endif hunk ./src/Haddock/Backends/Xhtml/Decl.hs 521 - -ppConstrHdr forall tvs ctxt unicode +ppConstrHdr forall tvs ctxt unicode ext = (if null tvs then noHtml else ppForall) +++ hunk ./src/Haddock/Backends/Xhtml/Decl.hs 524 - - (if null ctxt then noHtml else ppContextNoArrow ctxt unicode <+> darrow unicode +++ toHtml " ") + (if null ctxt then noHtml else ppContextNoArrow ctxt unicode ext <+> darrow unicode +++ toHtml " ") where ppForall = case forall of Explicit -> forallSymbol unicode <+> hsep (map ppName tvs) <+> toHtml ". " hunk ./src/Haddock/Backends/Xhtml/Decl.hs 531 Implicit -> noHtml - -ppSideBySideConstr :: [(DocName, DocForDecl DocName)] -> Bool -> LConDecl DocName -> SubDecl - -ppSideBySideConstr subdocs unicode (L _ con) = (decl, mbDoc, fieldPart) +ppSideBySideConstr :: [(DocName, DocForDecl DocName)] -> Bool -> String -> LConDecl DocName -> SubDecl +ppSideBySideConstr subdocs unicode ext (L _ con) = (decl, mbDoc, fieldPart) where decl = case con_res con of ResTyH98 -> case con_details con of hunk ./src/Haddock/Backends/Xhtml/Decl.hs 537 PrefixCon args -> - - hsep ((header_ unicode +++ ppBinder False occ) - - : map (ppLParendType unicode) args) + hsep ((header_ unicode ext +++ ppBinder False occ) + : map (ppLParendType unicode ext) args) hunk ./src/Haddock/Backends/Xhtml/Decl.hs 540 - - RecCon _ -> header_ unicode +++ ppBinder False occ + RecCon _ -> header_ unicode ext +++ ppBinder False occ InfixCon arg1 arg2 -> hunk ./src/Haddock/Backends/Xhtml/Decl.hs 543 - - hsep [header_ unicode+++ppLParendType unicode arg1, + hsep [header_ unicode ext+++ppLParendType unicode ext arg1, ppBinder False occ, hunk ./src/Haddock/Backends/Xhtml/Decl.hs 545 - - ppLParendType unicode arg2] + ppLParendType unicode ext arg2] ResTyGADT resTy -> case con_details con of -- prefix & infix could also use hsConDeclArgTys if it seemed to hunk ./src/Haddock/Backends/Xhtml/Decl.hs 558 RecCon fields -> [doRecordFields fields] _ -> [] - - doRecordFields fields = subFields - - (map (ppSideBySideField subdocs unicode) fields) + doRecordFields fields = subFields ext + (map (ppSideBySideField subdocs unicode ext) fields) doGADTCon :: [LHsType DocName] -> Located (HsType DocName) -> Html doGADTCon args resTy = ppBinder False occ <+> dcolon unicode hunk ./src/Haddock/Backends/Xhtml/Decl.hs 563 - - <+> hsep [ppForAll forall ltvs (con_cxt con) unicode, - - ppLType unicode (foldr mkFunTy resTy args) ] + <+> hsep [ppForAll forall ltvs (con_cxt con) unicode ext, + ppLType unicode ext (foldr mkFunTy resTy args) ] header_ = ppConstrHdr forall tyVars context occ = docNameOcc . unLoc . con_name $ con hunk ./src/Haddock/Backends/Xhtml/Decl.hs 579 mkFunTy a b = noLoc (HsFunTy a b) - -ppSideBySideField :: [(DocName, DocForDecl DocName)] -> Bool -> ConDeclField DocName -> SubDecl - -ppSideBySideField subdocs unicode (ConDeclField (L _ name) ltype _) = - - (ppBinder False (docNameOcc name) <+> dcolon unicode <+> ppLType unicode ltype, +ppSideBySideField :: [(DocName, DocForDecl DocName)] -> Bool -> String -> ConDeclField DocName -> SubDecl +ppSideBySideField subdocs unicode ext (ConDeclField (L _ name) ltype _) = + (ppBinder False (docNameOcc name) <+> dcolon unicode <+> ppLType unicode ext ltype, mbDoc, []) where hunk ./src/Haddock/Backends/Xhtml/Decl.hs 589 mbDoc = join $ fmap fst $ lookup name subdocs - -ppShortField :: Bool -> Bool -> ConDeclField DocName -> Html - -ppShortField summary unicode (ConDeclField (L _ name) ltype _) +ppShortField :: Bool -> Bool -> String -> ConDeclField DocName -> Html +ppShortField summary unicode ext (ConDeclField (L _ name) ltype _) = ppBinder summary (docNameOcc name) hunk ./src/Haddock/Backends/Xhtml/Decl.hs 592 - - <+> dcolon unicode <+> ppLType unicode ltype + <+> dcolon unicode <+> ppLType unicode ext ltype -- | Print the LHS of a data\/newtype declaration. hunk ./src/Haddock/Backends/Xhtml/Decl.hs 597 -- Currently doesn't handle 'data instance' decls or kind signatures - -ppDataHeader :: Bool -> TyClDecl DocName -> Bool -> Html - -ppDataHeader summary decl unicode +ppDataHeader :: Bool -> TyClDecl DocName -> Bool -> String -> Html +ppDataHeader summary decl unicode ext | not (isDataDecl decl) = error "ppDataHeader: illegal argument" | otherwise = -- newtype or data hunk ./src/Haddock/Backends/Xhtml/Decl.hs 604 (if tcdND decl == NewType then keyword "newtype" else keyword "data") <+> -- context - - ppLContext (tcdCtxt decl) unicode <+> + ppLContext (tcdCtxt decl) unicode ext <+> -- T a b c ..., or a :+: b ppTyClBinderWithVars summary decl hunk ./src/Haddock/Backends/Xhtml/Decl.hs 651 | otherwise = p - -ppLType, ppLParendType, ppLFunLhType :: Bool -> Located (HsType DocName) -> Html - -ppLType unicode y = ppType unicode (unLoc y) - -ppLParendType unicode y = ppParendType unicode (unLoc y) - -ppLFunLhType unicode y = ppFunLhType unicode (unLoc y) +ppLType, ppLParendType, ppLFunLhType :: Bool -> String -> Located (HsType DocName) -> Html +ppLType unicode ext y = ppType unicode ext (unLoc y) +ppLParendType unicode ext y = ppParendType unicode ext (unLoc y) +ppLFunLhType unicode ext y = ppFunLhType unicode ext (unLoc y) hunk ./src/Haddock/Backends/Xhtml/Decl.hs 657 - -ppType, ppParendType, ppFunLhType :: Bool -> HsType DocName -> Html - -ppType unicode ty = ppr_mono_ty pREC_TOP ty unicode - -ppParendType unicode ty = ppr_mono_ty pREC_CON ty unicode - -ppFunLhType unicode ty = ppr_mono_ty pREC_FUN ty unicode +ppType, ppParendType, ppFunLhType :: Bool -> String -> HsType DocName -> Html +ppType unicode ext ty = ppr_mono_ty pREC_TOP ty unicode ext +ppParendType unicode ext ty = ppr_mono_ty pREC_CON ty unicode ext +ppFunLhType unicode ext ty = ppr_mono_ty pREC_FUN ty unicode ext -- Drop top-level for-all type variables in user style hunk ./src/Haddock/Backends/Xhtml/Decl.hs 671 #else ppForAll :: HsExplicitFlag -> [Located (HsTyVarBndr DocName)] #endif - - -> Located (HsContext DocName) -> Bool -> Html - -ppForAll expl tvs cxt unicode - - | show_forall = forall_part <+> ppLContext cxt unicode - - | otherwise = ppLContext cxt unicode + -> Located (HsContext DocName) -> Bool -> String -> Html +ppForAll expl tvs cxt unicode ext + | show_forall = forall_part <+> ppLContext cxt unicode ext + | otherwise = ppLContext cxt unicode ext where show_forall = not (null tvs) && is_explicit is_explicit = case expl of {Explicit -> True; Implicit -> False} hunk ./src/Haddock/Backends/Xhtml/Decl.hs 681 forall_part = hsep (forallSymbol unicode : ppTyVars tvs) +++ dot - -ppr_mono_lty :: Int -> LHsType DocName -> Bool -> Html - -ppr_mono_lty ctxt_prec ty unicode = ppr_mono_ty ctxt_prec (unLoc ty) unicode +ppr_mono_lty :: Int -> LHsType DocName -> Bool -> String -> Html +ppr_mono_lty ctxt_prec ty unicode ext = ppr_mono_ty ctxt_prec (unLoc ty) unicode ext hunk ./src/Haddock/Backends/Xhtml/Decl.hs 685 - -ppr_mono_ty :: Int -> HsType DocName -> Bool -> Html - -ppr_mono_ty ctxt_prec (HsForAllTy expl tvs ctxt ty) unicode +ppr_mono_ty :: Int -> HsType DocName -> Bool -> String -> Html +ppr_mono_ty ctxt_prec (HsForAllTy expl tvs ctxt ty) unicode ext = maybeParen ctxt_prec pREC_FUN $ hunk ./src/Haddock/Backends/Xhtml/Decl.hs 688 - - hsep [ppForAll expl tvs ctxt unicode, ppr_mono_lty pREC_TOP ty unicode] + hsep [ppForAll expl tvs ctxt unicode ext, ppr_mono_lty pREC_TOP ty unicode ext] hunk ./src/Haddock/Backends/Xhtml/Decl.hs 690 - -ppr_mono_ty _ (HsBangTy b ty) u = ppBang b +++ ppLParendType u ty - -ppr_mono_ty _ (HsTyVar name) _ = ppDocName name - -ppr_mono_ty ctxt_prec (HsFunTy ty1 ty2) u = ppr_fun_ty ctxt_prec ty1 ty2 u - -ppr_mono_ty _ (HsTupleTy con tys) u = tupleParens con (map (ppLType u) tys) - -ppr_mono_ty _ (HsKindSig ty kind) u = parens (ppr_mono_lty pREC_TOP ty u <+> dcolon u <+> ppKind kind) - -ppr_mono_ty _ (HsListTy ty) u = brackets (ppr_mono_lty pREC_TOP ty u) - -ppr_mono_ty _ (HsPArrTy ty) u = pabrackets (ppr_mono_lty pREC_TOP ty u) - -ppr_mono_ty _ (HsPredTy p) u = parens (ppPred u p) - -ppr_mono_ty _ (HsNumTy n) _ = toHtml (show n) -- generics only - -ppr_mono_ty _ (HsSpliceTy {}) _ = error "ppr_mono_ty HsSpliceTy" +ppr_mono_ty _ (HsBangTy b ty) u e = ppBang b +++ ppLParendType u e ty +ppr_mono_ty _ (HsTyVar name) _ e = ppDocName e name +ppr_mono_ty ctxt_prec (HsFunTy ty1 ty2) u e = ppr_fun_ty ctxt_prec ty1 ty2 u e +ppr_mono_ty _ (HsTupleTy con tys) u e = tupleParens con (map (ppLType u e) tys) +ppr_mono_ty _ (HsKindSig ty kind) u e = parens (ppr_mono_lty pREC_TOP ty u e <+> dcolon u <+> ppKind kind) +ppr_mono_ty _ (HsListTy ty) u e = brackets (ppr_mono_lty pREC_TOP ty u e) +ppr_mono_ty _ (HsPArrTy ty) u e = pabrackets (ppr_mono_lty pREC_TOP ty u e) +ppr_mono_ty _ (HsPredTy p) u e = parens (ppPred u e p) +ppr_mono_ty _ (HsNumTy n) _ _ = toHtml (show n) -- generics only +ppr_mono_ty _ (HsSpliceTy {}) _ _ = error "ppr_mono_ty HsSpliceTy" #if __GLASGOW_HASKELL__ == 612 hunk ./src/Haddock/Backends/Xhtml/Decl.hs 701 - -ppr_mono_ty _ (HsSpliceTyOut {}) _ = error "ppr_mono_ty HsQuasiQuoteTy" +ppr_mono_ty _ (HsSpliceTyOut {}) _ _ = error "ppr_mono_ty HsQuasiQuoteTy" #else hunk ./src/Haddock/Backends/Xhtml/Decl.hs 703 - -ppr_mono_ty _ (HsQuasiQuoteTy {}) _ = error "ppr_mono_ty HsQuasiQuoteTy" +ppr_mono_ty _ (HsQuasiQuoteTy {}) _ _ = error "ppr_mono_ty HsQuasiQuoteTy" #endif hunk ./src/Haddock/Backends/Xhtml/Decl.hs 705 - -ppr_mono_ty _ (HsRecTy {}) _ = error "ppr_mono_ty HsRecTy" +ppr_mono_ty _ (HsRecTy {}) _ _ = error "ppr_mono_ty HsRecTy" hunk ./src/Haddock/Backends/Xhtml/Decl.hs 707 - -ppr_mono_ty ctxt_prec (HsAppTy fun_ty arg_ty) unicode +ppr_mono_ty ctxt_prec (HsAppTy fun_ty arg_ty) unicode ext = maybeParen ctxt_prec pREC_CON $ hunk ./src/Haddock/Backends/Xhtml/Decl.hs 709 - - hsep [ppr_mono_lty pREC_FUN fun_ty unicode, ppr_mono_lty pREC_CON arg_ty unicode] + hsep [ppr_mono_lty pREC_FUN fun_ty unicode ext, ppr_mono_lty pREC_CON arg_ty unicode ext] hunk ./src/Haddock/Backends/Xhtml/Decl.hs 711 - -ppr_mono_ty ctxt_prec (HsOpTy ty1 op ty2) unicode +ppr_mono_ty ctxt_prec (HsOpTy ty1 op ty2) unicode ext = maybeParen ctxt_prec pREC_FUN $ hunk ./src/Haddock/Backends/Xhtml/Decl.hs 713 - - ppr_mono_lty pREC_OP ty1 unicode <+> ppr_op <+> ppr_mono_lty pREC_OP ty2 unicode + ppr_mono_lty pREC_OP ty1 unicode ext <+> ppr_op <+> ppr_mono_lty pREC_OP ty2 unicode ext where hunk ./src/Haddock/Backends/Xhtml/Decl.hs 715 - - ppr_op = if not (isSymOcc occName) then quote (ppLDocName op) else ppLDocName op + ppr_op = if not (isSymOcc occName) then quote (ppLDocName ext op) else ppLDocName ext op occName = docNameOcc . unLoc $ op hunk ./src/Haddock/Backends/Xhtml/Decl.hs 718 - -ppr_mono_ty ctxt_prec (HsParTy ty) unicode +ppr_mono_ty ctxt_prec (HsParTy ty) unicode ext -- = parens (ppr_mono_lty pREC_TOP ty) hunk ./src/Haddock/Backends/Xhtml/Decl.hs 720 - - = ppr_mono_lty ctxt_prec ty unicode + = ppr_mono_lty ctxt_prec ty unicode ext hunk ./src/Haddock/Backends/Xhtml/Decl.hs 722 - -ppr_mono_ty ctxt_prec (HsDocTy ty _) unicode - - = ppr_mono_lty ctxt_prec ty unicode +ppr_mono_ty ctxt_prec (HsDocTy ty _) unicode ext + = ppr_mono_lty ctxt_prec ty unicode ext hunk ./src/Haddock/Backends/Xhtml/Decl.hs 726 - -ppr_fun_ty :: Int -> LHsType DocName -> LHsType DocName -> Bool -> Html - -ppr_fun_ty ctxt_prec ty1 ty2 unicode - - = let p1 = ppr_mono_lty pREC_FUN ty1 unicode - - p2 = ppr_mono_lty pREC_TOP ty2 unicode +ppr_fun_ty :: Int -> LHsType DocName -> LHsType DocName -> Bool -> String -> Html +ppr_fun_ty ctxt_prec ty1 ty2 unicode ext + = let p1 = ppr_mono_lty pREC_FUN ty1 unicode ext + p2 = ppr_mono_lty pREC_TOP ty2 unicode ext in maybeParen ctxt_prec pREC_FUN $ hsep [p1, arrow unicode <+> p2] hunk ./src/Haddock/Backends/Xhtml/DocMarkup.hs 36 import RdrName - -parHtmlMarkup :: (a -> Html) -> (a -> Bool) -> DocMarkup a Html - -parHtmlMarkup ppId isTyCon = Markup { +parHtmlMarkup :: String -> (a -> Html) -> (a -> Bool) -> DocMarkup a Html +parHtmlMarkup ext ppId isTyCon = Markup { markupEmpty = noHtml, markupString = toHtml, markupParagraph = paragraph, hunk ./src/Haddock/Backends/Xhtml/DocMarkup.hs 44 markupAppend = (+++), markupIdentifier = thecode . ppId . choose, markupModule = \m -> let (mdl,ref) = break (=='#') m - - in ppModuleRef (mkModuleNoPackage mdl) ref, + in ppModuleRef ext (mkModuleNoPackage mdl) ref, markupEmphasis = emphasize, markupMonospaced = thecode, markupUnorderedList = unordList, hunk ./src/Haddock/Backends/Xhtml/DocMarkup.hs 79 -- If the doc is a single paragraph, don't surround it with

(this causes -- ugly extra whitespace with some browsers). FIXME: Does this still apply? - -docToHtml :: Doc DocName -> Html - -docToHtml = markup fmt . cleanup - - where fmt = parHtmlMarkup ppDocName (isTyConName . getName) +docToHtml :: String -> Doc DocName -> Html +docToHtml ext = markup fmt . cleanup + where fmt = parHtmlMarkup ext (ppDocName ext) (isTyConName . getName) hunk ./src/Haddock/Backends/Xhtml/DocMarkup.hs 84 - -origDocToHtml :: Doc Name -> Html - -origDocToHtml = markup fmt . cleanup - - where fmt = parHtmlMarkup ppName isTyConName +origDocToHtml :: String -> Doc Name -> Html +origDocToHtml ext = markup fmt . cleanup + where fmt = parHtmlMarkup ext ppName isTyConName hunk ./src/Haddock/Backends/Xhtml/DocMarkup.hs 89 - -rdrDocToHtml :: Doc RdrName -> Html - -rdrDocToHtml = markup fmt . cleanup - - where fmt = parHtmlMarkup ppRdrName isRdrTc +rdrDocToHtml :: String -> Doc RdrName -> Html +rdrDocToHtml ext = markup fmt . cleanup + where fmt = parHtmlMarkup ext ppRdrName isRdrTc docElement :: (Html -> Html) -> Html -> Html hunk ./src/Haddock/Backends/Xhtml/DocMarkup.hs 101 else el ! [theclass "doc"] << content_ - -docSection :: Doc DocName -> Html - -docSection = (docElement thediv <<) . docToHtml +docSection :: String -> Doc DocName -> Html +docSection ext = (docElement thediv <<) . docToHtml ext hunk ./src/Haddock/Backends/Xhtml/DocMarkup.hs 105 - -maybeDocSection :: Maybe (Doc DocName) -> Html - -maybeDocSection = maybe noHtml docSection +maybeDocSection :: String -> Maybe (Doc DocName) -> Html +maybeDocSection ext = maybe noHtml (docSection ext) cleanup :: Doc a -> Doc a hunk ./src/Haddock/Backends/Xhtml/Layout.hs 116 subCaption = paragraph ! [theclass "caption"] << captionName - -subDlist :: [SubDecl] -> Maybe Html - -subDlist [] = Nothing - -subDlist decls = Just $ dlist << map subEntry decls +++ clearDiv +subDlist :: String -> [SubDecl] -> Maybe Html +subDlist _ [] = Nothing +subDlist ext decls = Just $ dlist << map subEntry decls +++ clearDiv where subEntry (decl, mdoc, subs) = dterm ! [theclass "src"] << decl hunk ./src/Haddock/Backends/Xhtml/Layout.hs 123 +++ - - docElement ddef << (fmap docToHtml mdoc +++ subs) + docElement ddef << (fmap (docToHtml ext) mdoc +++ subs) clearDiv = thediv ! [ theclass "clear" ] << noHtml hunk ./src/Haddock/Backends/Xhtml/Layout.hs 127 - -subTable :: [SubDecl] -> Maybe Html - -subTable [] = Nothing - -subTable decls = Just $ table << aboves (concatMap subRow decls) +subTable :: String -> [SubDecl] -> Maybe Html +subTable _ [] = Nothing +subTable ext decls = Just $ table << aboves (concatMap subRow decls) where subRow (decl, mdoc, subs) = (td ! [theclass "src"] << decl hunk ./src/Haddock/Backends/Xhtml/Layout.hs 134 <-> - - docElement td << fmap docToHtml mdoc) + docElement td << fmap (docToHtml ext) mdoc) : map (cell . (td <<)) subs hunk ./src/Haddock/Backends/Xhtml/Layout.hs 143 subBlock hs = Just $ toHtml hs - -subArguments :: [SubDecl] -> Html - -subArguments = divSubDecls "arguments" "Arguments" . subTable +subArguments :: String -> [SubDecl] -> Html +subArguments ext = divSubDecls "arguments" "Arguments" . subTable ext subAssociatedTypes :: [Html] -> Html hunk ./src/Haddock/Backends/Xhtml/Layout.hs 151 subAssociatedTypes = divSubDecls "associated-types" "Associated Types" . subBlock - -subConstructors :: [SubDecl] -> Html - -subConstructors = divSubDecls "constructors" "Constructors" . subTable +subConstructors :: String -> [SubDecl] -> Html +subConstructors ext = divSubDecls "constructors" "Constructors" . subTable ext hunk ./src/Haddock/Backends/Xhtml/Layout.hs 155 - -subFields :: [SubDecl] -> Html - -subFields = divSubDecls "fields" "Fields" . subDlist +subFields :: String -> [SubDecl] -> Html +subFields ext = divSubDecls "fields" "Fields" . subDlist ext hunk ./src/Haddock/Backends/Xhtml/Layout.hs 159 - -subInstances :: String -> [SubDecl] -> Html - -subInstances nm = maybe noHtml wrap . instTable +subInstances :: String -> String -> [SubDecl] -> Html +subInstances ext nm = maybe noHtml wrap . instTable where wrap = (subSection <<) . (subCaption +++) hunk ./src/Haddock/Backends/Xhtml/Layout.hs 163 - - instTable = fmap (thediv ! collapseSection id_ True [] <<) . subTable + instTable = fmap (thediv ! collapseSection id_ True [] <<) . subTable ext subSection = thediv ! [theclass $ "subs instances"] subCaption = paragraph ! collapseControl id_ True "caption" << "Instances" id_ = makeAnchorId $ "i:" ++ nm hunk ./src/Haddock/Backends/Xhtml/Names.hs 42 ppRdrName = ppOccName . rdrNameOcc - -ppLDocName :: Located DocName -> Html - -ppLDocName (L _ d) = ppDocName d +ppLDocName :: String -> Located DocName -> Html +ppLDocName ext (L _ d) = ppDocName ext d hunk ./src/Haddock/Backends/Xhtml/Names.hs 46 - -ppDocName :: DocName -> Html - -ppDocName (Documented name mdl) = - - linkIdOcc mdl (Just occName) << ppOccName occName +ppDocName :: String -> DocName -> Html +ppDocName ext (Documented name mdl) = + linkIdOcc ext mdl (Just occName) << ppOccName occName where occName = nameOccName name hunk ./src/Haddock/Backends/Xhtml/Names.hs 50 - -ppDocName (Undocumented name) = toHtml (getOccString name) +ppDocName _ (Undocumented name) = toHtml (getOccString name) ppName :: Name -> Html hunk ./src/Haddock/Backends/Xhtml/Names.hs 71 | otherwise = ppOccName n - -linkId :: Module -> Maybe Name -> Html -> Html - -linkId mdl mbName = linkIdOcc mdl (fmap nameOccName mbName) +linkId :: String -> Module -> Maybe Name -> Html -> Html +linkId ext mdl mbName = linkIdOcc ext mdl (fmap nameOccName mbName) hunk ./src/Haddock/Backends/Xhtml/Names.hs 75 - -linkIdOcc :: Module -> Maybe OccName -> Html -> Html - -linkIdOcc mdl mbName = anchor ! [href url] +linkIdOcc :: String -> Module -> Maybe OccName -> Html -> Html +linkIdOcc ext mdl mbName = anchor ! [href url] where url = case mbName of hunk ./src/Haddock/Backends/Xhtml/Names.hs 79 - - Nothing -> moduleUrl mdl - - Just name -> moduleNameUrl mdl name + Nothing -> moduleUrl ext mdl + Just name -> moduleNameUrl ext mdl name hunk ./src/Haddock/Backends/Xhtml/Names.hs 83 - -ppModule :: Module -> Html - -ppModule mdl = anchor ! [href (moduleUrl mdl)] +ppModule :: String -> Module -> Html +ppModule ext mdl = anchor ! [href (moduleUrl ext mdl)] << toHtml (moduleString mdl) hunk ./src/Haddock/Backends/Xhtml/Names.hs 88 - -ppModuleRef :: Module -> String -> Html - -ppModuleRef mdl ref = anchor ! [href (moduleUrl mdl ++ ref)] +ppModuleRef :: String -> Module -> String -> Html +ppModuleRef ext mdl ref = anchor ! [href (moduleUrl ext mdl ++ ref)] << toHtml (moduleString mdl) -- NB: The ref parameter already includes the '#'. -- This function is only called from markupModule expanding a hunk ./src/Haddock/Options.hs 49 | Flag_DumpInterface String | Flag_Heading String | Flag_Html + | Flag_XHtml | Flag_Hoogle | Flag_Lib String | Flag_OutputDir FilePath hunk ./src/Haddock/Options.hs 98 -- "output in DocBook XML", Option ['h'] ["html"] (NoArg Flag_Html) "output in HTML (HTML 4.01)", + Option [] ["xhtml"] (NoArg Flag_XHtml) + "output in XHTML (XHTML 1.1)", Option [] ["latex"] (NoArg Flag_LaTeX) "use experimental LaTeX rendering", Option [] ["latex-style"] (ReqArg Flag_LaTeXStyle "FILE") "provide your own LaTeX style in FILE", Option ['U'] ["use-unicode"] (NoArg Flag_UseUnicode) "use Unicode in HTML output", hunk ./src/Haddock/Utils.hs 178 -------------------------------------------------------------------------------- - -moduleHtmlFile :: Module -> FilePath - -moduleHtmlFile mdl = +moduleHtmlFile :: String -> Module -> FilePath +moduleHtmlFile ext mdl = case Map.lookup mdl html_xrefs of hunk ./src/Haddock/Utils.hs 181 - - Nothing -> mdl' ++ ".html" - - Just fp0 -> joinPath [fp0, mdl' ++ ".html"] + Nothing -> mdl' ++ "." ++ ext + Just fp0 -> joinPath [fp0, mdl' ++ "." ++ ext] where mdl' = map (\c -> if c == '.' then '-' else c) (moduleNameString (moduleName mdl)) hunk ./src/Haddock/Utils.hs 189 - -contentsHtmlFile, indexHtmlFile :: String - -contentsHtmlFile = "index.html" - -indexHtmlFile = "doc-index.html" +contentsHtmlFile, indexHtmlFile :: String -> String +contentsHtmlFile ext = "index." ++ ext +indexHtmlFile ext = "doc-index." ++ ext -- | The name of the module index file to be displayed inside a frame. hunk ./src/Haddock/Utils.hs 197 -- Modules are display in full, but without indentation. Clicking opens in -- the main window. - -frameIndexHtmlFile :: String - -frameIndexHtmlFile = "index-frames.html" +frameIndexHtmlFile :: String -> String +frameIndexHtmlFile ext = "index-frames." ++ ext moduleIndexFrameName, mainFrameName, synopsisFrameName :: String hunk ./src/Haddock/Utils.hs 207 synopsisFrameName = "synopsis" - -subIndexHtmlFile :: Char -> String - -subIndexHtmlFile a = "doc-index-" ++ b ++ ".html" +subIndexHtmlFile :: String -> Char -> String +subIndexHtmlFile ext a = "doc-index-" ++ b ++ "." ++ ext where b | isAlpha a = [a] | otherwise = show (ord a) hunk ./src/Haddock/Utils.hs 227 ------------------------------------------------------------------------------- - -moduleUrl :: Module -> String +moduleUrl :: String -> Module -> String moduleUrl = moduleHtmlFile hunk ./src/Haddock/Utils.hs 231 - -moduleNameUrl :: Module -> OccName -> String - -moduleNameUrl mdl n = moduleUrl mdl ++ '#' : nameAnchorId n +moduleNameUrl :: String -> Module -> OccName -> String +moduleNameUrl ext mdl n = moduleUrl ext mdl ++ '#' : nameAnchorId n nameAnchorId :: OccName -> String hunk ./src/Haddock/Utils.hs 261 ------------------------------------------------------------------------------- - -jsFile, framesFile :: String - -jsFile = "haddock-util.js" - -framesFile = "frames.html" +jsFile :: String +jsFile = "haddock-util.js" + +framesFile :: String -> String +framesFile ext = "frames." ++ ext ------------------------------------------------------------------------------- hunk ./src/Main.hs 43 import System.IO import System.Exit import System.Environment - -import Text.XHtml.Strict (html4_strict) +import Text.XHtml (doctypeExtension) +import Text.XHtml.Strict (html4_strict, xhtml11) #if defined(mingw32_HOST_OS) import Foreign hunk ./src/Main.hs 142 renderStep flags packages ifaces else do - - when (any (`elem` [Flag_Html, Flag_Hoogle, Flag_LaTeX]) flags) $ + when (any (`elem` [Flag_Html, Flag_XHtml, Flag_Hoogle, Flag_LaTeX]) flags) $ throwE "No input file(s)." -- Get packages supplied with --read-interface. hunk ./src/Main.hs 197 opt_index_url = optIndexUrl flags odir = outputDir flags opt_latex_style = optLaTeXStyle flags - - opt_doctype = html4_strict + opt_doctype = if Flag_XHtml `elem` flags + then xhtml11 + else html4_strict visibleIfaces = [ i | i <- ifaces, OptHide `notElem` ifaceOptions i ] hunk ./src/Main.hs 224 ppHtmlIndex odir title pkgStr themes opt_doctype opt_contents_url sourceUrls' opt_wiki_urls allVisibleIfaces - - copyHtmlBits odir libDir themes + copyHtmlBits (doctypeExtension opt_doctype) odir libDir themes when (Flag_GenContents `elem` flags) $ do ppHtmlContents odir title pkgStr hunk ./src/Main.hs 230 themes opt_doctype opt_index_url sourceUrls' opt_wiki_urls allVisibleIfaces True prologue - - copyHtmlBits odir libDir themes + copyHtmlBits (doctypeExtension opt_doctype) odir libDir themes hunk ./src/Main.hs 232 - - when (Flag_Html `elem` flags) $ do + when (Flag_Html `elem` flags || Flag_XHtml `elem` flags) $ do ppHtml title pkgStr visibleIfaces odir prologue themes opt_doctype sourceUrls' opt_wiki_urls hunk ./src/Main.hs 237 opt_contents_url opt_index_url unicode - - copyHtmlBits odir libDir themes + copyHtmlBits (doctypeExtension opt_doctype) odir libDir themes when (Flag_Hoogle `elem` flags) $ do let pkgName2 = if pkgName == "main" && title /= [] then title else pkgName } Context: [H.Utils needs FFI on Win+MinGW David Waern **20100902192748 Ignore-this: df35ddfaf4cd7bfbbd2e28c12f1f73ab ] [Add a note to ANNOUNCE David Waern **20100902192708 Ignore-this: 7473d17bd24a0e5efa82e3c5d6a7a356 ] [TAG 2.8.0 David Waern **20100902114656 Ignore-this: 793ff8e1a56bc227c8720e6adb3871c1 ] [Update release instructions David Waern **20100902113852 Ignore-this: e400993e1927a438525833586249cc1f ] [Update copyright years in license David Waern **20100902112922 Ignore-this: 70fd94933cc2e0b23b21411e3f3501a6 ] [Add a list of contributors to the user guide David Waern **20100902112227 Ignore-this: 872c2c51d5e0127c191e3b8517303d1f Break out everyone thanked in the `Acknowledgements` chapter into a separate contributor list and add everyone from `darcs show authors`. We consider everyone who is thanked to be a contributor as a conservative estimation :-) I have added some more contributors that I know about, who were not in the darcs history, but others may be missing. So please add anyone that you think is missing from the list. ] [Improve docs for --no-tmp-comp-dir David Waern **20100901190327 Ignore-this: c0de615de058b04c8514c94f530e1400 ] [Replace ghci> with >>> in example syntax David Waern **20100901111921 Ignore-this: 7a1d42969182af74efab7e3b26852e82 ] [Wibble David Waern **20100901110229 Ignore-this: 49360c89f7b2483235384adae84447d8 ] [Update doc configure script to find docbook stylesheets on arch linux David Waern **20100901105744 Ignore-this: 9bcc2bfcaa7aef3c72788b4ddd588889 ] [slight wording change about Frames mode Mark Lentczner **20100901053127 Ignore-this: 384be3b118e308401b81730a4d35059 ] [update options documentation Mark Lentczner **20100901052932 Ignore-this: 5541de4e0f77282601c5fb696cba83ee rewrote doc for --html added doc for --theme and --built-in-themes added --use-contents and --gen-contents ] [sort options in doc to match --help output Mark Lentczner **20100901042935 Ignore-this: ea0d41e9f3174b900416403ef6b536ad removed --html-help option, as it is no longer supported ] [Update test output following version change David Waern **20100831223600 Ignore-this: c1e06ce13ea6c8b1c18aea78585632e5 ] [Update interface file versioning to work with ghc 6.14/15 David Waern **20100831223323 Ignore-this: fc44ec926c4e1c23c4d4b80bc015e6a2 ] [Update CHANGES David Waern **20100831223311 Ignore-this: 2f3048c8afaf9b804eff6689a5eb540 ] [Update ANNOUNCE David Waern **20100831223227 Ignore-this: afbc1edd8d133c4decb5826faf7c31fa ] [Bump version number David Waern **20100831182415 Ignore-this: e3978f2fc2b5f014c3fb7a23894c9485 ] [Revert update to Test David Waern **20100829205514 Ignore-this: d977a5c24ed5c1b0c74523504ded321a ] [Update Test David Waern **20100829201234 Ignore-this: 77f2babcbfa97d33c0342d5640aefb96 ] [GHC build system: Add all the data files to BINDIST_EXTRAS Ian Lynagh **20100818194353 Ignore-this: 9614305f84897bb8d898e64b915467d5 ] [Fix installation in the GHC build system Ian Lynagh **20100818185724 Data-files are now in subdirectories, so we need to handle that ] [Make the main haddock script versioned, and make plain "haddock" a symlink Ian Lynagh **20100801180954] [Use flattenExtensionFlags with ghc >= 6.13 only David Waern **20100829174623 Ignore-this: c97a3baf665607eef404c565c32d1e55 ] [Follow flattenLanguageFlags -> flattenExtensionFlags rename Ian Lynagh **20100724232649] [Flatten the dynflags before parsing Ian Lynagh **20100724231849] [Allow building with ghc < 6.16 David Waern **20100829173236 Ignore-this: f7a45a8ede1c9bdbbd5b49ccf501df31 ] [move TOC and Info blocks down 0.5em to improve layout issue w/Test.hs Mark Lentczner **20100829170717 Ignore-this: b6cf36658bc7b8fa051b9fba458963df ] [update golden test for Test due to portability box change Mark Lentczner **20100829151742 Ignore-this: daa29827613f3cca5253366f3a51605c ] [make portability block be a table - solves layout issues Mark Lentczner **20100829151454 Ignore-this: bc5621359f84c905df5301d6a0983cf8 ] [Naming wibbles David Waern **20100829131103 Ignore-this: 251de8abecae267fd81c978e71a6ba4c ] [Add source entity path to --read-interface David Waern **20100829130328 Ignore-this: f6475c9222657e7e7337844e9f0848e9 You can now use this flag like this: --read-interface=,,<.haddock file> By "source entity path" I mean the same thing that is specified with the --source-entity flag. The purpose of this is to be able to specify the source entity path per package, to allow source links to work in the presence of cross-package documentation. When given two arguments or less the --read-interface flag behaves as before. ] [Remove Snappy data files David Waern **20100829124445 Ignore-this: d72118adc02f9fba41943caf6e3c5166 ] [Whitespace police David Waern **20100828220432 Ignore-this: 313c81e301a1cb97c01d48b8743c2c85 ] [push footer to bottom of window Mark Lentczner **20100828182618 Ignore-this: 3d61e039e7c8e31eaec95afee165a637 ] [fix def lists Mark Lentczner **20100828182516 Ignore-this: d8055143282006bf7b8fabe3560bbfc1 ] [Update tests following switch to the Xhtml backend David Waern **20100828163609 Ignore-this: e021ed9777d97fa76867db0a1e21093 ] [fix table of contents CSS Mark Lentczner **20100827221619 Ignore-this: 801664b4e641aa8bdca9acbb0642c4f8 ] [fix broken header link margins Mark Lentczner **20100827212948 Ignore-this: 4425913b4be92312caa05fc9ed8aa1ca ] [support both kinds of enumerated lists in doc markup Mark Lentczner **20100826234503 Ignore-this: 905737af77aae700059c096deb716b42 The documentation for Haddock says enumerated lists can use either of (1) first item 2. second item The second form wasn't actually supported ] [fixed CSS for ordered lists and def lists in doc blocks Mark Lentczner **20100826234413 Ignore-this: c21cd86ac44286804344c928ec22f026 ] [Get rid of GhcModule and related cruft David Waern **20100826214059 Ignore-this: 338ed5cdcc7e76882ae8a89d36118413 We can get everything we need directly from TypecheckedModule. ] [Follow recent API additions with some refactorings David Waern **20100826203158 Ignore-this: c2ff41f47954f1d10b1d8bfa3ab18db8 Simon Hegel's patch prompted me to do some refactorings in Main, Haddock.Documentation and Haddock.Interface. ] [Add createInterfaces' (a more high-level alternative to createInterfaces) to Haddock API Simon Hengel **20100808101245 Ignore-this: 4034dbe6b9df46cf4d3b08e6d93598de ] [fix occasional v.scroll bars on pre blocks (I think) Mark Lentczner **20100825051619 Ignore-this: 74045fd7c08d9be7d26957cdf5abdf57 ] [remove Snappy theme Mark Lentczner **20100821014619 Ignore-this: d8f74ad0f858f8b1a53a49b85fb0c60b ] [Make synopsis frame behave properly in Firefox. Thomas Schilling **20100804131222 Ignore-this: 8d1398aa7f6f5ce4ef730f1d008df8a0 In Firefox, pressing the back button first reverted the synopsis frame, and only clicking the back button a second time would update the main frame. ] [made style changing and cookies storage robust Mark Lentczner **20100820021309 Ignore-this: 19623e1c232e64cf084ff966f05fab37 ] [fix small layout issues Mark Lentczner **20100820014106 Ignore-this: 2798dc26fb31269a4266bffebdca4116 mini frames should have same size top heading give info block dts some padding so they don't collide in some browsers ] [better synopsis handling logic - no flashing Mark Lentczner **20100820013755 Ignore-this: e6451407a17c8a0e153b1d4b51b03580 ] [margin fiddling Mark Lentczner **20100818195002 Ignore-this: 4f2f7caa7f90e2d708c1aa0f0676e85c ] [layout tweeks - mini page font size, toc color, etc. Mark Lentczner **20100818161611 Ignore-this: baa58181a12c1de0df3c941d22322a7f ] [remove synopsis when in frames Mark Lentczner **20100817232847 Ignore-this: d4296cea7102ed13f1a5445e510246b1 ] [add missing data file to .cabal Mark Lentczner **20100817232143 Ignore-this: 549af2ee50de3fdb5d16b2d1ac848270 ] [don't collapse entries in module list when clicking on links Mark Lentczner **20100817230602 Ignore-this: 4f292a2c9eecbb03c393060a345d4380 ] [clean up collapser logics Mark Lentczner **20100817181952 Ignore-this: 4bf778b41f3ed2bbdab02459323fcc66 javascript code for collapasble sections cleaned up rewrote class utilities in javascript to be more robust refactored utilities for generating collapsable sections made toc be same color as synopsis module list has needed clear attribute in CSS ] [font size and margin tweaks Mark Lentczner **20100816151537 Ignore-this: 6d2ed38e0d4525af3ba94549bc020d14 ] [build style menu in javascript Mark Lentczner **20100814034446 Ignore-this: 4e9df51c79d4720bbc82961ae6e3c2f2 moved to javascript, so as to not polute the content with the style menu removed menu building code in Themes.hs removed onclick in Utils.hs changed text of button in header from "Source code" to "Source" more consistent with links in rest of page ] [move frames button to js Mark Lentczner **20100813221748 Ignore-this: 43d64133300eefa3a55f1a1bce1ff094 ] [add Frames button and clean up frames.html Mark Lentczner **20100813214341 Ignore-this: 517eba0b90d89581697afee7564e785d ] [adjusted font sizes of auxilary pages per new scheme Mark Lentczner **20100813164343 Ignore-this: ac64b8705acab47b1a0f73655341ffff ] [more space between elements Mark Lentczner **20100813155022 Ignore-this: e70eca78b5063ce23835d8cceb9f42f5 ] [removed underlining on hover for named anchors Mark Lentczner **20100813154844 Ignore-this: 419e1f5b6ec85d151c0eb43cb1207da4 headings in interface lost thier a element, no need, just put id on heading css for a elements now only applies to those with href attribute ] [adjusted margin to 2em, 1 wasn't enough Mark Lentczner **20100813151159 Ignore-this: 53677cd1f8f70e4eb4b3ff4c7af0a174 ] [implemented YUI's CSS font approach Mark Lentczner **20100813150955 Ignore-this: 1894a8d1c6b745316ea4f3ed3e0436f2 ] [width and font changes Mark Lentczner **20100812211645 Ignore-this: e2e1a5ed3fabd766e742a4c19b4a74ca removed the max width restrictions on the page as a whole and the synopsis made the main font size smaller (nominally 14pt) and then tweaked most font sizes (relative) to be more consistent ] [close arrows on expanded synopsis drawer Mark Lentczner **20100811111126 Ignore-this: 63f8773923226a8eb2cf73746c83480c ] [put the synopsis back in the other themes Mark Lentczner **20100730233855 Ignore-this: 25664c22148bf9cf565cf901b2678f71 ] [improved synopsis drawer: on click, not hover Mark Lentczner **20100730201940 Ignore-this: 68f6efb3da943517f2267fbe1c06b4bf ] [Add missing dependency to cabal file Simon Hengel **20100807132027 Ignore-this: 793f4d9479efa3fb37ef70408007f196 ] [Adapt paths to data files in cabal file Simon Hengel **20100803183726 Ignore-this: d8280ac4ed773dc87cab59de0ad53caa ] [Fix build in GHC tree Ian Lynagh **20100730202146 Ignore-this: b706ebf53dce793a2a9a4f42c593e548 ] [styling tweaks Mark Lentczner **20100729011246 Ignore-this: b95c8cdd341b2fbc3bf671037c3abb70 don't generate an empty li for absent style menu in links area update css for Classic and Snappy to handle: dl lists links in package header and in declarations floating of links and info block in package and module headers ] [styling source links on declarations Mark Lentczner **20100728190118 Ignore-this: fb0d02d225fd0a302df1d6c843b5db33 ] [make info block and package bar links be floatable by placing them first in the dom tree Mark Lentczner **20100728000312 Ignore-this: 5521f92ee31818509ec1126354f1831b ] [apply margin changes to pre and headings as per group decision, and small cleanups Mark Lentczner **20100727221245 Ignore-this: 481ae02a9176ea9a7aac5f67c20509a3 ] [remove custom version of copyFile in Xhtml.hs Mark Lentczner **20100727212358 Ignore-this: 6eed77a71aa2ff14e718ce717aa50af9 ] [give a class to empty dd elements so they can be hidden Mark Lentczner **20100727210634 Ignore-this: a8cfe8b2368b597e66b4b46e0d4a8df4 ] [move themes into html dir with .theme and .std-theme extensions Mark Lentczner **20100727200403 Ignore-this: bce0193e3471cff8cc31d5d05428240 ] [remove Tibbe theme Mark Lentczner **20100727190925 Ignore-this: d6c229ae74bf9bdcdc65d417c60bf943 ] [make module list use new collapsers Mark Lentczner **20100726023915 Ignore-this: 2cac24bafcf396832a6955dd1240a965 ] [cleaned up Themes.hs Mark Lentczner **20100726012742 Ignore-this: 6ddef7e65d30fdf7a05478128b302598 ] [reorganize files in the html lib data dir Mark Lentczner **20100726003205 Ignore-this: be18cdcab6ca3f59bc21b9b0c1c5547a ] [change how collapsing sections are done Mark Lentczner **20100725184749 Ignore-this: ce8c5ed362dd9209199b6678a9feb7ef make whole .caption be the target improve javascript for class toggling have plus/minus images come from .css, not img tags ] [excisting last vestiges of the --xhtml flag Mark Lentczner **20100724165522 Ignore-this: f0db208ab498fa9d5b015dd0afd5a0c8 ] [fields are def lists, tweak css for style menu, mini pages, arguments Mark Lentczner **20100724062844 Ignore-this: 3c582f8c436a1387a55647a3e1d1ae39 ] [extend package header and footer to edges of page Mark Lentczner **20100724060242 Ignore-this: 54db8999d0858331c014cfddaa8ee7a1 ] [slide out Synopsis drawer Mark Lentczner **20100724053615 Ignore-this: 48eeb8f56ba78de38c7415ece3697e9a ] [tweak look of mini pages, keywords, and preblocks Mark Lentczner **20100723210719 Ignore-this: 67894d567157e168de2fea69c75effe8 ] [tweaks for dl layout, though still not used Mark Lentczner **20100723191359 Ignore-this: bb01503bcde66aae6b4bfd9445f25b92 ] [tweaks to theme for info table, headings, and tables Mark Lentczner **20100723183302 Ignore-this: 5a1698f8104f2898e58248ead969f030 ] [rename --default-themes to --built-in-themes Mark Lentczner **20100723174429 Ignore-this: e9d44f91d0a7fc42553a96cbf10cdbaa ] [drop --themes support, add named theme support Mark Lentczner **20100723065831 Ignore-this: b1cf6d70e180c049ed9c0ee42970d47a decided that --themes was silly - no one would do that, just use multiple --theme arguments made --theme a synonym for --css and -c made those arguments, if no file is found, look up the argument as the name of a built in theme all of this let's haddock be invoked with "--theme=classic" for example. ] [command like processing for theme selection Mark Lentczner **20100723061935 Ignore-this: 49bc0a24b92eaf7a0a77f7d777bbdcf4 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. ] [tweaks to nhaddock.css Mark Lentczner **20100722214534 Ignore-this: e1ecdd20e74bf705676f374d7814c899 ] [remove --html-help support - it was old, out-of-date, and mostly missing Mark Lentczner **20100722064332 Ignore-this: bfca85a522fa54ac2aa77eda333c824f ] [remove old HTML backend Mark Lentczner **20100722062223 Ignore-this: e08476339289aca6f61082d149cac1 ] [further cleanup of nhaddock.css, float TOC, support aux. pages Mark Lentczner **20100721224214 Ignore-this: aaef3fe4f012deef7f951be1656a0e5a ] [reorganization of nhaddock.css with tibbe Mark Lentczner **20100721220904 Ignore-this: 54d875f93101e4f2b31eec1ac37bde20 ] [Remove conflict left-over David Waern **20100724153437 Ignore-this: 32fa621cb1caafbfa3fdc3300c03cc82 ] [Fix build with ghc < 6.13 David Waern **20100724153333 Ignore-this: 40e65de9c2675bc01887e3d7b406b171 ] [fix warnings Simon Marlow **20100714123711 Ignore-this: 5cb30ece7e33bd110008d3413dca0b1c ] [common up code for instance rendering Simon Marlow **20100714084921 Ignore-this: d674c2f3a393e0cca754b678f50a573e ] [Follow mkPState argument order change Ian Lynagh **20100706172716] [Solve conflict David Waern **20100722193128 Ignore-this: e150ecbb5d1ff573e55b4ddbb85c27a5 ] [fix warning Simon Marlow **20100630153437 Ignore-this: b2e2812beefb58f53dd5bd0867e87ed3 ] [Solve conflicts David Waern **20100722192941 Ignore-this: 8b0d0d7a85053429164869c764bb6822 ] [fix warnings Simon Marlow **20100630153432 Ignore-this: 3bae4f1458af642c1f710eabfa5cc269 ] [Improve function name David Waern **20100722172158 Ignore-this: 24ee74814721817f914e711199967f56 ] [Fix a bug where we allowed --hoogle, --latex, etc without input files David Waern **20100722165046 Ignore-this: 4d87f7b322f2410168a1373678390706 ] [merge with David's source cleanups Mark Lentczner **20100721174335 Ignore-this: ec6b6db82b3c6c999a97e7f634f7a7c6 ] [space between "Style" and the downward triangle Mark Lentczner **20100721051549 Ignore-this: 1f9d7fb18514b8c6066327005bd055d0 ] [apply Tibbe's updates to his theme Mark Lentczner **20100721045647 Ignore-this: de447f4eb6bbc5c3fa8abc9b95cf2a9 ] [correct icon used with Snappy theme Mark Lentczner **20100721044934 Ignore-this: 67938542a37addf0a78257b99f1b190b ] [add Thomas Schilling's theme Mark Lentczner **20100720172935 Ignore-this: 717e7de472a4c337dbb1e06dc833b423 ] [move CSS Theme functions into Themes.hs Mark Lentczner **20100720172552 Ignore-this: 1f9f9de17e6c07fd40a74a500366f65e ] [Add -fwarn-tabs David Waern **20100721151931 Ignore-this: 14c2fe93baccf070086a6f382e2e1036 ] [Style police in Haddock.Utils David Waern **20100721151635 Ignore-this: ef235c306a1704cca278fd2e4c034411 ] [Whitespace police David Waern **20100721151133 Ignore-this: c19049254c65b29a68ce1c1d3f6de65b ] [Style police in Haddock.InterfaceFile David Waern **20100721150906 Ignore-this: debba554529ba0d518138ead0caf9195 ] [Style police in Haddock.GhcUtils David Waern **20100721150811 Ignore-this: 844558c41683417c7b1f8ed03eb5afe0 ] [Trailing whitespace in Haddock.Convert David Waern **20100721150706 Ignore-this: d0e0d4a7a7a7d0b9d4c1f9883694e680 ] [Trailing whitespace in Documentation.Haddock David Waern **20100721150617 Ignore-this: 3721bf87ccc9ba30a5a8166d50fd1607 ] [Doc sections in Main David Waern **20100721150547 Ignore-this: 7358c6eacffe93109282924755cdeb61 ] [Style police in LaTeX backend (mainly more newlines) David Waern **20100721145046 Ignore-this: 476c9f9736be4e1417b66f6194055ec3 ] [Fix warnings in LaTeX backend David Waern **20100721144203 Ignore-this: 5d8ab669013dbabbdaf534c1c74b80bf ] [Style police in H.B.Xhtml David Waern **20100721142102 Ignore-this: 6ae49da5a0ca570f6f5096bac71c97f1 ] [More style police David Waern **20100721141732 Ignore-this: e6d9645e72408fad77140418dda5438d ] [Style police in H.B.X.DocMarkup David Waern **20100721141445 Ignore-this: f70d3f768230414ee1ee86fa7ef0040 ] [Style police in H.B.X.Decl David Waern **20100721140122 Ignore-this: cf7e973e53b0f34b74aee665120f1964 ] [Style police David Waern **20100721135043 Ignore-this: 3cfb7b113ce36f576b6d84f86e2587f9 ] [Remove more trailing whitespace David Waern **20100721134427 Ignore-this: ab61b1508d831b69c9ad0b6f0f543fe ] [Remove trailing whitespace in H.B.X.Decl David Waern **20100721133904 Ignore-this: 541900f6f7ac791891814a8e02329d2 ] [Align a few comments David Waern **20100721133321 Ignore-this: a0909a51536e8a4036cef9a642d83266 ] [Remove trailing whitespace in Haddock.Backends.Xhtml David Waern **20100721133054 Ignore-this: 9b258df8f26a236457359329988f9be3 ] [rename Haddock.Backends.Xhtml.Util to Utils Mark Lentczner **20100719065615 Ignore-this: 9c535c790e1d015a44afe70fc4c89c1a ] [remove an explicit bold tag - replace with .def class Mark Lentczner **20100719053555 Ignore-this: 944be4f381e59eddaa2fee703b438670 ] [refactoring of anchor ID and fragment handling Mark Lentczner **20100719052053 Ignore-this: 9d62217610360b3a767036177a27cc8 ] [add .doc class to documentation blocks Mark Lentczner **20100718061222 Ignore-this: c60472eacecf6671d82e86699a43a03b ] [added content div to main pages Mark Lentczner **20100718054839 Ignore-this: d11e3470c6f9ead192bcca6505e3dc4f ] [cleaned up div functions in Layout.hs Mark Lentczner **20100718053429 Ignore-this: 4a3f942a0970b1a42c45108d740ede36 ] [fixed alphabet on index page, and styling of it and packages in module lists Mark Lentczner **20100718044138 Ignore-this: 7e93b019c844375e44d4c806f59e4b99 ] [styling auxillary pages for tibbe and snappy themes Mark Lentczner **20100717184830 Ignore-this: 576f42a3fdf94b16d71fd43f6bb3d505 ] [moved footer into only place that used it Mark Lentczner **20100717064820 Ignore-this: 4467ca7b4db9a40cac148308cd0a116c ] [refactored out main page body generation Mark Lentczner **20100717064454 Ignore-this: 3f03721c227be451701a0c871e3846c2 ] [factored out head element generation Mark Lentczner **20100717061753 Ignore-this: 2a14e66b237a15fbf08a513cead137d8 ] [qualify import of XHtml as XHtml Mark Lentczner **20100717053850 Ignore-this: ce777e832503d83e32411632e1193a37 ] [clean up Util.hs Mark Lentczner **20100717053516 Ignore-this: efd1cd3f0aaed7ebd96f5084303d43dd ] [clean up Layout.hs: no more vanillaTable Mark Lentczner **20100717051145 Ignore-this: 8d10db1cbca6ecdbb729579b24645407 ] [classing styling of ancillary pages Mark Lentczner **20100717050729 Ignore-this: 45f2b016c8a676603a7a266fedcf9780 ] [convert index.html to new markup, adjust module markup Mark Lentczner **20100717040722 Ignore-this: 9305d8063b5dd0c83a4d9292604a257 ] [convert index to new markup Mark Lentczner **20100716224153 Ignore-this: 1695f8f07afefb0d8d22cd03935e45a7 ] [reformat index-frames Mark Lentczner **20100716205841 Ignore-this: 8bb2d56f1d85965b970e06ccff5aa90a ] [new output for mini_ pages Mark Lentczner **20100716201239 Ignore-this: fc8922953c16f9a0654713ab9ad6aa7b ] [fixed package catpion, added style menu Mark Lentczner **20100716045738 Ignore-this: 6a71ce03200a37a10bdf01ff392734bd ] [added two new themes and rough css switcher Mark Lentczner **20100715235301 Ignore-this: 1c498b2c062cd9227dfaa8739c8232d6 ] [clean up of anchors Mark Lentczner **20100715050226 Ignore-this: a699c4abdb74c954fb56b462642c965c ] [clean up synopsis lists Mark Lentczner **20100714234342 Ignore-this: 77f86989cfeb79195ce92883d369201a ] [methods and associated types in new layout scheme Mark Lentczner **20100714215458 Ignore-this: d7e50519d74d99d0043e887883299809 ] [removing old table cruft from Layout.hs Mark Lentczner **20100714210732 Ignore-this: ec2fe88e2db1dd22bc0c9c46ab310a9e ] [convert instances to SubDecl Mark Lentczner **20100714162853 Ignore-this: 869037e43475591ec920e9923a81945a ] [convert args to SubDecl format Mark Lentczner **20100714160054 Ignore-this: 674b27c52af42abbf63f15348b61b157 ] [made subDecl tables looks just so Mark Lentczner **20100714070410 Ignore-this: cd386efa745e34cb7b5c55f4e56128c ] [better interface to subDecls Mark Lentczner **20100714053832 Ignore-this: f812cdfbecfd585fec76ee03e09a9f9a ] [constructors and args as dl lists, built in Layout.hs Mark Lentczner **20100714042155 Ignore-this: b7e7b82f0b637223472d29190c46c44 ] [change to new page structure Mark Lentczner **20100713052621 Ignore-this: b7c45f1c88a9559c0af4ea78fabb5573 ] [remove <++> connector Mark Lentczner **20100617222056 Ignore-this: aa4ec1016da96b0df2131775a8b3afd8 ] [push single constructors (newtype) onto line with decl Mark Lentczner **20100617173601 Ignore-this: 7480e589fd78cc012c218901c57696ba ] [factored out ppInstances Mark Lentczner **20100611232746 Ignore-this: def1b8a5840214038f1cb1520ed786ce ] [changed tt elements to code elements Mark Lentczner **20100611213408 Ignore-this: a480e7fdb89604961df4b74d161198e8 ] [fix missing space in "module" lines in synoposis Mark Lentczner **20100611211444 Ignore-this: ab1eb30c652b389f1963a36aad5cff0e ] [adjust synopsis and bottom bar spacing Mark Lentczner **20100611210358 Ignore-this: f4909c38aab974e9d2b97f38897d442c ] [merge in changes from the big-whitespace cleanup Mark Lentczner **20100524131342 Ignore-this: 219213dd1933d08ca1976cab12c94ad9 ] [added assoicated types and methods back into class decls Mark Lentczner **20100504061434 Ignore-this: 5f744b1d0a24bb75aebf9455aae89f53 ] [adjust css for current markup Mark Lentczner **20100503230431 Ignore-this: 90af05eda936b014de1595a4ece05179 ] [fixed javascript quoting/escpaing issue Mark Lentczner **20100425062610 Ignore-this: 5d94e4d0c456da3a1856fc6fb00ca734 ] [remove unused bodyBox Mark Lentczner **20100425053835 Ignore-this: 5c0d60daeeecc6f0698bca208d5b357d ] [fix class member boxes in summary Mark Lentczner **20100425053659 Ignore-this: 46235a55f324d9de489b20ec9e83e859 ] [fixed surround of instance and constructor tables Mark Lentczner **20100425052328 Ignore-this: 9f9eb32a9194abc461adba0bd2bf0add ] [made record fields be an unordList, not a table Mark Lentczner **20100425045637 Ignore-this: 578d4c985cd8e64a24659abd977ec398 ] [merge in markupExample changes Mark Lentczner **20100412050753 Ignore-this: ff63f4c16690eb5114591f6af0b18deb ] [removed declWithDoc and cleaned up data decls in summary Mark Lentczner **20100412045627 Ignore-this: 14a5da205f89e78e429b42abcdb3fd10 ] [removed commented out code that can't be maintained Mark Lentczner **20100410212916 Ignore-this: 65350487a89870eb5a75611d9da5a75 ] [data decls are now a sequence of paragraphs, not a table Mark Lentczner **20100410212321 Ignore-this: dd08c5a590835dc86075331adf913797 ] [clean up processExport and place a div around each decl Mark Lentczner **20100405050243 Ignore-this: 172f309199a9d8f7a2c58a3e859a190e ] [all decls now generate Html not HtmlTable Mark Lentczner **20100404062414 Ignore-this: 6e5388455617d02808d3a4f5cf0b543f - ppDecl return Html, and so now do all of the functions it calls - added some internal tables to some decls, which is wrong, and will have to be fixed - decl "Box" functions became "Elem" functions to make clear they aren't in a table anymore (see Layout.hs) - docBox went away, as only used in one place (and its days are numbered) - cleaned up logic in a number of places, removed dead code - added maybeDocToHtml which simplified a number of places in the code ] [tweak list css Mark Lentczner **20100404045108 Ignore-this: 67f08bb7ae97dadbee3a5fac4313409d ] [clean up Doc formatting code Mark Lentczner **20100403191422 Ignore-this: fb3a80bcf6da259dbd91b8d89bcb564f - add CSS for lists - renderToString now uses showHtml since prettyHtml messes up

 sections
] 
[add exports to Xhtml modules
Mark Lentczner **20100321045116
 Ignore-this: 3e9efa0b6118e64ce7dbe39d09352325
] 
[Add missing dependencies to cabal file
Simon Hengel **20100710091904
 Ignore-this: 4ef8c52548ca50e4481b69e8edafcbf2
] 
[Fix a bug in attachInstances
David Waern **20100704145339
 Ignore-this: 6c0ca382763735ae14a698f21eeb2a83
 
 We didn't look for instance docs in all the interfaces of the package. This had
 the effect of instance docs not always showing up under a declaration. I took
 the opportunity to clean up the code in H.I.AttachInstances a bit as well. More
 cleanup is needed, however.
] 
[Warning police
David Waern **20100701161218
 Ignore-this: 91c648b28341774c8d9ab05a9f5911f1
] 
[Update test following Simon's patch to render unresolved names in monospaced font
David Waern **20100701154333
 Ignore-this: 5a7004ea42180e7afa62342e4a0932ab
] 
[Make runtest.hs work with GHC 6.12.3 (we should really stop hard coding this)
David Waern **20100701154245
 Ignore-this: a669c33d860249576e85ea524aa4a5d6
] 
[Fix a few stylistic whitespace issues in LaTeX backend
David Waern **20100701120244
 Ignore-this: ecbbc108281fb7a2f6a1d6877b09cccd
] 
[LaTeX backend (new options: --latex, --latex-style=