aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface
diff options
context:
space:
mode:
Diffstat (limited to 'src/Haddock/Interface')
-rw-r--r--src/Haddock/Interface/Create.hs1
-rw-r--r--src/Haddock/Interface/Rename.hs16
2 files changed, 9 insertions, 8 deletions
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index 7e9b6a2b..00f1319c 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -159,7 +159,6 @@ parseOption other = tell ["Unrecognised option: " ++ other] >> return Nothing
type Maps = (DocMap Name, ArgMap Name, SubMap, DeclMap)
-
mkMaps :: DynFlags -> GlobalRdrEnv -> [ClsInst] -> [Name] -> [(LHsDecl Name, [HsDocString])] -> ErrMsgM Maps
mkMaps dflags gre instances exports decls = do
maps <- mapM f decls
diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs
index 670fa9cf..a295fe29 100644
--- a/src/Haddock/Interface/Rename.hs
+++ b/src/Haddock/Interface/Rename.hs
@@ -260,11 +260,13 @@ renameType t = case t of
renameLTyVarBndr :: LHsTyVarBndr Name -> RnM (LHsTyVarBndr DocName)
-renameLTyVarBndr (L loc tv) = do
- name' <- rename (hsTyVarName tv)
- tyvar' <- replaceTyVarName tv name' renameLKind
- return $ L loc tyvar'
-
+renameLTyVarBndr (L loc (UserTyVar n tck))
+ = do { n' <- rename n
+ ; return (L loc (UserTyVar n' tck)) }
+renameLTyVarBndr (L loc (KindedTyVar n (HsBSig k fvs) tck))
+ = do { n' <- rename n
+ ; k' <- renameLKind k
+ ; return (L loc (KindedTyVar n' (HsBSig k' fvs) tck)) }
renameLContext :: Located [LHsType Name] -> RnM (Located [LHsType DocName])
renameLContext (L loc context) = do
@@ -330,12 +332,12 @@ renameTyClD d = case d of
-- I don't think we need the derivings, so we return Nothing
return (TyData x lcontext' lname' cType ltyvars' typats' k' cons' Nothing)
- TySynonym lname ltyvars typats ltype -> do
+ TySynonym lname ltyvars typats ltype fvs -> do
lname' <- renameL lname
ltyvars' <- mapM renameLTyVarBndr ltyvars
ltype' <- renameLType ltype
typats' <- mapM (mapM renameLType) typats
- return (TySynonym lname' ltyvars' typats' ltype')
+ return (TySynonym lname' ltyvars' typats' ltype' fvs)
ClassDecl lcontext lname ltyvars lfundeps lsigs _ ats at_defs _ -> do
lcontext' <- renameLContext lcontext