[Git][ghc/ghc][wip/az/exactprint-annotation-rationalisation] 30 commits: Word64Map: add compareSize
Alan Zimmerman pushed to branch wip/az/exactprint-annotation-rationalisation at Glasgow Haskell Compiler / GHC Commits: 3a552476 by Simon Jakobi at 2026-08-09T15:20:06-04:00 Word64Map: add compareSize compareSize m c compares the size of a map to an Int, but unlike compare (size m) c it stops traversing the map once the outcome is determined. Based on https://github.com/haskell/containers/pull/1139 Assisted-by: Claude Opus 5 - - - - - 6e2c99d8 by Simon Jakobi at 2026-08-09T15:20:06-04:00 Use a pigeonhole sort for deterministic UniqDFM iteration Deterministic UniqDFM iteration used a list mergesort, allocating O(n log n) cons cells and contributing significantly to compiler allocations (#27459). Use a pigeonhole sort where appropriate, while retaining the mergesort fallback. See Note [Sorting a UDFM] and Note [Cost of deterministic iteration]. The peak_megabytes_allocated increase for LinkableUsage02 is probably due to GC timing noise. See #27613. ------------------------- Metric Decrease: InstanceMatching InstanceMatching1 ManyAlternatives T12707 T13379 T13719 T24471 T27336 T5321FD T5321Fun T783 Metric Increase 'peak_megabytes_allocated': LinkableUsage02 ------------------------- Assisted-by: gpt-5.6-sol via Codex CLI - - - - - a938ab12 by sheaf at 2026-08-09T15:20:48-04:00 Testsuite: don't measure max residency for T27336 We really care more about total allocations for this test, so this commit removes the maximum residency measurement. - - - - - 7d94bb78 by Alan Zimmerman at 2026-08-09T15:21:29-04:00 EPA: Remove LocatedE, replace with LocatedA This gets rid of one more LocatedXXX occurrence - - - - - 9df24b7e by sheaf at 2026-08-10T14:28:30-04:00 hie.yaml: use a polyglot shell/batch script This commit merges hie-bios and hie-bios.bat into a single polyglot script. This avoids Windows users having to manually update hie.yaml in order to be able to use HLS. - - - - - 7f75c588 by Alan Zimmerman at 2026-08-10T14:29:11-04:00 EPA: Remove type parameter from AnnList This is a step towards cutting AnnList down to its core for formatting lists only - - - - - 84444a21 by Alan Zimmerman at 2026-08-10T20:55:22+01:00 EPA: Remove al_trailing from AnnList It was not being used - - - - - 23dc0224 by Alan Zimmerman at 2026-08-10T20:55:22+01:00 TTG: Add extension points to BooleanFormula They are currently unused, but will be used for exact print annotations next - - - - - 8c1b3063 by Alan Zimmerman at 2026-08-10T20:55:22+01:00 EPA: Remove LocatedBC / SrcSpanBF - - - - - 5f7bbc73 by Alan Zimmerman at 2026-08-10T20:55:22+01:00 EPA: remove unused addTrailingAnnToL. Squash appropriately - - - - - 0a659cac by Alan Zimmerman at 2026-08-10T20:55:22+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. - - - - - b5268d98 by Alan Zimmerman at 2026-08-10T20:55:22+01:00 EPA: Some haddock processing tweaks - - - - - 4b1b0986 by Alan Zimmerman at 2026-08-10T20:55:22+01:00 Some haddock exactprint tests - - - - - d0826b33 by Alan Zimmerman at 2026-08-10T20:55:22+01:00 EPA: When adding comments honour trailing anns - - - - - a8d7d6ee by Alan Zimmerman at 2026-08-10T20:55:22+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. - - - - - 993d16bc by Alan Zimmerman at 2026-08-10T20:55:22+01:00 EPA Fix HsCmdDo exact print with comments TODO: add test based on proc-do-complex-four-out.hs - - - - - 6a88694e by Alan Zimmerman at 2026-08-10T20:55:22+01:00 EPA: Add comments about remaining Anno SrcSpan instances - - - - - 44184341 by Alan Zimmerman at 2026-08-10T20:55:22+01:00 EPA: Plan for Fixing AnnList Layout Properly - - - - - dc78930b by Alan Zimmerman at 2026-08-10T20:55:22+01:00 EPA: Add specific layout field to AnnList - - - - - 2b598ffe by Alan Zimmerman at 2026-08-10T20:55:22+01:00 EPA Use vocurly as basis for AnnListLayout For the existing cases that populate AnnList. This also shows up AnnList usages that can never capture layout. - - - - - 22ab0bfa by Alan Zimmerman at 2026-08-10T20:55:22+01:00 EPA: AnnList clean up patch for empty where clause - - - - - 67338120 by Alan Zimmerman at 2026-08-10T20:55:22+01:00 EPA: Add TTG fields to FamilyInfo This commit is a simple add, with unused extension fields. It lays the groundwork for using them for exact print annotations - - - - - 25b7872c by Alan Zimmerman at 2026-08-10T20:55:22+01:00 WIP annclassdecl - - - - - b881d5e1 by Alan Zimmerman at 2026-08-10T20:55:22+01:00 EPA: Remove al_trailing from AnnList It was not being used - - - - - 57339a22 by Alan Zimmerman at 2026-08-10T20:55:22+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 - - - - - 338dcbff by Alan Zimmerman at 2026-08-10T20:55:22+01:00 EPA: HsList attempt WIP - - - - - 64c2441e by Alan Zimmerman at 2026-08-10T20:55:22+01:00 Enable ppr test for Haddock1. It currently fails - - - - - 57c4d829 by Alan Zimmerman at 2026-08-10T20:55:22+01:00 WIP on removing NoEpAnn. Likely abandon - - - - - 61e2cb4a by Alan Zimmerman at 2026-08-10T20:55:23+01:00 EPA: Add an overview doc for exact printing - - - - - 8b82cc94 by Simon Peyton Jones at 2026-08-10T20:55:23+01:00 Added an intro section - - - - - 93 changed files: - + ANNLIST-LAYOUT-PLAN.md - + ExactPrint.md - compiler/GHC/Core/Class.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Main/Interactive.hs - compiler/GHC/Hs.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.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/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Syntax.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/Pat.hs - compiler/GHC/Rename/Splice.hs - compiler/GHC/Tc/Module.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/Tc/TyCl/Class.hs - compiler/GHC/Tc/Types/Origin.hs - compiler/GHC/ThToHs.hs - compiler/GHC/Types/Unique/DFM.hs - compiler/GHC/Unit/Module/Warnings.hs - compiler/Language/Haskell/Syntax.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 - ghc/GHCi/UI.hs - − hadrian/hie-bios - hadrian/hie-bios.bat - hie.yaml - 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/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/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/perf/compiler/all.T - 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 - 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/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/a9d725e4f0572b0800a97141577e8f5... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a9d725e4f0572b0800a97141577e8f5... 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)