aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock
diff options
context:
space:
mode:
authorWolfgang Jeltsch <g9ks157k@acme.softbase.org>2007-12-03 23:47:55 +0000
committerWolfgang Jeltsch <g9ks157k@acme.softbase.org>2007-12-03 23:47:55 +0000
commit2833ace46eb35266ebfe1a5bb8629210413b1be1 (patch)
tree750389cd5a64bb048e0f70106ff63781bf959276 /src/Haddock
parentb4f50066113eac7ad9a6349df796042b24b02869 (diff)
addition of type equality support (at least for HTML generation)
Diffstat (limited to 'src/Haddock')
-rw-r--r--src/Haddock/Backends/Html.hs1
-rw-r--r--src/Haddock/Interface/Rename.hs4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/Haddock/Backends/Html.hs b/src/Haddock/Backends/Html.hs
index 4a8c41d8..0aa6d85e 100644
--- a/src/Haddock/Backends/Html.hs
+++ b/src/Haddock/Backends/Html.hs
@@ -776,6 +776,7 @@ ppLPred = ppPred . unLoc
ppPred (HsClassP n ts) = ppDocName n <+> hsep (map ppLType ts)
-- TODO: find out what happened to the Dupable/Linear distinction
+ppPred (HsEqualP t1 t2) = ppLType t1 <+> toHtml "~" <+> ppLType t2
ppPred (HsIParam (IPName n) t)
= toHtml "?" +++ ppDocName n <+> dcolon <+> ppLType t
diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs
index 81717716..947c3b29 100644
--- a/src/Haddock/Interface/Rename.hs
+++ b/src/Haddock/Interface/Rename.hs
@@ -197,6 +197,10 @@ renamePred (HsClassP name types) = do
name' <- rename name
types' <- mapM renameLType types
return (HsClassP name' types')
+renamePred (HsEqualP type1 type2) = do
+ type1' <- renameLType type1
+ type2' <- renameLType type2
+ return (HsEqualP type1' type2')
renamePred (HsIParam (IPName name) t) = do
name' <- rename name
t' <- renameLType t