aboutsummaryrefslogtreecommitdiff
path: root/src/HaddockRename.hs
diff options
context:
space:
mode:
authorsof <unknown>2003-10-20 17:19:24 +0000
committersof <unknown>2003-10-20 17:19:24 +0000
commit187d7618e86c8db865c0cdcc38d0633c23cf1d88 (patch)
treef4fa0cd9d75889507ea427a2e378631bd26f6109 /src/HaddockRename.hs
parentd510b517e44664c581e5fe93da046ee1ba42945c (diff)
[haddock @ 2003-10-20 17:19:22 by sof]
support for i-parameters + zip comprehensions
Diffstat (limited to 'src/HaddockRename.hs')
-rw-r--r--src/HaddockRename.hs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/HaddockRename.hs b/src/HaddockRename.hs
index 994bf500..ef32ae80 100644
--- a/src/HaddockRename.hs
+++ b/src/HaddockRename.hs
@@ -151,6 +151,12 @@ renameBangTy (HsUnBangedTy ty) = HsUnBangedTy `liftM` renameType ty
renameContext :: HsContext -> RnM HsContext
renameContext = mapM renamePred
+renameIPContext :: HsIPContext -> RnM HsIPContext
+renameIPContext cs = mapM renameCtxt cs
+ where
+ renameCtxt (HsIP n t) = liftM (HsIP n) (renameType t)
+ renameCtxt (HsAssump c) = liftM HsAssump (renamePred c)
+
renamePred :: (HsQName,[HsType]) -> RnM (HsQName,[HsType])
renamePred (c,tys0) = do
tys <- mapM renameType tys0
@@ -158,13 +164,16 @@ renamePred (c,tys0) = do
renameType :: HsType -> RnM HsType
renameType (HsForAllType tvs ctx0 ty0) = do
- ctx <- mapM renamePred ctx0
+ ctx <- renameIPContext ctx0
ty <- renameType ty0
return (HsForAllType tvs ctx ty)
renameType (HsTyFun arg0 res0) = do
arg <- renameType arg0
res <- renameType res0
return (HsTyFun arg res)
+renameType (HsTyIP n ty0) = do
+ ty <- renameType ty0
+ return (HsTyIP n ty0)
renameType (HsTyTuple b tys0) = do
tys <- mapM renameType tys0
return (HsTyTuple b tys)