aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface/Specialize.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-05-21 22:29:30 -0400
committerBen Gamari <ben@smart-cactus.org>2021-05-21 22:29:30 -0400
commit8a5e37f32f772a320fd5f6aa86cc5c9c4d01f7cf (patch)
tree3ee1bbf9c3eb02881027f439ccaf0338a8509ad8 /haddock-api/src/Haddock/Interface/Specialize.hs
parent212f5302995cae9884aff924f0d53597bd77e9c2 (diff)
parent3b6a8774bdb543dad59b2618458b07feab8a55e9 (diff)
Merge commit '3b6a8774bdb543dad59b2618458b07feab8a55e9' into ghc-head
Diffstat (limited to 'haddock-api/src/Haddock/Interface/Specialize.hs')
-rw-r--r--haddock-api/src/Haddock/Interface/Specialize.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/haddock-api/src/Haddock/Interface/Specialize.hs b/haddock-api/src/Haddock/Interface/Specialize.hs
index 16f00fda..657da7ae 100644
--- a/haddock-api/src/Haddock/Interface/Specialize.hs
+++ b/haddock-api/src/Haddock/Interface/Specialize.hs
@@ -283,7 +283,7 @@ renameType (HsForAllTy x tele lt) =
<*> renameLType lt
renameType (HsQualTy x lctxt lt) =
HsQualTy x
- <$> renameMContext lctxt
+ <$> renameLContext lctxt
<*> renameLType lt
renameType (HsTyVar x ip name) = HsTyVar x ip <$> locatedN renameName name
renameType t@(HsStarTy _ _) = pure t
@@ -324,11 +324,10 @@ renameLKind = renameLType
renameLTypes :: [LHsType GhcRn] -> Rename (IdP GhcRn) [LHsType GhcRn]
renameLTypes = mapM renameLType
-renameMContext :: Maybe (LHsContext GhcRn) -> Rename (IdP GhcRn) (Maybe (LHsContext GhcRn))
-renameMContext Nothing = return Nothing
-renameMContext (Just (L l ctxt)) = do
+renameLContext :: LHsContext GhcRn -> Rename (IdP GhcRn) (LHsContext GhcRn)
+renameLContext (L l ctxt) = do
ctxt' <- renameContext ctxt
- return (Just (L l ctxt'))
+ return (L l ctxt')
renameContext :: HsContext GhcRn -> Rename (IdP GhcRn) (HsContext GhcRn)
renameContext = renameLTypes