[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 9 commits: ghc: Distinguish between having an interpreter and having an internal one
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: adadb4d7 by Sven Tennie at 2026-04-27T16:08:41-04:00 ghc: Distinguish between having an interpreter and having an internal one Actually, these are related but different things: - ghc can run an interpreter (either internal or external) - ghc is compiled with an internal interpreter Splitting the logic solves compiler warnings and expresses the intent better. - - - - - 4a07935b by Vladislav Zavialov at 2026-04-27T16:08:42-04:00 Refactor HsWildCardTy to use HoleKind (#27111) The payload of this patch is that the extension fields of HsWildCardTy and HsHole now match: type instance XWildCardTy Ghc{Ps,Rn} = HoleKind type instance XHole Ghc{Ps,Rn} = HoleKind This is progress towards unification of HsExpr and HsType. Test case: T25121_status In addition to that, exact-printing of infix holes is fixed. Test case: PprInfixHole - - - - - 96b1c440 by Vladislav Zavialov at 2026-04-27T16:08:43-04:00 Move NamespaceSpecifier from x-fields into the AST proper (#26678) This refactoring moves NamespaceSpecifier out of extension fields and into the AST proper, as it is part of the user-written source, and is not pass-specific. Summary of changes: * Move NamespaceSpecifier from GHC/Hs/Basic.hs to Language/Haskell/Syntax/ImpExp.hs and parameterise it by the compiler pass, creating the necessary extension points * Move NamespaceSpecifier out of XFixitySig into FixitySig * Move NamespaceSpecifier out of XIEThingAll (IEThingAllExt) into IEThingAll * Move NamespaceSpecifier out of XIEWholeNamespace (IEWholeNamespaceExt) into IEWholeNamespace This is a pure refactoring with no change in behaviour. - - - - - b75f59be by Wen Kokke at 2026-04-27T16:08:47-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. - - - - - 225e8279 by Wen Kokke at 2026-04-27T16:08:47-04:00 rts: Ensure TRACE_X values are used in place of RtsFlags.TraceFlags.X - - - - - e2637b60 by Wen Kokke at 2026-04-27T16:08:47-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. - - - - - 868fe8e8 by Wen Kokke at 2026-04-27T16:08:47-04:00 rts: Add SymI_HasProto for get/setTraceFlag - - - - - 04f27095 by Wen Kokke at 2026-04-27T16:08:47-04:00 rts: Add SymI_HasProto for start/endEventLogging - - - - - e326cd4c by Simon Peyton Jones at 2026-04-27T16:08:48-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 - - - - - 60 changed files: - + changelog.d/T19174.md - + changelog.d/ghc-api-holes-ast-27111 - + changelog.d/ghc-api-namespace-specifier-26678 - compiler/GHC/Hs/Basic.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Expr.hs-boot - compiler/GHC/Hs/ImpExp.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Docs.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Parser/PostProcess/Haddock.hs - compiler/GHC/Rename/Bind.hs - compiler/GHC/Rename/Env.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Module.hs - compiler/GHC/Rename/Names.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Errors/Types.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Export.hs - compiler/GHC/Tc/Gen/Head.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Pat.hs - compiler/GHC/Tc/Utils/Unify.hs - compiler/GHC/ThToHs.hs - compiler/GHC/Types/Name/Reader.hs - compiler/Language/Haskell/Syntax/Binds.hs - compiler/Language/Haskell/Syntax/Decls.hs - compiler/Language/Haskell/Syntax/Extension.hs - compiler/Language/Haskell/Syntax/ImpExp.hs - ghc/GHC/Driver/Session/Mode.hs - ghc/GHCi/UI.hs - ghc/Main.hs - ghc/ghc-bin.cabal.in - hadrian/src/Settings/Packages.hs - rts/RtsSymbols.c - rts/Trace.c - rts/Trace.h - rts/include/rts/EventLogWriter.h - rts/sm/NonMoving.c - testsuite/tests/ghc-api/T25121_status.stdout - testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr - testsuite/tests/parser/should_compile/T20846.stderr - testsuite/tests/printer/Makefile - + testsuite/tests/printer/PprInfixHole.hs - testsuite/tests/printer/all.T - + testsuite/tests/typecheck/should_fail/T27210.hs - + testsuite/tests/typecheck/should_fail/T27210.stderr - testsuite/tests/typecheck/should_fail/all.T - utils/check-exact/ExactPrint.hs - utils/haddock/haddock-api/src/Haddock/Backends/Hoogle.hs - utils/haddock/haddock-api/src/Haddock/Convert.hs - utils/haddock/haddock-api/src/Haddock/GhcUtils.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/5af4b7c79897e3f9965b9f7399ee1f7... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5af4b7c79897e3f9965b9f7399ee1f7... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)