Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 667b9ec8 by sheaf at 2026-04-26T08:06:39-04:00 Ensure TcM plugins are only initialised once This commit ensures we keep TcM plugins (typechecker plugins, defaulting plugins and hole fit plugins) running all the way through desugaring, instead of stopping them at the end of typechecking. To do this, the "stop" actions of TcPlugin and DefaultingPlugin are split into two: one for the "post-typecheck" action, and one for the final shutdown action (after desugaring). This allows the plugins to be invoked by the pattern match checker (during desugaring) without having to be repeatedly re-initialised and stopped, fixing #26839. In the process, this commit modifies 'initTc' and 'initTcInteractive', adding an extra argument that describes whether to start/stop the 'TcM' plugins. See Note [Stop TcM plugins after desugaring] for an overview. - - - - - 816814f5 by sheaf at 2026-04-26T08:06:45-04:00 Hadrian: add --keep-response-files This commit adds a Hadrian flag that allows response files to be retained. This is useful for debugging a failing Hadrian command line. - - - - - 7898261d by sheaf at 2026-04-26T08:06:50-04:00 hadrian/build-cabal.bat: fix build on Windows Commit 8cb99552f6 introduced a warning for a missing package index. However, the logic was faulty on Windows: the piping was broken, and "remote-repo-cache:" was being interpreted as a (malformed) drive letter, leading to the error: The filename, directory name, or volume label syntax is incorrect. This commit fixes that by using a temporary file instead of piping. - - - - - b35dc3ef by Wen Kokke at 2026-04-26T08:06:53-04:00 rts: Add dynamic trace flags API This commit adds an API to the RTS (exposed via Rts.h) that allows users to dynamically change the trace flags. Prior to this commit, users were able to stop and start the profiling and heap profiling timers (via startProfTimer/stopProfTimer and startHeapProfTimer/stopHeapProfTimer). This extends that functionality to also cover the core event types. The getTraceFlag/setTraceFlag functions read and write the values of the trace flag cache, which is allocated by Trace.c, rather than modifying the members of RtsFlags.TraceFlags. This is done under the assumption that the members of RtsFlags should not be modified after RTS initialisation. Consequently, if the user modifies the trace flags using setTraceFlag, the object returned by getTraceFlags (from base) will not reflect these changes. The trace flags are not protected by locks of any sort. Hence, these functions are not thread-safe. However, the trace flags are not modified by the RTS after initialisation, only read, so the race conditions introduced by one user modifying them are most likely benign. This PR also puts the trace flag cache in a single global struct, as opposed to a collection of global variables, and changes the types of the individual flags from uint8_t to bool, as these have the same size on both Clang and GCC and are a better semantic match. Prior to the change to uint8_t, they had type int, see 42c47cd6. Even with its deprecation in C23, I don't think there should be any issue depending on stdbool.h. The TRACE_X macros are redefined to access the global struct, with values cast to const bool to ensure they are read-only. - - - - - 96010922 by Wen Kokke at 2026-04-26T08:06:54-04:00 rts: Ensure TRACE_X values are used in place of RtsFlags.TraceFlags.X - - - - - 8ce4b604 by Wen Kokke at 2026-04-26T08:06:54-04:00 rts: Fix nonmoving-GC tracing The current nonmoving-GC tracing functions were written in a different style from the other tracing functions. They were directly implemented as, e.g., a traceConcMarkEnd function that called postConcMarkEnd. The other tracing functions are implemented as, e.g., traceThreadLabel_, a function that posts the thread label event, and traceThreadLabel, a macro that checks whether TRACE_scheduler is set. This commit fixes that implementation, and ensures that the nonmoving-GC tracing functions only emit events if nonmoving-GC tracing is enabled. - - - - - 1b91ce9f by Wen Kokke at 2026-04-26T08:06:54-04:00 rts: Add SymI_HasProto for get/setTraceFlag - - - - - e2eb47fe by Wen Kokke at 2026-04-26T08:06:54-04:00 rts: Add SymI_HasProto for start/endEventLogging - - - - - ef3c7a8a by Simon Peyton Jones at 2026-04-26T08:06:55-04:00 Fix assertion check in checkResultTy As #27210 shows, the assertion was a little bit too eager. I refactored a bit by moving some code from GHC.Tc.Gen.App to GHC.Tc.Utils.Unify; see the new function tcSubTypeApp, which replaces tcSubTypeDS - - - - - 75 changed files: - + changelog.d/hadrian-response-files.md - + changelog.d/tcplugin_init.md - + changelog.d/tcplugins-pmc.md - + changelog.d/typecheckModule-API.md - + changelog.d/withTcPlugins.md - compiler/GHC.hs - compiler/GHC/Driver/Env/Types.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Pipeline.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Driver/Pipeline/Monad.hs - compiler/GHC/Driver/Pipeline/Phases.hs - compiler/GHC/HsToCore.hs - compiler/GHC/HsToCore/Monad.hs - compiler/GHC/HsToCore/Types.hs - compiler/GHC/Runtime/Eval.hs - compiler/GHC/Runtime/Heap/Inspect.hs - compiler/GHC/Runtime/Loader.hs - compiler/GHC/Tc/Errors/Hole.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Head.hs - compiler/GHC/Tc/Module.hs - compiler/GHC/Tc/Solver/Default.hs - compiler/GHC/Tc/Solver/Rewrite.hs - compiler/GHC/Tc/Solver/Solve.hs - compiler/GHC/Tc/Types.hs - compiler/GHC/Tc/Utils/Backpack.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Tc/Utils/Unify.hs - docs/users_guide/extending_ghc.rst - ghc/GHCi/UI/Info.hs - hadrian/build-cabal.bat - hadrian/src/Builder.hs - hadrian/src/CommandLine.hs - hadrian/src/Hadrian/Builder/Ar.hs - hadrian/src/Hadrian/Utilities.hs - rts/RtsSymbols.c - rts/Trace.c - rts/Trace.h - rts/include/rts/EventLogWriter.h - rts/sm/NonMoving.c - testsuite/tests/ghc-api/T26910.hs - testsuite/tests/ghc-api/T6145.hs - testsuite/tests/ghci/should_run/tc-plugin-ghci/TcPluginGHCi.hs - testsuite/tests/plugins/defaulting-plugin/DefaultInterference.hs - testsuite/tests/plugins/defaulting-plugin/DefaultInvalid.hs - testsuite/tests/plugins/defaulting-plugin/DefaultLifted.hs - testsuite/tests/plugins/defaulting-plugin/DefaultMultiParam.hs - testsuite/tests/plugins/echo-plugin/Echo.hs - testsuite/tests/quasiquotation/T7918.hs - testsuite/tests/tcplugins/Common.hs - testsuite/tests/tcplugins/RewritePerfPlugin.hs - testsuite/tests/tcplugins/T11462_Plugin.hs - testsuite/tests/tcplugins/T11525_Plugin.hs - testsuite/tests/tcplugins/T26395_Plugin.hs - + testsuite/tests/tcplugins/TcPlugin_InitStop_Ghci.hs - + testsuite/tests/tcplugins/TcPlugin_InitStop_Ghci.script - + testsuite/tests/tcplugins/TcPlugin_InitStop_Ghci.stderr - + testsuite/tests/tcplugins/TcPlugin_InitStop_Ghci.stdout - + testsuite/tests/tcplugins/TcPlugin_InitStop_NoCode.hs - + testsuite/tests/tcplugins/TcPlugin_InitStop_NoCode.hs-boot - + testsuite/tests/tcplugins/TcPlugin_InitStop_NoCode.stderr - + testsuite/tests/tcplugins/TcPlugin_InitStop_NoCode_aux.hs - + testsuite/tests/tcplugins/TcPlugin_InitStop_Warn.hs - + testsuite/tests/tcplugins/TcPlugin_InitStop_Warn.stderr - testsuite/tests/tcplugins/all.T - + testsuite/tests/tcplugins/tc-plugin-initstop/Makefile - + testsuite/tests/tcplugins/tc-plugin-initstop/Setup.hs - + testsuite/tests/tcplugins/tc-plugin-initstop/TcPlugin_InitStop_Plugin.hs - + testsuite/tests/tcplugins/tc-plugin-initstop/tc-plugin-initstop.cabal - + testsuite/tests/typecheck/should_fail/T27210.hs - + testsuite/tests/typecheck/should_fail/T27210.stderr - testsuite/tests/typecheck/should_fail/all.T - testsuite/tests/wasm/should_run/control-flow/LoadCmmGroup.hs - utils/haddock/haddock-api/src/Haddock/Interface/AttachInstances.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cc042a47be9bc2d546dc424e8b112f0... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cc042a47be9bc2d546dc424e8b112f0... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)