diff options
author | David Waern <david.waern@gmail.com> | 2010-10-16 17:34:30 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2010-10-16 17:34:30 +0000 |
commit | 0a93ff502d346fbbe809a336814a837aa10f120e (patch) | |
tree | 2fc6a1e503234d4f5c68aca889ab1b1a3456e11d | |
parent | 3ded4303dee8cf4cca6a91382f54bed37546631f (diff) |
Solve conflicts
-rw-r--r-- | src/Haddock/Backends/Xhtml.hs | 28 | ||||
-rw-r--r-- | src/Haddock/Backends/Xhtml/Layout.hs | 3 | ||||
-rw-r--r-- | src/Haddock/Options.hs | 10 |
3 files changed, 27 insertions, 14 deletions
diff --git a/src/Haddock/Backends/Xhtml.hs b/src/Haddock/Backends/Xhtml.hs index 433ea212..9baa929e 100644 --- a/src/Haddock/Backends/Xhtml.hs +++ b/src/Haddock/Backends/Xhtml.hs @@ -598,7 +598,7 @@ ppModuleContents quali exports | lev <= n = ( [], items ) | otherwise = ( html:secs, rest2 ) where - html = linkedAnchor id0 << docToHtml doc +++ mk_subsections ssecs + html = linkedAnchor (groupId id0) << docToHtml quali doc +++ mk_subsections ssecs (ssecs, rest1) = process lev rest (secs, rest2) = process n rest1 process n (_ : rest) = process n rest @@ -619,18 +619,20 @@ numberSectionHeadings exports = go 1 exports = other : go n es -processExport :: Bool -> LinksInfo -> Bool -> (ExportItem DocName) -> Maybe Html -processExport summary _ _ (ExportGroup lev id0 doc) - = nothingIf summary $ groupTag lev ! [identifier 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) +processExport :: Bool -> LinksInfo -> Bool -> Qualification + -> (ExportItem DocName) -> Maybe Html +processExport summary _ _ quali (ExportGroup lev id0 doc) + = nothingIf summary $ groupHeading lev id0 << docToHtml quali doc +processExport summary links unicode quali (ExportDecl decl doc subdocs insts) + = processDecl summary $ ppDecl summary links decl doc insts subdocs unicode quali +processExport summary _ _ quali (ExportNoDecl y []) + = processDeclOneLiner summary $ ppDocName quali y +processExport summary _ _ quali (ExportNoDecl y subs) + = processDeclOneLiner summary $ + ppDocName quali y +++ parenList (map (ppDocName quali) subs) +processExport summary _ _ quali (ExportDoc doc) + = nothingIf summary $ docSection quali doc +processExport summary _ _ _ (ExportModule mdl) = processDeclOneLiner summary $ toHtml "module" <+> ppModule mdl diff --git a/src/Haddock/Backends/Xhtml/Layout.hs b/src/Haddock/Backends/Xhtml/Layout.hs index 7277a683..9ccdd699 100644 --- a/src/Haddock/Backends/Xhtml/Layout.hs +++ b/src/Haddock/Backends/Xhtml/Layout.hs @@ -119,7 +119,8 @@ subDlist quali decls = Just $ dlist << map subEntry decls +++ clearDiv subEntry (decl, mdoc, subs) = dterm ! [theclass "src"] << decl +++ - docElement ddef << (fmap docToHtml mdoc +++ subs) + docElement ddef << (fmap (docToHtml quali) mdoc +++ subs) + clearDiv = thediv ! [ theclass "clear" ] << noHtml diff --git a/src/Haddock/Options.hs b/src/Haddock/Options.hs index 0a8ebe94..1fe7a9f5 100644 --- a/src/Haddock/Options.hs +++ b/src/Haddock/Options.hs @@ -222,6 +222,16 @@ optDumpInterfaceFile flags = optLast [ str | Flag_DumpInterface str <- flags ] optLaTeXStyle :: [Flag] -> Maybe String optLaTeXStyle flags = optLast [ str | Flag_LaTeXStyle str <- flags ] + +optQualification :: [Flag] -> Qualification +optQualification flags = + case map (map Char.toLower) [ str | Flag_Qualification str <- flags ] of + "full":_ -> FullQuali + "local":_ -> LocalQuali Nothing + "relative":_ -> RelativeQuali Nothing + _ -> NoQuali + + verbosity :: [Flag] -> Verbosity verbosity flags = case [ str | Flag_Verbosity str <- flags ] of |