Ben Gamari pushed to branch wip/backports-9.14 at Glasgow Haskell Compiler / GHC Commits: e73e2ef5 by Ben Gamari at 2025-10-02T16:05:31-04:00 users-guide: Add missing libraries to release notes Fixes #26421. - - - - - d7df293a by sheaf at 2025-10-02T16:05:31-04:00 Revert "Remove hptAllFamInstances usage during upsweep" This reverts commit 3bf6720eff5e86e673568e756161e6d6150eb440. (cherry picked from commit 0975d2b6c0747cd40abb4e881b2fb086cbc93726) - - - - - 9c489d4c by soulomoon at 2025-10-02T16:05:31-04:00 Family consistency checks: add test for #26154 This commit adds the test T26154, to make sure that GHC doesn't crash when performing type family consistency checks. This test case was extracted from Agda. Fixes #26154 (cherry picked from commit 0cf341761fa2b506868a62a0e20a6214eb275be0) - - - - - 9aac600b by Simon Peyton Jones at 2025-10-02T16:05:31-04:00 Report solid equality errors before custom errors This MR fixes #26255 by * Reporting solid equality errors like Int ~ Bool before "custom type errors". See comments in `report1` in `reportWanteds` * Suppressing errors that arise from superclasses of Wanteds. See (SCE1) in Note [Suppressing confusing errors] More details in #26255. (cherry picked from commit ba210d981b0812aea604f884d3c0aada4c8ca75c) - - - - - ab308f0c by Simon Peyton Jones at 2025-10-02T16:05:31-04:00 Fix a scoping error in Specialise This small patch fixes #26329, which triggered a scoping error. Test is in T21391, with -fpolymorphic-specialisation enabled (cherry picked from commit b62491405ae851ae514afe18d51f0fe7fbefebf3) - - - - - 176d7769 by Ben Gamari at 2025-10-02T16:05:31-04:00 Add primop to annotate the call stack with arbitrary data We introduce a new primop `annotateStack#` which allows us to push arbitrary data onto the call-stack. This allows us to extract the data later when decoding the stack, for example when an exception is thrown, showing more information to the user without having to annotate the full call-stack with `HasCallStack` constraints. A new stack frame value is introduced `AnnFrame`, which consists of nothing but a generic payload. The primop has a small wrapper API that allows users to annotate their call-stack in programs. There is a pure API and an IO-based one. The former is a little bit dubious, as it affects the evaluation of a program, so use with care. The latter is "safe", as it doesn't change the evaluation of the program. The stack annotation mechanism is similarly implemented to the `ExceptionAnnotation` and `Exception`, there is a typeclass to indicate something can be pushed onto the call-stack and all values are wrapped in the existential `SomeStackAnnotation`, which recover the type of the annotation payload. There is currently no builtin way to show the stack annotations when `Backtraces` are displayed (i.e., when showing stack traces to the user), which we will address in a follow-up MR. ------------------------- Metric Increase: ghc_experimental_so ------------------------- We increase the size of the package, so this is not unreasonable. Co-Authored-By: fendor <fendor@posteo.de> Co-Authored-By: Ben Gamari <bgamari.foss@gmail.com> (cherry picked from commit 774fec37d37fd9f31a3742f684b2b5621628f5bf) - - - - - 2fc4c18b by Rodrigo Mesquita at 2025-10-02T16:05:31-04:00 bytecode: Use 32bits for breakpoint index Fixes #26325 (cherry picked from commit e368e24779f8a7bf110a025383db23521b313407) - - - - - af241d6c by fendor at 2025-10-02T16:05:32-04:00 Move stack decoding logic from ghc-heap to ghc-internal The stack decoding logic in `ghc-heap` is more sophisticated than the one currently employed in `CloneStack`. We want to use the stack decoding implementation from `ghc-heap` in `base`. We cannot simply depend on `ghc-heap` in `base` due do bootstrapping issues. Thus, we move the code that is necessary to implement stack decoding to `ghc-internal`. This is the right location, as we don't want to add a new API to `base`. Moving the stack decoding logic and re-exposing it in ghc-heap is insufficient, though, as we have a dependency cycle between. * ghc-heap depends on stage1:ghc-internal * stage0:ghc depends on stage0:ghc-heap To fix this, we remove ghc-heap from the set of `stage0` dependencies. This is not entirely straight-forward, as a couple of boot dependencies, such as `ghci` depend on `ghc-heap`. Luckily, the boot compiler of GHC is now >=9.10, so we can migrate `ghci` to use `ghc-internal` instead of `ghc-heap`, which already exports the relevant modules. However, we cannot 100% remove ghc's dependency on `ghc-heap`, since when we compile `stage0:ghc`, `stage1:ghc-internal` is not yet available. Thus, when we compile with the boot-compiler, we still depend on an older version of `ghc-heap`, and only use the modules from `ghc-internal`, if the `ghc-internal` version is recent enough. ------------------------- Metric Increase: T24602_perf_size T25046_perf_size_gzip T25046_perf_size_unicode T25046_perf_size_unicode_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- These metric increases are unfortunate, they are most likely caused by the larger (literally in terms of lines of code) stack decoder implementation that are now linked into hello-word binaries. On linux, it is almost a 10% increase, which is considerable. (cherry picked from commit 26dbcf616378afed9da9d50b5357786f3bd7ff9d) - - - - - 2eefd0a7 by fendor at 2025-10-02T16:05:32-04:00 Implement `decode` in terms of `decodeStackWithIpe` Uses the more efficient stack decoder implementation. (cherry picked from commit bd80bb7013b1c2446557a56779c88e7ad1a06259) - - - - - dfa19170 by fendor at 2025-10-02T16:05:32-04:00 Remove stg_decodeStackzh (cherry picked from commit 2444116517515ce7bc6bf7ac8479e919d945ed6a) - - - - - d2e07553 by fendor at 2025-10-02T16:05:32-04:00 Expose Stack Annotation frames in IPE backtraces by default When decoding the Haskell-native call stack and displaying the IPE information for the stack frames, we print the `StackAnnotation` of the `AnnFrame` by default. This means, when an exception is thrown, any intermediate stack annotations will be displayed in the `IPE Backtrace`. Example backtrace: ``` Exception: ghc-internal:GHC.Internal.Exception.ErrorCall: Oh no! IPE backtrace: annotateCallStackIO, called at app/Main.hs:48:10 in backtrace-0.1.0.0-inplace-server:Main annotateCallStackIO, called at app/Main.hs:46:13 in backtrace-0.1.0.0-inplace-server:Main Main.handler (app/Main.hs:(46,1)-(49,30)) Main.liftIO (src/Servant/Server/Internal/Handler.hs:30:36-42) Servant.Server.Internal.Delayed.runHandler' (src/Servant/Server/Internal/Handler.hs:27:31-41) Control.Monad.Trans.Resource.runResourceT (./Control/Monad/Trans/Resource.hs:(192,14)-(197,18)) Network.Wai.Handler.Warp.HTTP1.processRequest (./Network/Wai/Handler/Warp/HTTP1.hs:195:20-22) Network.Wai.Handler.Warp.HTTP1.processRequest (./Network/Wai/Handler/Warp/HTTP1.hs:(195,5)-(203,31)) Network.Wai.Handler.Warp.HTTP1.http1server.loop (./Network/Wai/Handler/Warp/HTTP1.hs:(141,9)-(157,42)) HasCallStack backtrace: error, called at app/Main.hs:48:32 in backtrace-0.1.0.0-inplace-server:Main ``` The first two entries have been added by `annotateCallStackIO`, defined in `annotateCallStackIO`. (cherry picked from commit 26e0db16365059f0fdfe63b773852df45ebda913) - - - - - 68fe9237 by Rodrigo Mesquita at 2025-10-02T16:05:32-04:00 cleanup: Move dehydrateCgBreakInfo to Stg2Bc This no longer has anything to do with Core. (cherry picked from commit 79816cc4071d281d6893ad3df4c06e9cf51daee7) - - - - - c1d6578f by Rodrigo Mesquita at 2025-10-02T16:05:32-04:00 rts/Disassembler: Fix spacing of BRK_FUN (cherry picked from commit 53da94ff72f63b6ac09ecd16493a321843ea2c69) - - - - - 9b824bb6 by Rodrigo Mesquita at 2025-10-02T16:05:32-04:00 debugger: Fix bciPtr in Step-out We need to use `BCO_NEXT` to move bciPtr to ix=1, because ix=0 points to the instruction itself! I do not understand how this didn't crash before. (cherry picked from commit 08c0cf85abdd0cf63c64f9819cd34b42d437d114) - - - - - 78558caf by Rodrigo Mesquita at 2025-10-02T16:05:32-04:00 debugger: Allow BRK_FUNs to head case continuation BCOs When we start executing a BCO, we may want to yield to the scheduler: this may be triggered by a heap/stack check, context switch, or a breakpoint. To yield, we need to put the stack in a state such that when execution is resumed we are back to where we yielded from. Previously, a BKR_FUN could only head a function BCO because we only knew how to construct a valid stack for yielding from one -- simply add `apply_interp_info` + the BCO to resume executing. This is valid because the stack at the start of run_BCO is headed by that BCO's arguments. However, in case continuation BCOs (as per Note [Case continuation BCOs]), we couldn't easily reconstruct a valid stack that could be resumed because we dropped too soon the stack frames regarding the value returned (stg_ret) and received (stg_ctoi) by that continuation. This is especially tricky because of the variable type and size return frames (e.g. pointer ret_p/ctoi_R1p vs a tuple ret_t/ctoi_t2). The trick to being able to yield from a BRK_FUN at the start of a case cont BCO is to stop removing the ret frame headers eagerly and instead keep them until the BCO starts executing. The new layout at the start of a case cont. BCO is described by the new Note [Stack layout when entering run_BCO]. Now, we keep the ret_* and ctoi_* frames when entering run_BCO. A BRK_FUN is then executed if found, and the stack is yielded as-is with the preserved ret and ctoi frames. Then, a case cont BCO's instructions always SLIDE off the headers of the ret and ctoi frames, in StgToByteCode.doCase, turning a stack like | .... | +---------------+ | fv2 | +---------------+ | fv1 | +---------------+ | BCO | +---------------+ | stg_ctoi_ret_ | +---------------+ | retval | +---------------+ | stg_ret_..... | +---------------+ into | .... | +---------------+ | fv2 | +---------------+ | fv1 | +---------------+ | retval | +---------------+ for the remainder of the BCO. Moreover, this more uniform approach of keeping the ret and ctoi frames means we need less ad-hoc logic concerning the variable size of ret_tuple vs ret_p/np frames in the code generator and interpreter: Always keep the return to cont. stack intact at the start of run_BCO, and the statically generated instructions will take care of adjusting it. Unlocks BRK_FUNs at the start of case cont. BCOs which will enable a better user-facing step-out (#26042) which is free of the bugs the current BRK_ALTS implementation suffers from (namely, using BRK_FUN rather than BRK_ALTS in a case cont. means we'll never accidentally end up in a breakpoint "deeper" than the continuation, because we stop at the case cont itself rather than on the first breakpoint we evaluate after it). (cherry picked from commit e7e021fa8ebb847823d2cc6c2a1ae73b94cd6fd8) - - - - - eb61b19d by Rodrigo Mesquita at 2025-10-02T16:05:32-04:00 BRK_FUN with InternalBreakLocs for code-generation time breakpoints At the start of a case continuation BCO, place a BRK_FUN. This BRK_FUN uses the new "internal breakpoint location" -- allowing us to come up with a valid source location for this breakpoint that is not associated with a source-level tick. For case continuation BCOs, we use the last tick seen before it as the source location. The reasoning is described in Note [Debugger: Stepout internal break locs]. Note how T26042c, which was broken because it displayed the incorrect behavior of the previous step out when we'd end up at a deeper level than the one from which we initiated step-out, is now fixed. As of this commit, BRK_ALTS is now dead code and is thus dropped. Note [Debugger: Stepout internal break locs] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Step-out tells the interpreter to run until the current function returns to where it was called from, and stop there. This is achieved by enabling the BRK_FUN found on the first RET_BCO frame on the stack (See [Note Debugger: Step-out]). Case continuation BCOs (which select an alternative branch) must therefore be headed by a BRK_FUN. An example: f x = case g x of <--- end up here 1 -> ... 2 -> ... g y = ... <--- step out from here - `g` will return a value to the case continuation BCO in `f` - The case continuation BCO will receive the value returned from g - Match on it and push the alternative continuation for that branch - And then enter that alternative. If we step-out of `g`, the first RET_BCO on the stack is the case continuation of `f` -- execution should stop at its start, before selecting an alternative. (One might ask, "why not enable the breakpoint in the alternative instead?", because the alternative continuation is only pushed to the stack *after* it is selected by the case cont. BCO) However, the case cont. BCO is not associated with any source-level tick, it is merely the glue code which selects alternatives which do have source level ticks. Therefore, we have to come up at code generation time with a breakpoint location ('InternalBreakLoc') to display to the user when it is stopped there. Our solution is to use the last tick seen just before reaching the case continuation. This is robust because a case continuation will thus always have a relevant breakpoint location: - The source location will be the last source-relevant expression executed before the continuation is pushed - So the source location will point to the thing you've just stepped out of - Doing :step-local from there will put you on the selected alternative (which at the source level may also be the e.g. next line in a do-block) Examples, using angle brackets (<<...>>) to denote the breakpoint span: f x = case <<g x>> {- step in here -} of 1 -> ... 2 -> ...> g y = <<...>> <--- step out from here ... f x = <<case g x of <--- end up here, whole case highlighted 1 -> ... 2 -> ...>> doing :step-local ... f x = case g x of 1 -> <<...>> <--- stop in the alternative 2 -> ... A second example based on T26042d2, where the source is a do-block IO action, optimised to a chain of `case expressions`. main = do putStrLn "hello1" <<f>> <--- step-in here putStrLn "hello3" putStrLn "hello4" f = do <<putStrLn "hello2.1">> <--- step-out from here putStrLn "hello2.2" ... main = do putStrLn "hello1" <<f>> <--- end up here again, the previously executed expression putStrLn "hello3" putStrLn "hello4" doing step/step-local ... main = do putStrLn "hello1" f <<putStrLn "hello3">> <--- straight to the next line putStrLn "hello4" Finishes #26042 (cherry picked from commit ade3c1e60025c1f2e389742b526a141e5346c6b1) - - - - - cc4027a8 by Rodrigo Mesquita at 2025-10-02T16:05:32-04:00 debugger: Re-use the last BreakpointId whole in step-out Previously, to come up with a location to stop at for `:stepout`, we would store the location of the last BreakpointId surrounding the continuation, as described by Note [Debugger: Stepout internal break locs]. However, re-using just the location from the last source breakpoint isn't sufficient to provide the necessary information in the break location. Specifically, it wouldn't bind any variables at that location. Really, there is no reason not to re-use the last breakpoint wholesale, and re-use all the information we had there. Step-out should behave just as if we had stopped at the call, but s.t. continuing will not re-execute the call. This commit updates the CgBreakInfo to always store a BreakpointId, be it the original one or the one we're emulating (for step-out). It makes variable bindings on :stepout work (cherry picked from commit c66910c06d63c1fe0b1c87d42a0cac8c1db260eb) - - - - - 0d8a524a by Moritz Angermann at 2025-10-02T16:05:32-04:00 Improve mach-o relocation information This change adds more information about the symbol and addresses we try to relocate in the linker. This significantly helps when deubbging relocation issues reported by users. (cherry picked from commit 1537784bd4928f5ae60504e8ef467279fe541875) - - - - - 2d13da9f by Moritz Angermann at 2025-10-02T16:05:32-04:00 test.mk expect GhcLeadingUnderscore, not LeadingUnderscore (in line with the other Ghc prefixed variables. (cherry picked from commit 4e67855b01853bc4a23810b361061eceb1c49efd) - - - - - 8a487b28 by Moritz Angermann at 2025-10-02T16:05:32-04:00 testsuite: Fix broken exec_signals_child.c There is no signal 0. The signal mask is 1-32. (cherry picked from commit c1cdd26507fa0b7cb7585af5a7b2ec5b1422d385) - - - - - b6d663c2 by Moritz Angermann at 2025-10-02T16:05:32-04:00 testsuite: clarify Windows/Darwin locale rationale for skipping T6037 T2507 T8959a (cherry picked from commit 99ac335c54b648d04ced28e2a4d3840871bf9d15) - - - - - e69eee1a by Moritz Angermann at 2025-10-02T16:05:32-04:00 Skip broken tests on macOS (due to leading underscore not handled properly in the expected output.) (cherry picked from commit 0e8fa77a72c601c9f4ee661bb9f335fff245885a) - - - - - f38c747b by Cheng Shao at 2025-10-02T16:05:32-04:00 rel-eng: update alpine images to 3.22 This patch is a part of #25876 and updates alpine images to 3.22, while still retaining 3.12 for x86_64 fully_static bindists. ------------------------- Metric Decrease: MultiComponentModulesRecomp ------------------------- (cherry picked from commit d17257edc178c66b930ba279133f462962702470) - - - - - 59fa544f by Sylvain Henry at 2025-10-02T16:05:32-04:00 T16180: indicate that the stack isn't executable (cherry picked from commit db3276bb5a2597bcaf8f830926298935066aeee6) - - - - - fbe34ee6 by Sylvain Henry at 2025-10-02T16:05:32-04:00 Fix some tests (statically linked GHC vs libc) When GHC is linked statically, the stdout C global variable that GHC uses isn't shared with the stdout C global variable used by loaded code. As a consequence, the latter must be explicitly flushed because GHC won't flush it before exiting. (cherry picked from commit 11eeeba7dd50d16c8c7d62165d006bba8fa339a9) - - - - - 963fd0a9 by Sylvain Henry at 2025-10-02T16:05:32-04:00 Testsuite: fix debug_rts detection Running the testsuite without Hadrian should set config.debug_rts correctly too. (cherry picked from commit 80a07571623a6fe7692c08dbdee440ff90ce98c2) - - - - - 52561996 by Simon Peyton Jones at 2025-10-02T16:05:32-04:00 Solve forall-constraints via an implication, again In this earlier commit: commit 953fd8f1dc080f1c56e3a60b4b7157456949be29 Author: Simon Peyton Jones <simon.peytonjones@gmail.com> Date: Mon Jul 21 10:06:43 2025 +0100 Solve forall-constraints immediately, or not at all I used a all-or-nothing strategy for quantified constraints (aka forall-constraints). But alas that fell foul of #26315, and #26376. So this MR goes back to solving a quantified constraint by turning it into an implication; UNLESS we are simplifying constraints from a SPECIALISE pragma, in which case the all-or-nothing strategy is great. See: Note [Solving a Wanted forall-constraint] Other stuff in this MR: * TcSMode becomes a record of flags, rather than an enumeration type; much nicer. * Some fancy footwork to avoid error messages worsening again (The above MR made them better; we want to retain that.) See `GHC.Tc.Errors.Ppr.pprQCOriginExtra`. ------------------------- Metric Decrease: T24471 ------------------------- (cherry picked from commit 14123ee646f2b9738a917b7cec30f9d3941c13de) - - - - - b391e9b6 by Simon Peyton Jones at 2025-10-02T16:05:32-04:00 Add a test case for #26396 ...same bug ast #26315 (cherry picked from commit e6c192e2ccdc6e7ac939ea70d891f176109c60e2) - - - - - 166cc7cf by Cheng Shao at 2025-10-02T16:05:33-04:00 Revert "wasm: add brotli compression for ghci browser mode" This reverts commit 731217ce68a1093b5f9e26a07d5bd2cdade2b352. Benchmarks show non-negligible overhead when browser runs on the same host, which is the majority of actual use cases. (cherry picked from commit 42a189603e2e768795cb1684e1aa53ca840c0907) - - - - - 19f4d5e7 by Cheng Shao at 2025-10-02T16:05:33-04:00 wasm: remove etag logic in ghci browser mode web server This commit removes the etag logic in dyld script's ghci browser mode web server. It was meant to support caching logic of wasm shared libraries, but even if the port is manually specified to make caching even relevant, for localhost the extra overhead around etag logic is simply not worth it according to benchmarks. (cherry picked from commit e6755b9fd10708057dfe1e52a931a579c417c3cf) - - - - - 99a2d2e4 by Sylvain Henry at 2025-10-02T16:05:33-04:00 Print fully qualified unit names in name mismatch It's more user-friendly to directly print the right thing instead of requiring the user to retry with the additional `-dppr-debug` flag. (cherry picked from commit 54b5950ebfed24429fae5111896ffc1f10750d08) - - - - - 4934b3ff by Stefan Schulze Frielinghaus at 2025-10-02T16:05:33-04:00 rts: Fix alignment for gen_workspace #26334 After a0fa4941903272c48b050d24e93eec819eff51bd bootstrap is broken on s390x and errors out with rts/sm/GCThread.h:207:5: error: error: alignment of array elements is greater than element size 207 | gen_workspace gens[]; | ^~~~~~~~~~~~~ The alignment constraint is applied via the attribute to the type gen_workspace and leaves the underlying type struct gen_workspace_ untouched. On Aarch64, x86, and s390x the struct has a size of 128 bytes. On Aarch64 and x86 the alignments of 128 and 64 are divisors of the size, respectively, which is why the type is a viable member type for an array. However, on s390x, the alignment is 256 and therefore is not a divisor of the size and hence cannot be used for arrays. Basically I see two fixes here. Either decrease the alignment requirement on s390x, or by applying the alignment constraint on the struct itself. The former might affect performance as noted in a0fa4941903272c48b050d24e93eec819eff51bd. The latter introduces padding bits whenever necessary in order to ensure that sizeof(gen_workspace[N])==N*sizeof(gen_workspace) holds which is done by this patch. (cherry picked from commit 6f63f57b86fffc8a9102b91a18a6de5bb4f8b7f0) - - - - - c216e6e9 by Cheng Shao at 2025-10-02T16:05:33-04:00 ghc-internal: fix codepages program codepages was not properly updated during the base -> ghc-internal migration, this commit fixes it. (cherry picked from commit a4ff12bb8657c291a36f09bf2ee6a3798366cbb3) - - - - - 97c73f1a by Cheng Shao at 2025-10-02T16:05:33-04:00 ghc-internal: relax ucd2haskell cabal upper bounds This commit relaxes ucd2haskell cabal upper bounds to make it runnable via ghc 9.12/9.14. (cherry picked from commit 7e094def054d4a283e55f96167b3ab9eb8c3b4ea) - - - - - 049163fb by Cheng Shao at 2025-10-02T16:05:33-04:00 ghc-internal: update to unicode 17.0.0 This commit updates the generated code in ghc-internal to match unicode 17.0.0. (cherry picked from commit 7077c9f76ebadedefd763078e7f7c42201b8a4b4) - - - - - e7e24498 by sheaf at 2025-10-02T16:05:33-04:00 Bad record update msg: allow out-of-scope datacons This commit ensures that, when we encounter an invalid record update (because no constructor exists which contains all of the record fields mentioned in the record update), we graciously handle the situation in which the constructors themselves are not in scope. In that case, instead of looking up the constructors in the GlobalRdrEnv, directly look up their GREInfo using the lookupGREInfo function. Fixes #26391 (cherry picked from commit cef8938f3c0d22583f01d5ea29e6109bccd36040) - - - - - 93049210 by sheaf at 2025-10-02T16:05:33-04:00 Improve Notes about disambiguating record updates This commit updates the notes [Disambiguating record updates] and [Type-directed record disambiguation], in particular adding more information about the deprecation status of type-directed disambiguation of record updates. (cherry picked from commit a2d9d7c2073867ee0cabb8d49f93246d95ec0b09) - - - - - 8f08bbee by Ben Gamari at 2025-10-02T16:05:33-04:00 StgToByteCode: Don't assume that data con workers are nullary Previously StgToByteCode assumed that all data-con workers were of a nullary representation. This is not a valid assumption, as seen in #23210, where an unsaturated application of a unary data constructor's worker resulted in invalid bytecode. Sadly, I have not yet been able to reduce a minimal testcase for this. Fixes #23210. (cherry picked from commit d1d9e39ec293cd1d2b539b8246a349b539c6a61a) - - - - - 98f9d9d8 by Ben Gamari at 2025-10-02T16:05:33-04:00 testsuite: Mark T23146* as unbroken (cherry picked from commit 3eeecd508ef80812bc8ee84ab83f496f5030d59b) - - - - - 89c08312 by Cheng Shao at 2025-10-02T16:05:33-04:00 rts: remove obsolete CC_SUPPORTS_TLS logic This patch removes obsolete CC_SUPPORTS_TLS logic throughout the rts, given __thread is now uniformly supported by C toolchains of all platforms we currently support. (cherry picked from commit 0f034942724233e1457549123b46880f7b93e805) - - - - - 3617ed46 by Cheng Shao at 2025-10-02T16:05:33-04:00 rts: remove obsolete HAS_VISIBILITY_HIDDEN logic This patch removes obsolete HAS_VISIBILITY_HIDDEN logic throughout the rts, given __attribute__((visibility("hidden"))) is uniformly supported by C toolchains of all platforms we currently support. (cherry picked from commit ef7056554df5603ec4d1e33193abe953970e6ab3) - - - - - 87990d6f by Cheng Shao at 2025-10-02T16:05:33-04:00 rts: remove -O3 pragma hack in Hash.c This patch removes an obsolete gcc pragma to specify -O3 in Hash.c. Hadrian already passes the right flag. (cherry picked from commit 9fdc1f7d855cc61f90de909875f6ae0d6798dca7) - - - - - 19d533f1 by Cheng Shao at 2025-10-02T16:05:33-04:00 rts: remove obsolete COMPILING_WINDOWS_DLL logic This patch removes obsolete COMPILING_WINDOWS_DLL logic throughout the rts. They were once used for compiling to win32 DLLs, but we haven't been able to compile Haskell units to win32 DLLs for many years now, due to PE format's restriction of no more than 65536 exported symbols in a single DLL. (cherry picked from commit b8cfa8f741729ef123569fb321c4b2ab4a1a941c) - - - - - 30277f0b by Cheng Shao at 2025-10-02T16:05:33-04:00 wasm: bump browser_wasi_shim to 0.4.2 This patch bumps the browser_wasi_shim dependency of wasm dyld script to 0.4.2. (cherry picked from commit bb760611630402a1349b1952e345d879f83e4821) - - - - - a53571f6 by Vladislav Zavialov at 2025-10-02T16:05:33-04:00 Fix keyword in ExplicitNamespaces error message (#26418) Consider this module header and the resulting error: {-# LANGUAGE NoExplicitNamespaces #-} module T26418 (data HeadC) where -- error: [GHC-47007] -- Illegal keyword 'type' Previously, the error message would mention 'type' (as shown above), even though the user wrote 'data'. This has now been fixed. The error location has also been corrected: it is now reported at the keyword position rather than at the position of the associated import/export item. (cherry picked from commit 4a8fed75e2094f9ae2af27bf86298873316c3acb) - - - - - 644c05e9 by Cheng Shao at 2025-10-02T16:05:33-04:00 wasm: fix dyld handling for forward declared GOT.func items This patch fixes wasm shared linker's handling of forward declared GOT.func items, see linked issue for details. Also adds T26430 test to witness the fix. Fixes #26430. Co-authored-by: Codex <codex@openai.com> (cherry picked from commit 867c26755e8855c6df949e65df0c2aebc9da64c3) - - - - - 18927fce by Cheng Shao at 2025-10-02T16:05:33-04:00 rts: remove obsolete __GNUC__ related logic This patch removes obsolete `__GNUC__` related logic, given on any currently supported platform and toolchain, `__GNUC__ >= 4` is universally true. Also pulls some other weeds and most notably, use `__builtin___clear_cache` for clang as well, since clang has supported this gcc intrinsic since 2014, see https://github.com/llvm/llvm-project/commit/c491a8d4577052bc6b3b4c72a7db6a7c.... (cherry picked from commit 67de53a6ced23caad640d2c7421089242f0dfb76) - - - - - f1999d7d by Brandon Chinn at 2025-10-02T16:05:33-04:00 Fix tabs in string gaps (#26415) Tabs in string gaps were broken in bb030d0d because previously, string gaps were manually parsed, but now it's lexed by the usual Alex grammar and post-processed after successful lexing. It broke because of a discrepancy between GHC's lexer grammar and the Haskell Report. The Haskell Report includes tabs in whitechar: whitechar → newline | vertab | space | tab | uniWhite $whitechar used to include tabs until 18 years ago, when it was removed in order to exclude tabs from $white_no_nl in order to warn on tabs: 6e202120. In this MR, I'm adding \t back into $whitechar, and explicitly excluding \t from the $white_no_nl+ rule ignoring all whitespace in source code, which more accurately colocates the "ignore all whitespace except tabs, which is handled in the next line" logic. As a side effect of this MR, tabs are now allowed in pragmas; currently, a pragma written as {-# \t LANGUAGE ... #-} is interpreted as the tab character being the pragma name, and GHC warns "Unrecognized pragma". With this change, tabs are ignored as whitespace, which more closely matches the Report anyway. (cherry picked from commit e9c5e46ffdb3cd8725e2ffdc2c440ea57af97bac) - - - - - 8afc7a2e by Cheng Shao at 2025-10-02T16:05:33-04:00 hadrian: fix GHC.Platform.Host generation for cross stage1 This patch fixes incorrectly GHC.Platform.Host generation logic for cross stage1 in hadrian (#26449). Also adds T26449 test case to witness the fix. Co-authored-by: Codex <codex@openai.com> (cherry picked from commit 8cbe006ad09d5a64e4a3cdf4c91a8b81ff1511be) - - - - - e5a34bb9 by Ben Gamari at 2025-10-02T16:05:33-04:00 base: Update changelog to reflect timing of IOPort# removal This change will make 9.14 afterall. (cherry picked from commit e05c496cf44c0cc86dcfa8ad8c5b024e44d8e4b4) - - - - - f75c7eba by Simon Peyton Jones at 2025-10-02T16:05:33-04:00 Fix buglet in GHC.Core.Unify.uVarOrFam We were failing to match two totally-equal types! This led to #26457. (cherry picked from commit 9c293544a8b127aef3b4089f7e5cc21cb51a9946) - - - - - e72f3d36 by Cheng Shao at 2025-10-02T16:05:33-04:00 testsuite: remove unused expected output files This patch removes unused expected output files in the testsuites on platforms that we no longer support. (cherry picked from commit 6992ac097b9da989f125f896afe21b75dba8b4c9) - - - - - f0f3babc by Ben Gamari at 2025-10-02T16:05:33-04:00 rts: Dynamically initialize built-in closures To resolve #26166 we need to eliminate references to undefined symbols in the runtime system. One such source of these is the runtime's static references to `I#` and `C#` due the `stg_INTLIKE` and `stg_CHARLIKE` arrays. To avoid this we make these dynamic, initializing them during RTS start-up. (cherry picked from commit 39eaaaba5356e3fc9218d8e27375d6de24778cbc) - - - - - 283 changed files: - .gitlab-ci.yml - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/ByteCode/Asm.hs - compiler/GHC/ByteCode/Breakpoints.hs - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/ByteCode/Types.hs - compiler/GHC/Core/Opt/Specialise.hs - compiler/GHC/Core/Type.hs - compiler/GHC/Core/Unify.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Driver/Env.hs - compiler/GHC/HsToCore/Binds.hs - compiler/GHC/HsToCore/Pmc/Solver.hs - compiler/GHC/Iface/Errors/Ppr.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/Errors/Ppr.hs - compiler/GHC/Parser/Errors/Types.hs - compiler/GHC/Parser/Lexer.x - compiler/GHC/Parser/Lexer/String.x - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Parser/Types.hs - compiler/GHC/Rename/Env.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Runtime/Debugger/Breakpoints.hs - compiler/GHC/Runtime/Eval.hs - compiler/GHC/Runtime/Heap/Inspect.hs - compiler/GHC/StgToByteCode.hs - compiler/GHC/StgToCmm/Prim.hs - compiler/GHC/StgToJS/Prim.hs - compiler/GHC/Tc/Deriv/Utils.hs - compiler/GHC/Tc/Errors.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/Instance/Family.hs - compiler/GHC/Tc/Module.hs - compiler/GHC/Tc/Solver.hs - compiler/GHC/Tc/Solver/Default.hs - compiler/GHC/Tc/Solver/Dict.hs - compiler/GHC/Tc/Solver/Equality.hs - compiler/GHC/Tc/Solver/InertSet.hs - compiler/GHC/Tc/Solver/Monad.hs - compiler/GHC/Tc/Solver/Solve.hs - compiler/GHC/Tc/Solver/Solve.hs-boot - compiler/GHC/Tc/Types/Constraint.hs - compiler/GHC/Tc/Types/Evidence.hs - compiler/GHC/Tc/Types/Origin.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Tc/Utils/TcType.hs - compiler/GHC/Tc/Zonk/TcType.hs - compiler/GHC/Tc/Zonk/Type.hs - compiler/GHC/Unit/Home/Graph.hs - compiler/GHC/Unit/Home/PackageTable.hs - compiler/GHC/Unit/State.hs - compiler/ghc.cabal.in - docs/users_guide/9.14.1-notes.rst - ghc/GHCi/UI.hs - hadrian/src/Oracles/TestSettings.hs - hadrian/src/Rules/Generate.hs - hadrian/src/Rules/ToolArgs.hs - hadrian/src/Settings/Default.hs - libraries/base/changelog.md - libraries/base/src/GHC/Stack/CloneStack.hs - libraries/base/tests/unicode002.stdout - libraries/base/tests/unicode003.stdout - libraries/ghc-experimental/ghc-experimental.cabal.in - + libraries/ghc-experimental/src/GHC/Stack/Annotation/Experimental.hs - libraries/ghc-heap/GHC/Exts/Heap/ClosureTypes.hs - libraries/ghc-heap/GHC/Exts/Heap/Closures.hs - + libraries/ghc-heap/GHC/Exts/Heap/Constants.hs - + libraries/ghc-heap/GHC/Exts/Heap/InfoTable.hs - + libraries/ghc-heap/GHC/Exts/Heap/InfoTable/Types.hs - + libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hs - libraries/ghc-heap/GHC/Exts/Heap/ProfInfo/Types.hs - libraries/ghc-heap/GHC/Exts/Stack.hs - + libraries/ghc-heap/GHC/Exts/Stack/Constants.hs - libraries/ghc-heap/GHC/Exts/Stack/Decode.hs - libraries/ghc-heap/ghc-heap.cabal.in - libraries/ghc-heap/cbits/HeapPrim.cmm → libraries/ghc-internal/cbits/HeapPrim.cmm - libraries/ghc-heap/cbits/Stack.cmm → libraries/ghc-internal/cbits/Stack.cmm - libraries/ghc-internal/cbits/StackCloningDecoding.cmm - libraries/ghc-heap/cbits/Stack_c.c → libraries/ghc-internal/cbits/Stack_c.c - libraries/ghc-internal/cbits/atomic.c - libraries/ghc-internal/cbits/ctz.c - libraries/ghc-internal/codepages/MakeTable.hs - libraries/ghc-internal/codepages/Makefile - libraries/ghc-internal/ghc-internal.cabal.in - libraries/ghc-internal/jsbits/base.js - libraries/ghc-internal/src/GHC/Internal/ClosureTypes.hs - libraries/ghc-internal/src/GHC/Internal/Exception/Backtrace.hs - + libraries/ghc-internal/src/GHC/Internal/Heap/Closures.hs - libraries/ghc-heap/GHC/Exts/Heap/Constants.hsc → libraries/ghc-internal/src/GHC/Internal/Heap/Constants.hsc - libraries/ghc-heap/GHC/Exts/Heap/InfoTable.hsc → libraries/ghc-internal/src/GHC/Internal/Heap/InfoTable.hsc - libraries/ghc-heap/GHC/Exts/Heap/InfoTable/Types.hsc → libraries/ghc-internal/src/GHC/Internal/Heap/InfoTable/Types.hsc - libraries/ghc-heap/GHC/Exts/Heap/InfoTableProf.hsc → libraries/ghc-internal/src/GHC/Internal/Heap/InfoTableProf.hsc - + libraries/ghc-internal/src/GHC/Internal/Heap/ProfInfo/Types.hs - + libraries/ghc-internal/src/GHC/Internal/Stack/Annotation.hs - libraries/ghc-internal/src/GHC/Internal/Stack/CloneStack.hs - libraries/ghc-heap/GHC/Exts/Stack/Constants.hsc → libraries/ghc-internal/src/GHC/Internal/Stack/Constants.hsc - + libraries/ghc-internal/src/GHC/Internal/Stack/Decode.hs - libraries/ghc-internal/src/GHC/Internal/Unicode/Char/DerivedCoreProperties.hs - libraries/ghc-internal/src/GHC/Internal/Unicode/Char/UnicodeData/GeneralCategory.hs - libraries/ghc-internal/src/GHC/Internal/Unicode/Char/UnicodeData/SimpleLowerCaseMapping.hs - libraries/ghc-internal/src/GHC/Internal/Unicode/Char/UnicodeData/SimpleTitleCaseMapping.hs - libraries/ghc-internal/src/GHC/Internal/Unicode/Char/UnicodeData/SimpleUpperCaseMapping.hs - libraries/ghc-internal/src/GHC/Internal/Unicode/Version.hs - + libraries/ghc-internal/tests/stack-annotation/Makefile - + libraries/ghc-internal/tests/stack-annotation/TestUtils.hs - + libraries/ghc-internal/tests/stack-annotation/all.T - + libraries/ghc-internal/tests/stack-annotation/ann_frame001.hs - + libraries/ghc-internal/tests/stack-annotation/ann_frame001.stdout - + libraries/ghc-internal/tests/stack-annotation/ann_frame002.hs - + libraries/ghc-internal/tests/stack-annotation/ann_frame002.stdout - + libraries/ghc-internal/tests/stack-annotation/ann_frame003.hs - + libraries/ghc-internal/tests/stack-annotation/ann_frame003.stdout - + libraries/ghc-internal/tests/stack-annotation/ann_frame004.hs - + libraries/ghc-internal/tests/stack-annotation/ann_frame004.stdout - libraries/ghc-internal/tools/ucd2haskell/ucd.sh - libraries/ghc-internal/tools/ucd2haskell/ucd2haskell.cabal - libraries/ghc-internal/tools/ucd2haskell/unicode_version - libraries/ghci/GHCi/Message.hs - libraries/ghci/GHCi/Run.hs - libraries/ghci/ghci.cabal.in - − m4/fp_visibility_hidden.m4 - rts/BeginPrivate.h - + rts/BuiltinClosures.c - + rts/BuiltinClosures.h - rts/CloneStack.c - rts/CloneStack.h - rts/ClosureFlags.c - rts/Disassembler.c - rts/EndPrivate.h - rts/Hash.c - rts/Interpreter.c - rts/LdvProfile.c - rts/PrimOps.cmm - rts/Printer.c - rts/Profiling.c - rts/RetainerProfile.c - − rts/RtsDllMain.c - − rts/RtsDllMain.h - rts/RtsStartup.c - rts/RtsSymbols.c - rts/StgMiscClosures.cmm - rts/Task.c - rts/Task.h - rts/TraverseHeap.c - rts/configure.ac - rts/include/Rts.h - rts/include/RtsAPI.h - rts/include/Stg.h - rts/include/rts/Bytecodes.h - rts/include/rts/Constants.h - rts/include/rts/OSThreads.h - rts/include/rts/Types.h - rts/include/rts/storage/ClosureTypes.h - rts/include/rts/storage/Closures.h - rts/include/stg/DLL.h - rts/include/stg/MiscClosures.h - rts/js/profiling.js - rts/linker/MachO.c - rts/posix/OSThreads.c - rts/rts.cabal - rts/sm/BlockAlloc.c - rts/sm/Compact.c - rts/sm/Evac.c - rts/sm/Evac.h - rts/sm/GCTDecl.h - rts/sm/GCThread.h - rts/sm/NonMovingMark.c - rts/sm/Sanity.c - rts/sm/Scav.c - rts/sm/Storage.c - rts/win32/OSThreads.c - testsuite/ghc-config/ghc-config.hs - testsuite/mk/test.mk - testsuite/tests/backpack/should_fail/bkpfail11.stderr - testsuite/tests/backpack/should_fail/bkpfail43.stderr - testsuite/tests/codeGen/should_run/T23146/all.T - testsuite/tests/count-deps/CountDepsAst.stdout - testsuite/tests/count-deps/CountDepsParser.stdout - + testsuite/tests/cross/should_run/T26449.hs - + testsuite/tests/cross/should_run/all.T - + testsuite/tests/deriving/should_compile/T26396.hs - testsuite/tests/deriving/should_compile/all.T - testsuite/tests/deriving/should_fail/T12768.stderr - testsuite/tests/deriving/should_fail/T1496.stderr - testsuite/tests/deriving/should_fail/T21302.stderr - testsuite/tests/deriving/should_fail/T22696b.stderr - testsuite/tests/deriving/should_fail/T5498.stderr - testsuite/tests/deriving/should_fail/T7148.stderr - testsuite/tests/deriving/should_fail/T7148a.stderr - testsuite/tests/driver/all.T - testsuite/tests/ffi/should_run/T1288_c.c - testsuite/tests/ffi/should_run/T1288_ghci_c.c - testsuite/tests/ffi/should_run/T2276_c.c - testsuite/tests/ffi/should_run/T2276_ghci_c.c - + testsuite/tests/ghci-wasm/Makefile - + testsuite/tests/ghci-wasm/T26430.hs - + testsuite/tests/ghci-wasm/T26430A.c - + testsuite/tests/ghci-wasm/T26430B.c - + testsuite/tests/ghci-wasm/all.T - testsuite/tests/ghci.debugger/scripts/T26042b.script - testsuite/tests/ghci.debugger/scripts/T26042b.stdout - testsuite/tests/ghci.debugger/scripts/T26042c.script - testsuite/tests/ghci.debugger/scripts/T26042c.stdout - + testsuite/tests/ghci.debugger/scripts/T26042d2.hs - + testsuite/tests/ghci.debugger/scripts/T26042d2.script - + testsuite/tests/ghci.debugger/scripts/T26042d2.stdout - testsuite/tests/ghci.debugger/scripts/T26042e.stdout - testsuite/tests/ghci.debugger/scripts/T26042f.script - testsuite/tests/ghci.debugger/scripts/T26042f1.stdout - testsuite/tests/ghci.debugger/scripts/T26042f2.stdout - testsuite/tests/ghci.debugger/scripts/T26042g.stdout - testsuite/tests/ghci.debugger/scripts/all.T - testsuite/tests/ghci/scripts/T7388.hs - testsuite/tests/ghci/scripts/T7388.script - testsuite/tests/impredicative/T17332.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/interface-stability/base-exports.stdout-ws-32 - testsuite/tests/interface-stability/ghc-experimental-exports.stdout - testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 - testsuite/tests/interface-stability/ghc-prim-exports.stdout - testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32 - + testsuite/tests/overloadedrecflds/should_fail/T26391.hs - + testsuite/tests/overloadedrecflds/should_fail/T26391.stderr - testsuite/tests/overloadedrecflds/should_fail/all.T - testsuite/tests/parser/should_fail/T16270h.stderr - + testsuite/tests/parser/should_fail/T26418.hs - + testsuite/tests/parser/should_fail/T26418.stderr - testsuite/tests/parser/should_fail/all.T - + testsuite/tests/parser/should_run/T26415.hs - + testsuite/tests/parser/should_run/T26415.stdout - testsuite/tests/parser/should_run/all.T - − testsuite/tests/process/process010.stdout-i386-unknown-solaris2 - testsuite/tests/quantified-constraints/T19690.stderr - testsuite/tests/quantified-constraints/T19921.stderr - testsuite/tests/quantified-constraints/T21006.stderr - testsuite/tests/roles/should_fail/RolesIArray.stderr - testsuite/tests/rts/exec_signals_child.c - − testsuite/tests/rts/linker/T11223/T11223_link_order_a_b_2_fail.stderr-ws-32-mingw32 - − testsuite/tests/rts/linker/T11223/T11223_simple_duplicate_lib.stderr-ws-32-mingw32 - testsuite/tests/rts/linker/T11223/all.T - − testsuite/tests/rts/outofmem.stderr-i386-apple-darwin - − testsuite/tests/rts/outofmem.stderr-i386-unknown-mingw32 - − testsuite/tests/rts/outofmem.stderr-powerpc-apple-darwin - testsuite/tests/simplCore/should_compile/DsSpecPragmas.hs - testsuite/tests/simplCore/should_compile/DsSpecPragmas.stderr - testsuite/tests/th/T16180.hs - testsuite/tests/typecheck/should_compile/T14434.hs - + testsuite/tests/typecheck/should_compile/T26154.hs - + testsuite/tests/typecheck/should_compile/T26154_A.hs - + testsuite/tests/typecheck/should_compile/T26154_B.hs - + testsuite/tests/typecheck/should_compile/T26154_B.hs-boot - + testsuite/tests/typecheck/should_compile/T26154_Other.hs - + testsuite/tests/typecheck/should_compile/T26376.hs - + testsuite/tests/typecheck/should_compile/T26457.hs - testsuite/tests/typecheck/should_compile/all.T - testsuite/tests/typecheck/should_fail/T15801.stderr - testsuite/tests/typecheck/should_fail/T18851.hs - testsuite/tests/typecheck/should_fail/T19627.stderr - testsuite/tests/typecheck/should_fail/T20666.stderr - testsuite/tests/typecheck/should_fail/T20666a.stderr - testsuite/tests/typecheck/should_fail/T20666b.stderr - testsuite/tests/typecheck/should_fail/T22912.stderr - testsuite/tests/typecheck/should_fail/T23427.stderr - + testsuite/tests/typecheck/should_fail/T26255a.hs - + testsuite/tests/typecheck/should_fail/T26255a.stderr - + testsuite/tests/typecheck/should_fail/T26255b.hs - + testsuite/tests/typecheck/should_fail/T26255b.stderr - + testsuite/tests/typecheck/should_fail/T26255c.hs - + testsuite/tests/typecheck/should_fail/T26255c.stderr - testsuite/tests/typecheck/should_fail/UnliftedNewtypesFamilyKindFail2.stderr - testsuite/tests/typecheck/should_fail/all.T - utils/deriveConstants/Main.hs - utils/jsffi/dyld.mjs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d9d6d2d8cf170d51e49b63e1a9d068f... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d9d6d2d8cf170d51e49b63e1a9d068f... You're receiving this email because of your account on gitlab.haskell.org.