diff options
Diffstat (limited to 'haddock-api/src/Haddock/Backends/Xhtml')
-rw-r--r-- | haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | 11 | ||||
-rw-r--r-- | haddock-api/src/Haddock/Backends/Xhtml/Layout.hs | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs index 176180ad..b3e1db81 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs @@ -223,6 +223,14 @@ ppTyName :: Name -> Html ppTyName = ppName Prefix +ppSimpleSig :: Unicode -> Qualification -> [DocName] -> HsType DocName -> Html +ppSimpleSig unicode qual names typ = + ppTypeSig True occNames ppTyp unicode + where + ppTyp = ppType unicode qual typ + occNames = map getOccName names + + -------------------------------------------------------------------------------- -- * Type families -------------------------------------------------------------------------------- @@ -542,8 +550,7 @@ ppInstanceSigs links splice unicode qual (InstSpec {..}) (InstHead {..}) = do TypeSig lnames (L sspan typ) _ <- ispecSigs let names = map unLoc lnames let typ' = rename' . sugar $ specializeTyVarBndrs ispecTyVars ihdTypes typ - return $ ppFunSig False links sspan noDocForDecl names typ' [] - splice unicode qual + return $ ppSimpleSig unicode qual names typ' where fv = foldr Set.union Set.empty . map freeVariables $ ihdTypes rename' = rename fv diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs index 188b4243..d971b0e5 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Layout.hs @@ -211,7 +211,7 @@ subClsInstance sid hdr mets = where anchorId = makeAnchorId $ "i:" ++ sid hdrDiv = thediv ! collapseControl anchorId False "instance" << hdr - methodDiv = thediv ! collapseSection anchorId False [] << subMethods mets + methodDiv = thediv ! collapseSection anchorId False [] << subBlock mets subMethods :: [Html] -> Html |