diff options
author | Ben Gamari <ben@smart-cactus.org> | 2015-12-20 01:14:35 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-12-20 01:14:35 +0100 |
commit | 19692aab1913730fc10ffda515b77db7308bcf11 (patch) | |
tree | 64408b3be93858108759eb85ddbc6c956778cfa4 /haddock-api/src/Haddock/Backends/Xhtml/Layout.hs | |
parent | edb3feb49d7d87365abac961368367944d85022d (diff) | |
parent | 52bc03a00cf57764cdab5124ee2b12acd5ad3780 (diff) |
Merge remote-tracking branch 'phadej/orphans' into ghc-head
Diffstat (limited to 'haddock-api/src/Haddock/Backends/Xhtml/Layout.hs')
-rw-r--r-- | haddock-api/src/Haddock/Backends/Xhtml/Layout.hs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs index d24ed9c4..98df09fe 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs @@ -31,7 +31,7 @@ module Haddock.Backends.Xhtml.Layout ( subConstructors, subEquations, subFields, - subInstances, subInstHead, subInstDetails, + subInstances, subOrphanInstances, subInstHead, subInstDetails, subMethods, subMinimal, @@ -200,7 +200,17 @@ subInstances qual nm lnks splice = maybe noHtml wrap . instTable subCaption = paragraph ! collapseControl id_ True "caption" << "Instances" id_ = makeAnchorId $ "i:" ++ nm - + +subOrphanInstances :: Qualification + -> LinksInfo -> Bool + -> [(SubDecl,Located DocName)] -> Html +subOrphanInstances qual lnks splice = maybe noHtml wrap . instTable + where + wrap = ((h1 << "Orphan instances") +++) + instTable = fmap (thediv ! collapseSection id_ True [] <<) . subTableSrc qual lnks splice + id_ = makeAnchorId $ "orphans" + + subInstHead :: String -- ^ Instance unique id (for anchor generation) -> Html -- ^ Header content (instance name and type) -> Html |