aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/GhcUtils.hs
diff options
context:
space:
mode:
authorHécate Moonlight <hecate+github@glitchbra.in>2021-05-11 10:14:47 +0200
committerHécate Moonlight <hecate+github@glitchbra.in>2021-05-11 10:14:47 +0200
commitbbaa3dfbf6ea4e0ad1356622ce7750ba76076b7d (patch)
tree5ae34152a28115ae0540469fcb993b70815f6026 /haddock-api/src/Haddock/GhcUtils.hs
parent72118896464f94d81f10c52f5d9261efcacc57a6 (diff)
Revert "Removal of HsVersions.h (#1388)"
This reverts commit 72118896464f94d81f10c52f5d9261efcacc57a6.
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 1d6b8bc3..2fc42131 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)