aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2021-04-15 20:57:21 +0100
committerHécate Moonlight <hecate+github@glitchbra.in>2021-05-11 10:15:17 +0200
commit07663b5e69b038b811d213701cba322e90e6f212 (patch)
tree20e5fc8f5d88764e6ec5853134d9e07eade60361 /haddock-api/src
parentbbaa3dfbf6ea4e0ad1356622ce7750ba76076b7d (diff)
Update for EPA changes in GHC
Diffstat (limited to 'haddock-api/src')
-rw-r--r--haddock-api/src/Haddock/GhcUtils.hs6
-rw-r--r--haddock-api/src/Haddock/Types.hs44
2 files changed, 25 insertions, 25 deletions
diff --git a/haddock-api/src/Haddock/GhcUtils.hs b/haddock-api/src/Haddock/GhcUtils.hs
index 2fc42131..1d6b8bc3 100644
--- a/haddock-api/src/Haddock/GhcUtils.hs
+++ b/haddock-api/src/Haddock/GhcUtils.hs
@@ -338,7 +338,7 @@ reparenTypePrec = go
where
-- Shorter name for 'reparenType'
- go :: XParTy a ~ EpAnn' AnnParen => Precedence -> HsType a -> HsType a
+ go :: XParTy a ~ EpAnn AnnParen => Precedence -> HsType a -> HsType a
go _ (HsBangTy x b ty) = HsBangTy x b (reparenLType ty)
go _ (HsTupleTy x con tys) = HsTupleTy x con (map reparenLType tys)
go _ (HsSumTy x tys) = HsSumTy x (map reparenLType tys)
@@ -378,11 +378,11 @@ reparenTypePrec = go
go _ t@XHsType{} = t
-- Located variant of 'go'
- goL :: XParTy a ~ EpAnn' AnnParen => Precedence -> LHsType a -> LHsType a
+ goL :: XParTy a ~ EpAnn AnnParen => Precedence -> LHsType a -> LHsType a
goL ctxt_prec = mapXRec @a (go ctxt_prec)
-- Optionally wrap a type in parens
- paren :: XParTy a ~ EpAnn' AnnParen
+ paren :: XParTy a ~ EpAnn AnnParen
=> Precedence -- Precedence of context
-> Precedence -- Precedence of top-level operator
-> HsType a -> HsType a -- Wrap in parens if (ctxt >= op)
diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs
index d9943e55..7c4aeb80 100644
--- a/haddock-api/src/Haddock/Types.hs
+++ b/haddock-api/src/Haddock/Types.hs
@@ -727,35 +727,35 @@ type instance Anno (HsOuterTyVarBndrs Specificity DocNameI) = SrcSpanAnnA
type instance Anno (HsSigType DocNameI) = SrcSpanAnnA
type XRecCond a
- = ( XParTy a ~ EpAnn' AnnParen
+ = ( XParTy a ~ EpAnn AnnParen
, NoGhcTc a ~ a
, MapXRec a
, UnXRec a
, WrapXRec a (HsType a)
)
-type instance XForAllTy DocNameI = EpAnn
-type instance XQualTy DocNameI = EpAnn
-type instance XTyVar DocNameI = EpAnn
-type instance XStarTy DocNameI = EpAnn
-type instance XAppTy DocNameI = EpAnn
-type instance XAppKindTy DocNameI = EpAnn
-type instance XFunTy DocNameI = EpAnn
-type instance XListTy DocNameI = EpAnn' AnnParen
-type instance XTupleTy DocNameI = EpAnn' AnnParen
-type instance XSumTy DocNameI = EpAnn' AnnParen
-type instance XOpTy DocNameI = EpAnn
-type instance XParTy DocNameI = EpAnn' AnnParen
-type instance XIParamTy DocNameI = EpAnn
-type instance XKindSig DocNameI = EpAnn
+type instance XForAllTy DocNameI = EpAnn [AddEpAnn]
+type instance XQualTy DocNameI = EpAnn [AddEpAnn]
+type instance XTyVar DocNameI = EpAnn [AddEpAnn]
+type instance XStarTy DocNameI = EpAnn [AddEpAnn]
+type instance XAppTy DocNameI = EpAnn [AddEpAnn]
+type instance XAppKindTy DocNameI = EpAnn [AddEpAnn]
+type instance XFunTy DocNameI = EpAnn [AddEpAnn]
+type instance XListTy DocNameI = EpAnn AnnParen
+type instance XTupleTy DocNameI = EpAnn AnnParen
+type instance XSumTy DocNameI = EpAnn AnnParen
+type instance XOpTy DocNameI = EpAnn [AddEpAnn]
+type instance XParTy DocNameI = EpAnn AnnParen
+type instance XIParamTy DocNameI = EpAnn [AddEpAnn]
+type instance XKindSig DocNameI = EpAnn [AddEpAnn]
type instance XSpliceTy DocNameI = Void -- see `renameHsSpliceTy`
-type instance XDocTy DocNameI = EpAnn
-type instance XBangTy DocNameI = EpAnn
-type instance XRecTy DocNameI = EpAnn
-type instance XExplicitListTy DocNameI = EpAnn
-type instance XExplicitTupleTy DocNameI = EpAnn
-type instance XTyLit DocNameI = EpAnn
-type instance XWildCardTy DocNameI = EpAnn
+type instance XDocTy DocNameI = EpAnn [AddEpAnn]
+type instance XBangTy DocNameI = EpAnn [AddEpAnn]
+type instance XRecTy DocNameI = EpAnn [AddEpAnn]
+type instance XExplicitListTy DocNameI = EpAnn [AddEpAnn]
+type instance XExplicitTupleTy DocNameI = EpAnn [AddEpAnn]
+type instance XTyLit DocNameI = EpAnn [AddEpAnn]
+type instance XWildCardTy DocNameI = EpAnn [AddEpAnn]
type instance XXType DocNameI = HsCoreTy
type instance XHsForAllVis DocNameI = NoExtField