[Git][ghc/ghc][wip/andreask/data-module-name] 21 commits: ghc-boot: remove unused SizedSeq instances and functions
Andreas Klebinger pushed to branch wip/andreask/data-module-name at Glasgow Haskell Compiler / GHC Commits: cf942119 by Cheng Shao at 2026-03-30T15:24:37-04:00 ghc-boot: remove unused SizedSeq instances and functions This commit removes unused `SizedSeq` instances and functions, only keeping the bits we need for hpc tick sequence for now. - - - - - 22c5b7cc by Cheng Shao at 2026-03-30T15:24:38-04:00 ghci: remove unused GHCi.BinaryArray This patch removes the unused `GHCi.BinaryArray` module from `ghci`. Closes #27108. - - - - - 77abb4ab by Cheng Shao at 2026-03-30T15:25:21-04:00 testsuite: mark T17912 as fragile on Windows T17912 is still fragile on Windows, it sometimes unexpectedly pass in CI. This especially strains our already scarce Windows CI runner resources. Mark it as fragile on Windows for the time being. - - - - - d741a6cc by Andreas Klebinger at 2026-03-31T04:39:33-04:00 Bump minimum shake version for hadrian. We also add the shake version we want to stack.yaml Fixes #26884 - - - - - 5e556f9e by Vladislav Zavialov at 2026-03-31T04:40:16-04:00 Status check for the HsType~HsExpr refactoring (#25121) Add a test case to track the status of a refactoring project within GHC whose goal is to arrive at the following declaration: type HsType = HsExpr The rationale for this is to increase code reuse between the term- and type-level code in the compiler front-end (AST, parser, renamer, type checker). The status report is saved to testsuite/tests/ghc-api/T25121_status.stdout and provides useful insights into what needs to happen to make progress on the ticket. - - - - - acffb1b1 by fendor at 2026-03-31T04:41:02-04:00 Extract Binary instances to `GHC.ByteCode.Binary` - - - - - e2ea8e25 by fendor at 2026-03-31T04:41:02-04:00 Add `seqNonEmpty` for evaluating `NonEmpty a` - - - - - 048b00b7 by fendor at 2026-03-31T04:41:02-04:00 Record `LinkableUsage` instead of `Linkable` in `LoaderState` Retaining a ByteCode `Linkable` after it has been loaded retains its `UnlinkedBCO`, keeping it alive for the remainder of the program. This starts accumulating a lot of `UnlinkedBCO` and memory over time. However, the `Linkable` is merely used to later record its usage in `mkObjectUsage`, which is used for recompilation checking. However, this is incorrect, as the interface file and bytecode objects could be in different states, e.g. the interface changes, but the bytecode library hasn't changed so we don't need to recompile and vice versa. By computing a `Fingerprint` for the `ModuleByteCode`, and recording it in the `LinkableUsage`, we know precisely whether the `ByteCode` object on disk is outdated. Thus, parts of this commit just makes sure that we efficiently compute a `Fingerprint` for `ModuleByteCode` and store it in the on-disk representation of `ModuleByteCode`. We change the `LoaderState` to retain `LinkableUsage`, which is smaller representation of a `Linkable`. This allows us to free the unneeded fields of `Linkable` after linking them. We declare the following memory invariants that this commit implements: * No `LinkablePart` should be retained from `LoaderState`. * `Linkable`s should be unloaded after they have been loaded. These invariants are unfortunately tricky to automatically uphold, so we are simply documenting our assumptions for now. We introduce the `linkable-space` test which makes sure that after loading, no `DotGBC` or `UnlinkedBCO` is retained. ------------------------- Metric Increase: MultiLayerModulesTH_OneShot ------------------------- We allocate a bit more, but the peak number of bytes doesn't change. While a bit unfortunate, accepting the metric increase. We add multiple new performance measurements where we were able to observe the desired memory invariants. Further, we add regression tests to validate that the recompilation checker behaves more correct than before. - - - - - 2d1c1997 by Simon Jakobi at 2026-03-31T04:41:46-04:00 Eliminate dictionary-passing in ListMap operations Mark the ListMap helpers 'INLINABLE' so importing modules can specialise the 'TrieMap (ListMap m)' methods and avoid recursive dictionary-passing. See Note [Making ListMap operations specialisable]. Fixes #27097 - - - - - ed2c6570 by Cheng Shao at 2026-03-31T04:42:33-04:00 testsuite: fix testdir cleanup logic on Windows testdir cleanup is unreliable on Windows (#13162) and despite existing hacks in the driver, new failure mode has occurred. This patch makes it print the warning and carry on when failed to clean up a testdir, instead of reporting a spurious framework failure. See added comment for detailed explanation. - - - - - d9388e29 by Simon Jakobi at 2026-03-31T13:14:59-04:00 Add regression test for #18177 Closes #18177. Assisted-by: Codex - - - - - 6a10045c by mangoiv at 2026-03-31T13:15:43-04:00 ci: allow metric decrease for two tests on i386 There has been a nightly failure on i386 due to a compiler runtime improvement on i386 debian 12. We allow that. Metric Decrease (test_env='i386-linux-deb12'): T12707 T8095 - - - - - 7fbb4fcb by Rodrigo Mesquita at 2026-04-01T12:16:33+00:00 Bump default language edition to GHC2024 As per the accepted ghc-proposal#632 Fixes #26039 - - - - - 5ae43275 by Peng Fan at 2026-04-01T19:01:06-04:00 NCG/LA64: add cmpxchg and xchg primops And append some new instructions for LA664 uarch. Apply fix to cmpxchg-prim by Andreas Klebinger. Suggestions in https://gitlab.haskell.org/ghc/ghc/-/merge_requests/15515 - - - - - 8f95534a by Duncan Coutts at 2026-04-01T19:01:52-04:00 Remove signal-based ticker implementations Fixes issue #27073 All supported platforms should work with the pthreads + nanosleep based ticker implementation. This avoids all the problems with using signals. In practice, all supported platforms were probably using the non-signal tickers already, which is probably why we do not get lots of reports about deadlocks and other weirdness: we were definately using functions that are not async signal safe in the tick handler (such as fflush to flussh the eventlog). Only Solaris was explicitly using the timer_create ticker impl, and even Solaris could probably use the pthreads one (if anyone cared: Solaris is no longer a Teir 3 supported platform). Plausibly the only supported platform that this will change will be AIX, which should now use the pthreads impl. - - - - - 51b32b0d by Duncan Coutts at 2026-04-01T19:01:52-04:00 Tidy up some timer/ticker comments elsewhere - - - - - 7562bcd7 by Duncan Coutts at 2026-04-01T19:01:52-04:00 Remove now-unused install_vtalrm_handler Support function used by both of the signal-based ticker implementations. - - - - - 6da127c7 by Duncan Coutts at 2026-04-01T19:01:52-04:00 No longer probe for timer_create in rts/configure It was only used by the TimerCreate.c ticker impl. - - - - - 3fd490fa by Duncan Coutts at 2026-04-01T19:01:53-04:00 Note that rtsTimerSignal is deprecated. - - - - - 63099b0f by Simon Jakobi at 2026-04-01T19:02:39-04:00 Add perf test for #13960 Closes #13960. - - - - - ecad72e0 by Andreas Klebinger at 2026-04-03T10:48:01+02:00 Give the Data instance for ModuleName a non-bottom toConstr implementation. I've also taken the liberty to add Note [Data.Data instances for GHC AST Types] describing some of the uses of Data.Data I could find. Fixes #27129 - - - - - 196 changed files: - .gitlab/ci.sh - + compiler/GHC/ByteCode/Binary.hs - + compiler/GHC/ByteCode/Recomp/Binary.hs - compiler/GHC/ByteCode/Serialize.hs - compiler/GHC/CmmToAsm/LA64/CodeGen.hs - compiler/GHC/CmmToAsm/LA64/Instr.hs - compiler/GHC/CmmToAsm/LA64/Ppr.hs - compiler/GHC/Data/TrieMap.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Hooks.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Pipeline.hs - compiler/GHC/Driver/Plugins.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/HsToCore/Usage.hs - compiler/GHC/Iface/Recomp.hs - compiler/GHC/Iface/Recomp/Types.hs - compiler/GHC/Linker/ByteCode.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Linker/Types.hs - compiler/GHC/Runtime/Loader.hs - compiler/GHC/Tc/Types.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Unit/Home/ModInfo.hs - compiler/GHC/Unit/Module/Deps.hs - compiler/GHC/Unit/Module/Status.hs - compiler/GHC/Utils/Misc.hs - compiler/Language/Haskell/Syntax/Module/Name.hs - compiler/ghc.cabal.in - docs/users_guide/exts/control.rst - ghc/GHCi/Leak.hs - hadrian/hadrian.cabal - hadrian/stack.yaml - libraries/base/tests/IO/all.T - libraries/ghc-boot/GHC/Data/SizedSeq.hs - − libraries/ghci/GHCi/BinaryArray.hs - libraries/ghci/ghci.cabal.in - − m4/fp_check_timer_create.m4 - rts/Timer.c - rts/configure.ac - rts/include/rts/Timer.h - rts/include/stg/SMP.h - rts/posix/Signals.c - rts/posix/Signals.h - rts/posix/Ticker.c - − rts/posix/ticker/Setitimer.c - − rts/posix/ticker/TimerCreate.c - testsuite/driver/testlib.py - testsuite/tests/ado/ado004.hs - testsuite/tests/annotations/should_fail/annfail02.hs - testsuite/tests/annotations/should_fail/annfail02.stderr - testsuite/tests/array/should_run/arr020.hs - + testsuite/tests/bytecode/TLinkable/BCOTemplate.hs - + testsuite/tests/bytecode/TLinkable/LinkableUsage01.stderr - + testsuite/tests/bytecode/TLinkable/LinkableUsage02.stderr - + testsuite/tests/bytecode/TLinkable/Makefile - + testsuite/tests/bytecode/TLinkable/all.T - + testsuite/tests/bytecode/TLinkable/genLinkables.sh - + testsuite/tests/bytecode/TLinkable/linkable-space.hs - + testsuite/tests/bytecode/TLinkable/linkable-space.stdout - testsuite/tests/core-to-stg/T19700.hs - testsuite/tests/count-deps/CountDepsAst.stdout - testsuite/tests/count-deps/CountDepsParser.stdout - testsuite/tests/deSugar/should_fail/DsStrictFail.hs - testsuite/tests/deriving/should_compile/T15798b.hs - testsuite/tests/deriving/should_compile/T15798c.hs - testsuite/tests/deriving/should_compile/T15798c.stderr - testsuite/tests/deriving/should_compile/T24955a.hs - testsuite/tests/deriving/should_compile/T24955a.stderr - testsuite/tests/deriving/should_compile/T24955b.hs - testsuite/tests/deriving/should_compile/T24955c.hs - testsuite/tests/deriving/should_fail/T10598_fail4.hs - testsuite/tests/deriving/should_fail/T10598_fail4.stderr - testsuite/tests/deriving/should_fail/T10598_fail5.hs - testsuite/tests/deriving/should_fail/T10598_fail5.stderr - testsuite/tests/dmdanal/sigs/T22241.hs - + testsuite/tests/driver/T18177.hs - testsuite/tests/driver/all.T - testsuite/tests/driver/multipleHomeUnits/multipleHomeUnits_recomp_th.stdout - + testsuite/tests/driver/recomp022/A1.hs - + testsuite/tests/driver/recomp022/A2.hs - + testsuite/tests/driver/recomp022/A3.hs - + testsuite/tests/driver/recomp022/B.hs - + testsuite/tests/driver/recomp022/C.hs - + testsuite/tests/driver/recomp022/Makefile - + testsuite/tests/driver/recomp022/all.T - + testsuite/tests/driver/recomp022/recomp022a.stdout - + testsuite/tests/driver/recomp022/recomp022b.stdout - testsuite/tests/gadt/T20485.hs - + testsuite/tests/ghc-api/T25121_status.hs - + testsuite/tests/ghc-api/T25121_status.stdout - testsuite/tests/ghc-api/all.T - testsuite/tests/ghci.debugger/scripts/all.T - testsuite/tests/ghci.debugger/scripts/break012.hs - testsuite/tests/ghci.debugger/scripts/break012.stdout - testsuite/tests/ghci/prog-mhu002/all.T - testsuite/tests/ghci/scripts/Makefile - testsuite/tests/ghci/should_run/BinaryArray.hs - testsuite/tests/ghci/should_run/all.T - testsuite/tests/indexed-types/should_compile/T15322.hs - testsuite/tests/indexed-types/should_compile/T15322.stderr - testsuite/tests/linear/should_fail/T18888.hs - testsuite/tests/module/T20007.hs - testsuite/tests/module/T20007.stderr - testsuite/tests/module/mod90.hs - testsuite/tests/module/mod90.stderr - testsuite/tests/overloadedrecflds/should_fail/NoFieldSelectorsFail.hs - testsuite/tests/overloadedrecflds/should_fail/T18999_NoDisambiguateRecordFields.hs - testsuite/tests/overloadedrecflds/should_fail/all.T - testsuite/tests/parser/should_fail/ParserNoLambdaCase.hs - testsuite/tests/parser/should_fail/ParserNoLambdaCase.stderr - testsuite/tests/parser/should_fail/T16270h.hs - testsuite/tests/parser/should_fail/T16270h.stderr - testsuite/tests/parser/should_fail/readFail001.hs - testsuite/tests/parser/should_fail/readFail001.stderr - testsuite/tests/partial-sigs/should_compile/SomethingShowable.hs - + testsuite/tests/perf/compiler/T13960.hs - testsuite/tests/perf/compiler/all.T - testsuite/tests/plugins/late-plugin/LatePlugin.hs - testsuite/tests/polykinds/T7151.hs - testsuite/tests/polykinds/T7151.stderr - testsuite/tests/polykinds/T7433.hs - testsuite/tests/polykinds/T7433.stderr - testsuite/tests/programs/andy_cherry/test.T - testsuite/tests/rename/should_fail/T10668.hs - testsuite/tests/rename/should_fail/T10668.stderr - testsuite/tests/rename/should_fail/T12681.hs - testsuite/tests/rename/should_fail/T12681.stderr - testsuite/tests/rename/should_fail/T13568.hs - testsuite/tests/rename/should_fail/T13568.stderr - testsuite/tests/rename/should_fail/T13644.hs - testsuite/tests/rename/should_fail/T13644.stderr - testsuite/tests/rename/should_fail/T13847.hs - testsuite/tests/rename/should_fail/T13847.stderr - testsuite/tests/rename/should_fail/T14032c.hs - testsuite/tests/rename/should_fail/T19843l.hs - testsuite/tests/rename/should_fail/T19843l.stderr - testsuite/tests/rename/should_fail/T25901_imp_hq_fail_5.stderr - testsuite/tests/rename/should_fail/T25901_imp_sq_fail_2.stderr - testsuite/tests/rename/should_fail/T5385.hs - testsuite/tests/rename/should_fail/T5385.stderr - testsuite/tests/roles/should_fail/Roles5.hs - testsuite/tests/roles/should_fail/Roles5.stderr - testsuite/tests/showIface/DocsInHiFile.hs - testsuite/tests/showIface/DocsInHiFile1.stdout - testsuite/tests/showIface/DocsInHiFileTH.hs - testsuite/tests/showIface/DocsInHiFileTH.stdout - testsuite/tests/showIface/DocsInHiFileTHExternal.hs - testsuite/tests/showIface/HaddockIssue849.hs - testsuite/tests/showIface/HaddockIssue849.stdout - testsuite/tests/showIface/HaddockOpts.hs - testsuite/tests/showIface/HaddockOpts.stdout - testsuite/tests/showIface/HaddockSpanIssueT24378.hs - testsuite/tests/showIface/HaddockSpanIssueT24378.stdout - testsuite/tests/showIface/MagicHashInHaddocks.hs - testsuite/tests/showIface/MagicHashInHaddocks.stdout - testsuite/tests/showIface/Makefile - testsuite/tests/showIface/NoExportList.hs - testsuite/tests/showIface/NoExportList.stdout - testsuite/tests/showIface/PragmaDocs.stdout - testsuite/tests/showIface/ReExports.stdout - testsuite/tests/simplCore/T9646/test.T - testsuite/tests/simplCore/should_compile/T21960.hs - testsuite/tests/simplCore/should_compile/T26709.stderr - testsuite/tests/th/TH_Promoted1Tuple.hs - testsuite/tests/th/TH_Roles1.hs - testsuite/tests/typecheck/should_compile/MutRec.hs - testsuite/tests/typecheck/should_compile/T10770a.hs - testsuite/tests/typecheck/should_compile/T11339.hs - testsuite/tests/typecheck/should_compile/T11397.hs - testsuite/tests/typecheck/should_compile/T13526.hs - testsuite/tests/typecheck/should_compile/T18467.hs - testsuite/tests/typecheck/should_compile/T18467.stderr - testsuite/tests/typecheck/should_compile/tc081.hs - testsuite/tests/typecheck/should_compile/tc141.hs - testsuite/tests/typecheck/should_fail/T23427.hs - testsuite/tests/typecheck/should_fail/T6078.hs - testsuite/tests/typecheck/should_fail/T7453.hs - testsuite/tests/typecheck/should_fail/T7453.stderr - testsuite/tests/typecheck/should_fail/T8570.hs - testsuite/tests/typecheck/should_fail/T8570.stderr - testsuite/tests/typecheck/should_fail/tcfail083.hs - testsuite/tests/typecheck/should_fail/tcfail083.stderr - testsuite/tests/typecheck/should_fail/tcfail084.hs - testsuite/tests/typecheck/should_fail/tcfail084.stderr - testsuite/tests/typecheck/should_fail/tcfail094.hs - testsuite/tests/typecheck/should_fail/tcfail094.stderr - testsuite/tests/typecheck/should_run/T1735.hs - testsuite/tests/typecheck/should_run/T1735_Help/Basics.hs - testsuite/tests/typecheck/should_run/T3731.hs - testsuite/tests/vdq-rta/should_fail/T24159_type_syntax_th_fail.script - testsuite/tests/warnings/should_fail/CaretDiagnostics1.hs - testsuite/tests/warnings/should_fail/CaretDiagnostics1.stderr - testsuite/tests/warnings/should_fail/T24396c.hs - testsuite/tests/warnings/should_fail/T24396c.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7c883bfac436f901c0002f1c2d76a41... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7c883bfac436f901c0002f1c2d76a41... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Andreas Klebinger (@AndreasK)