aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Backends/Xhtml.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2012-12-23 15:50:28 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2012-12-23 15:50:28 +0000
commit47be31308f5c90c4ae5e78252989c7da70b46e70 (patch)
tree46a2c53b699113671eab58bc95f9bd360ad5c828 /src/Haddock/Backends/Xhtml.hs
parent45e5d834d473ab2f5930371e272a438590bc3f7e (diff)
parent8bdd26e3d2864151c4d0dccbc530c2deac362892 (diff)
Merge branch 'master' of http://darcs.haskell.org//haddock
Diffstat (limited to 'src/Haddock/Backends/Xhtml.hs')
-rw-r--r--src/Haddock/Backends/Xhtml.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Haddock/Backends/Xhtml.hs b/src/Haddock/Backends/Xhtml.hs
index c68b7cbc..3251477a 100644
--- a/src/Haddock/Backends/Xhtml.hs
+++ b/src/Haddock/Backends/Xhtml.hs
@@ -556,10 +556,10 @@ processForMiniSynopsis :: Module -> Bool -> Qualification -> ExportItem DocName
processForMiniSynopsis mdl unicode qual (ExportDecl (L _loc decl0) _doc _ _insts) =
((divTopDecl <<).(declElem <<)) `fmap` case decl0 of
TyClD d -> let b = ppTyClBinderWithVarsMini mdl d in case d of
- (TyFamily{}) -> [ppTyFamHeader True False d unicode qual]
- (TyDecl{ tcdTyDefn = TyData {} }) -> [keyword "data" <+> b]
- (TyDecl{ tcdTyDefn = TySynonym {} }) -> [keyword "type" <+> b]
- (ClassDecl {}) -> [keyword "class" <+> b]
+ (FamDecl decl) -> [ppTyFamHeader True False decl unicode qual]
+ (DataDecl{}) -> [keyword "data" <+> b]
+ (SynDecl{}) -> [keyword "type" <+> b]
+ (ClassDecl {}) -> [keyword "class" <+> b]
_ -> []
SigD (TypeSig lnames (L _ _)) ->
map (ppNameMini mdl . nameOccName . getName . unLoc) lnames
@@ -578,8 +578,8 @@ ppNameMini mdl nm =
ppTyClBinderWithVarsMini :: Module -> TyClDecl DocName -> Html
ppTyClBinderWithVarsMini mdl decl =
- let n = unLoc $ tcdLName decl
- ns = tyvarNames $ tcdTyVars decl
+ let n = tcdName decl
+ ns = tyvarNames $ tcdTyVars decl -- it's safe to use tcdTyVars, see code above
in ppTypeApp n ns (ppNameMini mdl . nameOccName . getName) ppTyName