Pretty-print HsArgPar applications correctly (#19737)
Previously, the `Outputable` instance for `HsArg` was being used to pretty-print each `HsArgPar` in a list of `HsArg`s individually, which simply doesn't work. In lieu of the `Outputable` instance, we now use a dedicated `pprHsArgsApp` function to print a list of `HsArg`s as a single unit. I have also added documentation to the `Outputable` instance for `HsArg` to more clearly signpost that it is only suitable for debug pretty-printing. Fixes #19737.
Showing
- compiler/GHC/Hs/Decls.hs 1 addition, 11 deletionscompiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Type.hs 1 addition, 1 deletioncompiler/GHC/Hs/Type.hs
- compiler/Language/Haskell/Syntax/Type.hs 51 additions, 4 deletionscompiler/Language/Haskell/Syntax/Type.hs
- testsuite/tests/th/T19737.hs 14 additions, 0 deletionstestsuite/tests/th/T19737.hs
- testsuite/tests/th/T19737.stderr 20 additions, 0 deletionstestsuite/tests/th/T19737.stderr
- testsuite/tests/th/all.T 1 addition, 0 deletionstestsuite/tests/th/all.T
Loading
Please register or sign in to comment