aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/Rename.hs
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2008-06-30 10:45:07 +0000
committerDavid Waern <david.waern@gmail.com>2008-06-30 10:45:07 +0000
commitc5e16576f508bbe82835481b216a8a916d16b5ed (patch)
tree3dc75dafe29d510489d195275e4fb08094841ace /src/Haddock/Interface/Rename.hs
parentfac1e67f3fe23d9b455a1307d252a7d5d6882efd (diff)
Rename associated types
Diffstat (limited to 'src/Haddock/Interface/Rename.hs')
-rw-r--r--src/Haddock/Interface/Rename.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs
index ad1e9246..035f0910 100644
--- a/src/Haddock/Interface/Rename.hs
+++ b/src/Haddock/Interface/Rename.hs
@@ -294,6 +294,9 @@ renameDecl d = case d of
_ -> error "renameDecl"
+renameLTyClD (L loc d) = return . L loc =<< renameTyClD d
+
+
renameTyClD d = case d of
ForeignType lname a b -> do
lname' <- renameL lname
@@ -304,8 +307,6 @@ renameTyClD d = case d of
ltyvars' <- mapM renameLTyVarBndr ltyvars
return (TyFamily flav lname' ltyvars' kind)
-
-
TyData x lcontext lname ltyvars typats k cons _ -> do
lcontext' <- renameLContext lcontext
lname' <- renameL lname
@@ -322,14 +323,15 @@ renameTyClD d = case d of
-- We skip type patterns here as well.
return (TySynonym (keepL lname) ltyvars' typats' ltype')
- ClassDecl lcontext lname ltyvars lfundeps lsigs _ _ _ -> do
+ ClassDecl lcontext lname ltyvars lfundeps lsigs _ ats _ -> do
lcontext' <- renameLContext lcontext
+ lname' <- renameL lname
ltyvars' <- mapM renameLTyVarBndr ltyvars
lfundeps' <- mapM renameLFunDep lfundeps
lsigs' <- mapM renameLSig lsigs
+ ats' <- mapM renameLTyClD ats
-- we don't need the default methods or the already collected doc entities
- -- we skip the ATs for now.
- return (ClassDecl lcontext' (keepL lname) ltyvars' lfundeps' lsigs' emptyBag [] [])
+ return (ClassDecl lcontext' lname' ltyvars' lfundeps' lsigs' emptyBag ats' [])
where
renameLCon (L loc con) = return . L loc =<< renameCon con