diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-03-31 11:34:17 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2021-03-31 11:34:17 -0400 |
commit | c623c7d2df417caac4b72b747ef5262d86ee776a (patch) | |
tree | 3408bccdb48bb9f9264cd4974ac09911cf30a518 /haddock-api/src/Haddock/GhcUtils.hs | |
parent | 9809d1bd36812f757f71c13015d3186226e28f23 (diff) | |
parent | d8d8024ad6796549a8d3b5512dabf3288d14e30f (diff) |
Merge commit 'd8d8024ad6796549a8d3b5512dabf3288d14e30f' into ghc-head
Diffstat (limited to 'haddock-api/src/Haddock/GhcUtils.hs')
-rw-r--r-- | haddock-api/src/Haddock/GhcUtils.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/haddock-api/src/Haddock/GhcUtils.hs b/haddock-api/src/Haddock/GhcUtils.hs index b8db6dfd..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 ~ ApiAnn' 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 ~ ApiAnn' 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 ~ ApiAnn' 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) |