diff options
author | David Waern <david.waern@gmail.com> | 2008-06-30 10:37:21 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2008-06-30 10:37:21 +0000 |
commit | fac1e67f3fe23d9b455a1307d252a7d5d6882efd (patch) | |
tree | ae7b87b26cb2dba2796fe9162cf75fa0f087c294 /src | |
parent | 44af9f6a215e70219e1b5eae16e23fc954bea27e (diff) |
Rename type patterns
Diffstat (limited to 'src')
-rw-r--r-- | src/Haddock/Interface/Rename.hs | 14 |
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 |