aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface/Create.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/Create.hs
parent212f5302995cae9884aff924f0d53597bd77e9c2 (diff)
parent3b6a8774bdb543dad59b2618458b07feab8a55e9 (diff)
Merge commit '3b6a8774bdb543dad59b2618458b07feab8a55e9' into ghc-head
Diffstat (limited to 'haddock-api/src/Haddock/Interface/Create.hs')
-rw-r--r--haddock-api/src/Haddock/Interface/Create.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs
index a280c0b2..2d79bb97 100644
--- a/haddock-api/src/Haddock/Interface/Create.hs
+++ b/haddock-api/src/Haddock/Interface/Create.hs
@@ -1113,7 +1113,7 @@ extractDecl declMap name decl
, Just rec <- map (getRecConArgs_maybe . unLoc) (dd_cons (feqn_rhs d))
, ConDeclField { cd_fld_names = ns } <- map unLoc (unLoc rec)
, L _ n <- ns
- , extFieldOcc n == name
+ , foExt n == name
]
in case matches of
[d0] -> extractDecl declMap name (noLocA . InstD noExtField $ DataFamInstD noExtField d0)
@@ -1146,9 +1146,9 @@ extractPatternSyn nm t tvs cons =
typ = longArrow args (data_ty con)
typ' =
case con of
- ConDeclH98 { con_mb_cxt = Just cxt } -> noLocA (HsQualTy noExtField (Just cxt) typ)
+ ConDeclH98 { con_mb_cxt = Just cxt } -> noLocA (HsQualTy noExtField cxt typ)
_ -> typ
- typ'' = noLocA (HsQualTy noExtField Nothing typ')
+ typ'' = noLocA (HsQualTy noExtField (noLocA []) typ')
in PatSynSig noAnn [noLocA nm] (mkEmptySigType typ'')
longArrow :: [LHsType GhcRn] -> LHsType GhcRn -> LHsType GhcRn
@@ -1174,7 +1174,7 @@ extractRecSel nm t tvs (L _ con : rest) =
where
matching_fields :: [LConDeclField GhcRn] -> [(SrcSpan, LConDeclField GhcRn)]
matching_fields flds = [ (l,f) | f@(L _ (ConDeclField _ ns _ _)) <- flds
- , L l n <- ns, extFieldOcc n == nm ]
+ , L l n <- ns, foExt n == nm ]
data_ty
-- ResTyGADT _ ty <- con_res con = ty
| ConDeclGADT{} <- con = con_res_ty con