Simon Peyton Jones pushed to branch wip/T27466 at Glasgow Haskell Compiler / GHC Commits: 397b8c44 by Simon Peyton Jones at 2026-07-03T03:31:35+01:00 Honour -dsuppress-coercions in GHC.Core.TyCo.pprCo Fixes #27467 - - - - - 1 changed file: - compiler/GHC/Core/Ppr.hs Changes: ===================================== compiler/GHC/Core/Ppr.hs ===================================== @@ -292,14 +292,14 @@ noParens :: SDoc -> SDoc noParens pp = pp pprOptCo :: Coercion -> SDoc --- Print a coercion with its type +-- Print a coercion with its type (unless suppressed by -dsuppress-coercion-types) -- Honour -dsuppress-coercions -- Placed here because it needs GHC.Core.Coercion.coercionType -pprOptCo co = sep [pprCo co, dcolon <+> co_type] - where - co_type = sdocOption sdocSuppressCoercionTypes $ \case - True -> ellipsis - False -> ppr (coercionType co) +pprOptCo co = sdocOption sdocSuppressCoercionTypes $ \case + True -> pprParendCo co + False -> parens (sep [pprCo co, dcolon <+> pp_co_type]) + where + pp_co_type = ppr (coercionType co) ppr_id_occ :: (SDoc -> SDoc) -> Id -> SDoc ppr_id_occ add_par id View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/397b8c44db6f1e59dfb54e8cf6c2dde1... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/397b8c44db6f1e59dfb54e8cf6c2dde1... You're receiving this email because of your account on gitlab.haskell.org.