diff options
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 |