diff options
author | Thomas Winant <thomas.winant@cs.kuleuven.be> | 2015-06-08 23:47:28 -0500 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2015-12-14 15:14:05 +0000 |
commit | bf4041f408623536bd9684586f5736d5ca7f12dd (patch) | |
tree | b8524f5273dce96cebeeddda2d4adee332b7edc0 /haddock-api/src/Haddock/Interface/Rename.hs | |
parent | 75a23ec042888ba5387ad653b74fe170a6721784 (diff) |
Update after wild card renaming refactoring in D613
Summary:
* Move `Post*` type instances to `Haddock.Types` as other modules than
`Haddock.Interface.Rename` will rely on these type instances.
* Update after wild card renaming refactoring in D613.
Reviewers: simonpj, austin
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D954
GHC Trac Issues: #10098
Diffstat (limited to 'haddock-api/src/Haddock/Interface/Rename.hs')
-rw-r--r-- | haddock-api/src/Haddock/Interface/Rename.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Interface/Rename.hs b/haddock-api/src/Haddock/Interface/Rename.hs index 110c9a42..30074e4f 100644 --- a/haddock-api/src/Haddock/Interface/Rename.hs +++ b/haddock-api/src/Haddock/Interface/Rename.hs @@ -231,8 +231,7 @@ renameType t = case t of HsExplicitListTy a b -> HsExplicitListTy a <$> mapM renameLType b HsExplicitTupleTy a b -> HsExplicitTupleTy a <$> mapM renameLType b HsSpliceTy _ _ -> error "renameType: HsSpliceTy" - HsWildcardTy -> pure HsWildcardTy - HsNamedWildcardTy a -> HsNamedWildcardTy <$> rename a + HsWildCardTy a -> HsWildCardTy <$> renameWildCardInfo a renameLTyVarBndrs :: LHsTyVarBndrs Name -> RnM (LHsTyVarBndrs DocName) renameLTyVarBndrs (HsQTvs { hsq_kvs = _, hsq_tvs = tvs }) @@ -254,6 +253,10 @@ renameLContext (L loc context) = do context' <- mapM renameLType context return (L loc context') +renameWildCardInfo :: HsWildCardInfo Name -> RnM (HsWildCardInfo DocName) +renameWildCardInfo (AnonWildCard _) = pure (AnonWildCard PlaceHolder) +renameWildCardInfo (NamedWildCard name) = NamedWildCard <$> rename name + renameInstHead :: InstHead Name -> RnM (InstHead DocName) renameInstHead InstHead {..} = do cname <- rename ihdClsName |