[Git][ghc/ghc][wip/az/exactprint-annotation-rationalisation] 31 commits: ci: Use shallow submodule clones by default
Alan Zimmerman pushed to branch wip/az/exactprint-annotation-rationalisation at Glasgow Haskell Compiler / GHC Commits: f586c885 by Simon Jakobi at 2026-07-24T18:05:00-04:00 ci: Use shallow submodule clones by default Limit submodule clones to depth one to reduce CI checkout costs. Keep fetching full submodule history for the submodule lint jobs, which inspect commits across a range. Assisted-by: gpt-5.6-sol via Codex CLI - - - - - 306120d2 by Duncan Coutts at 2026-07-24T18:05:43-04:00 Fix flaky test T3994 on FreeBSD On current FreeBSD versions, calling getpgid on a zombie process fails. In T3994, if we're really unlucky with delays and scheduling then we can end up in exactly that situation. Just catch that specific exception and ignore it. It's rare, and not our fault. - - - - - 7b116a0b by Cheng Shao at 2026-07-24T18:06:24-04:00 ci: add missing workaround for docker permissions in lint jobs Some lint jobs use ci-images with default user `ghc`, and the gitlab ci docker executor requires the `sudo chown` workaround to fix workspace directory permission issue. This patch adds the missing workarounds for the lint jobs. Fixes #27554. Co-authored-by: Codex <codex@openai.com> - - - - - 815149f3 by Andrzej Rybczak at 2026-07-25T15:06:43+00:00 Add -Wdefaulted-callstack Adds a new warning, -Wdefaulted-callstack, which warns when an implicit CallStack parameter is defaulted to the empty stack. In particular, this includes call sites where a function with a HasCallStack constraint is called from a definition that does *not* provide one. At such call sites the call stack is cut off and does not include the enclosing definition's callers, which can be a source of surprise if the user wants complete call stacks. Closes #27077. - - - - - f6f2343f by Zubin Duggal at 2026-07-25T17:40:51-04:00 UniqueDFM: alter should preserve insertion order Before it always inserting new elements at the end. This is problematic because instances get inserted into the map with `alterF`, which can change ordering of how instances are printed with `:info` depending on the order in which we consult interfaces I expect `alter id k = id` and `alter (fmap f) k = adjust f k`. Moving keys to the end breaks that (`adjust` already preserves position). Fixes #27532 - - - - - f2347216 by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPA: ClsInstDecl with decls as [LHsDecl GhcPs] in GhcPs Similar to 4fdfe75731e01dad7d7fa474c2703d0d3965afb1, this commit changes the as-parsed representation of class instance declarations to [LHsDecl GhcPs], and only separates them by type from the renamer onward. This also allows us to remove all the AnnSortKey machinery for exact printing, as it is now no longer needed. - - - - - fba59977 by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPA: Remove LocatedP from OverlapMode - - - - - e818b108 by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPA: Remove LocatedP from CType - - - - - 8babde29 by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPA: Remove LocatedP, last use in WarningTxt - - - - - 0c230543 by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPA: Remove LocatedE from WarningCategory - - - - - ad62582a by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPA: Remove LocateE from XCImport and XCExport - - - - - f86db830 by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPA: Remove LocatedE from HsRecFields dot - - - - - 4883ed92 by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPA: Remove LocatedE completely, last usage for pats - - - - - 58219f51 by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPA: Remove AnnList (EpToken "where") usages This is moving toward removing the parameter from AnnList completely - - - - - a3b540e9 by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPA remove AnnList (EpToken "rec") usages - - - - - e6a10acd by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPA: Remove last parameterised AnnList usage (EpaLocation) Also remove the parameter - - - - - fd235b27 by Alan Zimmerman at 2026-07-26T13:38:48+01:00 TTG: Add extension points to BooleanFormula They are currently unused, but will be used for exact print annotations next - - - - - 955829b7 by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPA: Remove LocatedBC / SrcSpanBF - - - - - 97f1029a by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPA: remove unused addTrailingAnnToL. Squash appropriately - - - - - aa82ab90 by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPS: Remove NoEpTok/NoEpUniTok, using an unhelpful SrcSpan instead Also introduce helper functions noEpTok and noEpUniTok to serve as simple replacements in code inserting an token annotation without location information. - - - - - 770924eb by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPA: Some haddock processing tweaks - - - - - ab69f608 by Alan Zimmerman at 2026-07-26T13:38:48+01:00 Some haddock exactprint tests - - - - - 2a74cfde by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPA: When adding comments honour trailing anns - - - - - 0a1c7676 by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPA: Uses Parsers.parseModule for exactprint tests This is the advertised way to parse for use for exact printing in the ghc-exactprint library, make sure we test using it. - - - - - 38d9008f by Alan Zimmerman at 2026-07-26T13:38:48+01:00 EPA Fix HsCmdDo exact print with comments TODO: add test based on proc-do-complex-four-out.hs - - - - - 92d8e2db by Alan Zimmerman at 2026-07-27T19:48:12+01:00 EPA: Add comments about remaining Anno SrcSpan instances - - - - - c2b2adc0 by Alan Zimmerman at 2026-07-27T23:06:50+01:00 EPA: First pass implementation of HsList, for ClassDecls Just as a straight list replacement to start with, no payload. This shows the scope and invasiveness of the initial change - - - - - 6c8646d3 by Alan Zimmerman at 2026-07-27T23:07:56+01:00 Enable ppr test for Haddock1. It currently fails - - - - - 2b779f0c by Alan Zimmerman at 2026-07-27T23:07:56+01:00 WIP on removing NoEpAnn. Likely abandon - - - - - 72c6a1a3 by Alan Zimmerman at 2026-07-27T23:07:56+01:00 EPA: Add an overview doc for exact printing - - - - - 2199059c by Simon Peyton Jones at 2026-07-27T23:07:56+01:00 Added an intro section - - - - - 139 changed files: - .gitlab-ci.yml - + ExactPrint.md - + changelog.d/27532 - + changelog.d/warn-defaulted-callstack - compiler/GHC/Builtin/Utils.hs - compiler/GHC/Core/Class.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Hs.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Decls/Overlap.hs - compiler/GHC/Hs/Doc.hs - compiler/GHC/Hs/DocString.hs - compiler/GHC/Hs/Dump.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/Extension/Pass.hs - compiler/GHC/Hs/ImpExp.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Pat.hs - compiler/GHC/Hs/Stats.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/HsToCore/Docs.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Syntax.hs - compiler/GHC/Iface/Warnings.hs - compiler/GHC/IfaceToCore.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/Annotation.hs - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Parser/PostProcess/Haddock.hs - compiler/GHC/Rename/Module.hs - compiler/GHC/Rename/Names.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Deriv.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Errors/Types.hs - compiler/GHC/Tc/Solver/Default.hs - compiler/GHC/Tc/Solver/Dict.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/Tc/TyCl/Class.hs - compiler/GHC/Tc/TyCl/Instance.hs - compiler/GHC/Tc/Types/Evidence.hs - compiler/GHC/Tc/Types/Origin.hs - compiler/GHC/Tc/Utils/Env.hs - compiler/GHC/Tc/Utils/Instantiate.hs - compiler/GHC/Tc/Utils/Unify.hs - compiler/GHC/ThToHs.hs - compiler/GHC/Types/Error/Codes.hs - compiler/GHC/Types/ForeignCall.hs - compiler/GHC/Types/Unique/DFM.hs - compiler/GHC/Unit/Module/Warnings.hs - compiler/Language/Haskell/Syntax/Basic.hs - compiler/Language/Haskell/Syntax/BooleanFormula.hs - compiler/Language/Haskell/Syntax/Decls.hs - compiler/Language/Haskell/Syntax/Expr.hs - compiler/Language/Haskell/Syntax/Extension.hs - docs/users_guide/using-warnings.rst - libraries/base/changelog.md - libraries/base/src/GHC/Stack.hs - libraries/ghc-internal/src/GHC/Internal/Stack.hs - testsuite/tests/ghc-api/T25121_status.stdout - testsuite/tests/ghc-api/exactprint/T22919.stderr - testsuite/tests/ghc-api/exactprint/Test20239.stderr - testsuite/tests/ghc-api/exactprint/ZeroWidthSemi.stderr - testsuite/tests/ghci/T16793/T16793.stdout - testsuite/tests/ghci/T18060/T18060.stdout - + testsuite/tests/ghci/T27532/Makefile - + testsuite/tests/ghci/T27532/T27532.stdout - + testsuite/tests/ghci/T27532/T27532j4.stdout - + testsuite/tests/ghci/T27532/a.script - + testsuite/tests/ghci/T27532/all.T - + testsuite/tests/ghci/T27532/b.script - + testsuite/tests/ghci/T27532/genT27532Modules - testsuite/tests/ghci/scripts/ListTuplePunsPpr.stdout - testsuite/tests/ghci/scripts/T4175.stdout - testsuite/tests/ghci/scripts/T8469.stdout - testsuite/tests/ghci/scripts/T8535.stdout - testsuite/tests/ghci/scripts/T9881.stdout - testsuite/tests/ghci/scripts/ghci020.stdout - testsuite/tests/ghci/scripts/ghci064.stdout - testsuite/tests/ghci/should_run/T10145.stdout - testsuite/tests/ghci/should_run/T18594.stdout - testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/module/mod185.stderr - testsuite/tests/parser/should_compile/DumpParsedAst.stderr - testsuite/tests/parser/should_compile/DumpParsedAstComments.stderr - testsuite/tests/parser/should_compile/DumpRenamedAst.stderr - testsuite/tests/parser/should_compile/DumpSemis.stderr - testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr - testsuite/tests/parser/should_compile/KindSigs.stderr - testsuite/tests/parser/should_compile/T14189.stderr - testsuite/tests/parser/should_compile/T15279.stderr - testsuite/tests/parser/should_compile/T15323.stderr - testsuite/tests/parser/should_compile/T20452.stderr - testsuite/tests/parser/should_compile/T20718.stderr - testsuite/tests/parser/should_compile/T20718b.stderr - testsuite/tests/parser/should_compile/T20846.stderr - testsuite/tests/parser/should_compile/T23315/T23315.stderr - testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.stderr - testsuite/tests/printer/AnnotationNoListTuplePuns.stdout - + testsuite/tests/printer/Haddock1.hs - testsuite/tests/printer/Makefile - testsuite/tests/printer/T18791.stderr - testsuite/tests/printer/Test20297.stdout - testsuite/tests/printer/Test24533.stdout - testsuite/tests/printer/all.T - testsuite/tests/process/T3994.hs - testsuite/tests/roles/should_compile/Roles14.stderr - testsuite/tests/roles/should_compile/Roles3.stderr - testsuite/tests/roles/should_compile/Roles4.stderr - testsuite/tests/roles/should_compile/T8958.stderr - testsuite/tests/typecheck/should_compile/T18406b.stderr - testsuite/tests/typecheck/should_compile/T18529.stderr - + testsuite/tests/typecheck/should_compile/WarnDefaultedCallStack.hs - + testsuite/tests/typecheck/should_compile/WarnDefaultedCallStack.stderr - testsuite/tests/typecheck/should_compile/all.T - testsuite/tests/typecheck/should_fail/T5300.stderr - utils/check-exact/ExactPrint.hs - utils/check-exact/Main.hs - utils/check-exact/Parsers.hs - utils/check-exact/Transform.hs - utils/check-exact/Utils.hs - utils/haddock/haddock-api/src/Haddock/Backends/Hoogle.hs - utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs - utils/haddock/haddock-api/src/Haddock/Convert.hs - utils/haddock/haddock-api/src/Haddock/GhcUtils.hs - utils/haddock/haddock-api/src/Haddock/Interface/Create.hs - utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs - utils/haddock/haddock-api/src/Haddock/Types.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a15493982e6d2926d6877e095f5355d... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a15493982e6d2926d6877e095f5355d... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Alan Zimmerman (@alanz)