diff options
Diffstat (limited to 'src/Haddock/Interface')
-rw-r--r-- | src/Haddock/Interface/Create.hs | 2 | ||||
-rw-r--r-- | src/Haddock/Interface/Rename.hs | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs index d4adbe1c..825e9624 100644 --- a/src/Haddock/Interface/Create.hs +++ b/src/Haddock/Interface/Create.hs @@ -354,7 +354,7 @@ topDecls = filterClasses . filterDecls . collectDocs . sortByLoc . ungroup -- | Take all declarations except pragmas, infix decls, rules from an 'HsGroup'. ungroup :: HsGroup Name -> [LHsDecl Name] ungroup group_ = - mkDecls (concat . hs_tyclds) TyClD group_ ++ + mkDecls (tyClGroupConcat . hs_tyclds) TyClD group_ ++ mkDecls hs_derivds DerivD group_ ++ mkDecls hs_defds DefD group_ ++ mkDecls hs_fords ForD group_ ++ 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 |