aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonmar <unknown>2002-05-09 11:10:55 +0000
committersimonmar <unknown>2002-05-09 11:10:55 +0000
commit5fb45e925cb292c4e5052f076f6e07744406585c (patch)
tree3a488f7c2e6c97ce8b370d5bbfadddc24542ea34
parent032e2b4257eda3003159a68ef47a27b70837ce4f (diff)
[haddock @ 2002-05-09 11:10:55 by simonmar]
Add a special case for list types in ppHsAType
-rw-r--r--src/HaddockHtml.hs14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/HaddockHtml.hs b/src/HaddockHtml.hs
index 96658cb6..9ff9c433 100644
--- a/src/HaddockHtml.hs
+++ b/src/HaddockHtml.hs
@@ -680,19 +680,21 @@ ppHsBType (HsTyApp (HsTyCon (Qual (Module "Prelude") (HsTyClsName (HsSpecial "[]
ppHsBType (HsTyApp a b) = ppHsBType a <+> ppHsAType b
ppHsBType t = ppHsAType t
--- -----------------------------------------------------------------------------
--- Names
-
-linkTarget :: HsName -> Html
-linkTarget nm = anchor ! [name (hsNameStr nm)] << toHtml ""
-
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 (HsTyApp (HsTyCon (Qual (Module "Prelude") (HsTyClsName (HsSpecial "[]")))) b )
+ = brackets $ ppHsType b
ppHsAType t = parens $ ppHsType t
+-- -----------------------------------------------------------------------------
+-- Names
+
+linkTarget :: HsName -> Html
+linkTarget nm = anchor ! [name (hsNameStr nm)] << toHtml ""
+
ppHsQName :: HsQName -> Html
ppHsQName (UnQual str) = ppHsName str
ppHsQName n@(Qual (Module mod) str)