aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/Rename.hs
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2013-09-17 09:34:05 -0400
committerRichard Eisenberg <eir@cis.upenn.edu>2013-09-17 09:34:26 -0400
commit61335db90219eba267de90da1742a5b38f856e52 (patch)
tree5d9a33ece7ce5f0db02cdb3b824d4163c803d6f3 /src/Haddock/Interface/Rename.hs
parent076bdb97ee66496deb07448593e0a925e1f0321a (diff)
Revision to reflect new role annotation syntax in GHC.
Diffstat (limited to 'src/Haddock/Interface/Rename.hs')
-rw-r--r--src/Haddock/Interface/Rename.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs
index a6f48520..a5ed47e6 100644
--- a/src/Haddock/Interface/Rename.hs
+++ b/src/Haddock/Interface/Rename.hs
@@ -263,8 +263,6 @@ renameType t = case t of
k' <- renameLKind k
return (HsKindSig ty' k')
- HsRoleAnnot _ _ -> error "renameType: HsRoleAnnot"
-
HsDocTy ty doc -> do
ty' <- renameLType ty
doc' <- renameLDocHsSyn doc
@@ -290,10 +288,13 @@ renameLTyVarBndrs (HsQTvs { hsq_kvs = _, hsq_tvs = tvs })
-- This is rather bogus, but I'm not sure what else to do
renameLTyVarBndr :: LHsTyVarBndr Name -> RnM (LHsTyVarBndr DocName)
-renameLTyVarBndr (L loc (HsTyVarBndr n mkind mrole))
+renameLTyVarBndr (L loc (UserTyVar n))
+ = do { n' <- rename n
+ ; return (L loc (UserTyVar n')) }
+renameLTyVarBndr (L loc (KindedTyVar n kind))
= do { n' <- rename n
- ; mkind' <- mapM renameLKind mkind
- ; return (L loc (HsTyVarBndr n' mkind' mrole)) }
+ ; kind' <- renameLKind kind
+ ; return (L loc (KindedTyVar n' kind')) }
renameLContext :: Located [LHsType Name] -> RnM (Located [LHsType DocName])
renameLContext (L loc context) = do