aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2008-06-30 10:37:21 +0000
committerDavid Waern <david.waern@gmail.com>2008-06-30 10:37:21 +0000
commitfac1e67f3fe23d9b455a1307d252a7d5d6882efd (patch)
treeae7b87b26cb2dba2796fe9162cf75fa0f087c294
parent44af9f6a215e70219e1b5eae16e23fc954bea27e (diff)
Rename type patterns
-rw-r--r--src/Haddock/Interface/Rename.hs14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs
index 1939bb9b..ad1e9246 100644
--- a/src/Haddock/Interface/Rename.hs
+++ b/src/Haddock/Interface/Rename.hs
@@ -304,19 +304,23 @@ renameTyClD d = case d of
ltyvars' <- mapM renameLTyVarBndr ltyvars
return (TyFamily flav lname' ltyvars' kind)
- TyData x lcontext lname ltyvars _ k cons _ -> do
+
+
+ TyData x lcontext lname ltyvars typats k cons _ -> do
lcontext' <- renameLContext lcontext
+ lname' <- renameL lname
ltyvars' <- mapM renameLTyVarBndr ltyvars
+ typats' <- mapM (mapM renameLType) typats
cons' <- mapM renameLCon cons
-- I don't think we need the derivings, so we return Nothing
- -- We skip the type patterns too. TODO: find out what they are :-)
- return (TyData x lcontext' (keepL lname) ltyvars' Nothing k cons' Nothing)
+ return (TyData x lcontext' lname' ltyvars' typats' k cons' Nothing)
- TySynonym lname ltyvars typat ltype -> do
+ TySynonym lname ltyvars typats ltype -> do
ltyvars' <- mapM renameLTyVarBndr ltyvars
ltype' <- renameLType ltype
+ typats' <- mapM (mapM renameLType) typats
-- We skip type patterns here as well.
- return (TySynonym (keepL lname) ltyvars' Nothing ltype')
+ return (TySynonym (keepL lname) ltyvars' typats' ltype')
ClassDecl lcontext lname ltyvars lfundeps lsigs _ _ _ -> do
lcontext' <- renameLContext lcontext