aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsimonmar <unknown>2002-07-10 09:40:56 +0000
committersimonmar <unknown>2002-07-10 09:40:56 +0000
commit3dc04655c5aa80676489dd45ad6bb7d61013ec5b (patch)
tree379415ecb796178893f847b5254f83ee35e84262 /src
parent9728087302a03143624d030642770f17be1eb097 (diff)
[haddock @ 2002-07-10 09:40:56 by simonmar]
Fix for rendering of the (->) type constructor, from Ross Paterson.
Diffstat (limited to 'src')
-rw-r--r--src/HaddockHtml.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/HaddockHtml.hs b/src/HaddockHtml.hs
index a503d50f..23d4c512 100644
--- a/src/HaddockHtml.hs
+++ b/src/HaddockHtml.hs
@@ -748,7 +748,9 @@ ppHsAType :: HsType -> Html
ppHsAType (HsTyTuple True l) = parenList . map ppHsType $ l
ppHsAType (HsTyTuple False l) = ubxParenList . map ppHsType $ l
ppHsAType (HsTyVar name) = ppHsName name
-ppHsAType (HsTyCon name) = ppHsQName name
+ppHsAType (HsTyCon name)
+ | name == fun_tycon_name = parens $ ppHsQName name
+ | otherwise = ppHsQName name
ppHsAType (HsTyApp (HsTyCon (Qual _ (HsTyClsName (HsSpecial "[]")))) b )
= brackets $ ppHsType b
ppHsAType t = parens $ ppHsType t