Simon Peyton Jones pushed to branch wip/T26330 at Glasgow Haskell Compiler / GHC Commits: b90c741c by Simon Peyton Jones at 2025-09-17T22:55:27+01:00 Improve pretty printer for HsExpr Given a very deeply-nested application, it just kept printing deeper and deeper. This small change makes it cut off. The main payload is * At the start of `pprExpr` * In the defn of `pprApp` A little bit of refactoring: * It turned out that we were setting the default cut-off depth to a fixed value in two places, so changing one didn't change the other. See defaultSDocDepth and defaultSDocCols * I refactored `pprDeeperList` a bit so I could understand it better. Because the depth calculation has changed, there are lots of small error message wibbles. - - - - - 35 changed files: - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Runtime/Heap/Inspect.hs - compiler/GHC/Utils/Outputable.hs - testsuite/tests/arrows/gadt/T17423.stderr - testsuite/tests/indexed-types/should_compile/PushedInAsGivens.stderr - testsuite/tests/indexed-types/should_fail/T26176.stderr - testsuite/tests/indexed-types/should_fail/T2693.stderr - testsuite/tests/indexed-types/should_fail/T4093b.stderr - testsuite/tests/indexed-types/should_fail/T8518.stderr - testsuite/tests/indexed-types/should_fail/T9662.stderr - testsuite/tests/linear/should_fail/Linear17.stderr - testsuite/tests/linear/should_fail/LinearLet7.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail10.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail11.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail13.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.stderr - testsuite/tests/partial-sigs/should_compile/T21719.stderr - testsuite/tests/polykinds/T13393.stderr - testsuite/tests/rep-poly/T12709.stderr - testsuite/tests/simplCore/should_compile/simpl017.stderr - testsuite/tests/th/T10945.stderr - testsuite/tests/th/TH_StaticPointers02.stderr - testsuite/tests/typecheck/should_compile/T11339.stderr - testsuite/tests/typecheck/should_fail/DoExpansion3.stderr - testsuite/tests/typecheck/should_fail/T12177.stderr - testsuite/tests/typecheck/should_fail/T22707.stderr - testsuite/tests/typecheck/should_fail/T24064.stderr - testsuite/tests/typecheck/should_fail/T8603.stderr - testsuite/tests/typecheck/should_fail/tcfail128.stderr - testsuite/tests/typecheck/should_fail/tcfail153.stderr - testsuite/tests/typecheck/should_fail/tcfail168.stderr - testsuite/tests/typecheck/should_fail/tcfail177.stderr - testsuite/tests/typecheck/should_fail/tcfail185.stderr - testsuite/tests/typecheck/should_run/Typeable1.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b90c741c2adec1ff943a48f3d01ec413... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b90c741c2adec1ff943a48f3d01ec413... You're receiving this email because of your account on gitlab.haskell.org.