aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/GhcUtils.hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2021-04-15 20:57:21 +0100
committerBen Gamari <ben@smart-cactus.org>2021-04-19 18:26:46 -0400
commitb4e7407bc1b61371672c6f0ca3f79954772f7e89 (patch)
tree135d7aa05c826d2ed7ac443c067ff418ab5e2da0 /haddock-api/src/Haddock/GhcUtils.hs
parent4411b41aee79fa6365773e4660ca8e3acc6a5b32 (diff)
Update for EPA changes in GHC
(cherry picked from commit cafb48118f7c111020663776845897e225607b41)
Diffstat (limited to 'haddock-api/src/Haddock/GhcUtils.hs')
-rw-r--r--haddock-api/src/Haddock/GhcUtils.hs6
1 files changed, 3 insertions, 3 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)