[Git][ghc/ghc][ghc-10.0] 63 commits: compiler: avoid unused temporary `appendFS` operands
Zubin pushed to branch ghc-10.0 at Glasgow Haskell Compiler / GHC Commits: c0cb1c1c by Cheng Shao at 2026-11-09T13:45:51+05:30 compiler: avoid unused temporary `appendFS` operands This patch fixes unused temporary `appendFS` operands in the codebase that are retained in the `FastString` table after concatenation. Rewrite rules are added so that if an operand is `fsLit`/`mkFastString`, the `appendFS` application is rewritten to append the `ShortByteString` operands first. The patch also fixes `sconcat` behavior to align with `mconcat` for the same reason. Fixes #27205. (cherry picked from commit 5574ee101d22fa61d90f9d4d4a71be8c47c5346a) - - - - - d02770ab by Cheng Shao at 2026-11-09T13:45:51+05:30 ci: bump freebsd boot ghc to 9.10.3 This commit bumps freebsd boot ghc to 9.10.3 to align with other platforms and prevent outdated boot libs in boot ghc to block the freebsd job. (cherry picked from commit 87db83e2ac41a15ce023eab6f24cf4febfd6c2ce) - - - - - 51d54b82 by Cheng Shao at 2026-11-09T13:45:51+05:30 compiler: improve Binary instance of Array This patch improves the `Binary` instance of `Array`: - We no longer allocate intermediate lists. When serializing an `Array`, we iterate over the elements directly; when deserializing it, we allocate the result `Array` and fill it in a loop. - Now we only serialize the array bounds tuple; the length field is not needed. Closes #27109. (cherry picked from commit 17e3a0b7b9d5b189f8a414a72d1deef26cb5e5f8) - - - - - 855e48a4 by Cheng Shao at 2026-11-09T13:45:52+05:30 compiler: avoid unique OccNames for internal Names in bytecode objects This patch improves bytecode object serialization logic by avoiding the construction of unique `OccName`s when serializing/deserializing internal `Name`s. Closes #27213. ------------------------- Metric Decrease: LinkableUsage01 ------------------------- (cherry picked from commit 2128ba85729762660ddddefcd9509fc6b04ade86) - - - - - 5c7705c2 by Duncan Coutts at 2026-11-09T13:45:52+05:30 Add minimal dlltool support to ghc-toolchain The dlltool is a tool that can create dll import libraries from .def files. These .def files list the exported symbols of dlls. Its somewhat like gnu linker scripts, but more limited. We will need dlltool to build the rts and ghc-internal libraries as DLLs on Windows. The rts and ghc-internal libraries have a recursive dependency on each other. Import libraries can be used to resolve recursive dependencies between dlls. We will use an import library for the rts when linking the ghc-internal library. (cherry picked from commit 1bdcddecbbe0342dd477fd49f09ce9a926da104b) - - - - - 863d93c9 by Duncan Coutts at 2026-11-09T13:45:52+05:30 Add minimal dlltool support into ./configure Find dlltool, and hopefully support finding it within the bundled llvm toolchain on windows. (cherry picked from commit f7fc37708ad28e812f9c0c4ff43e975552ca4972) - - - - - f700d728 by Duncan Coutts at 2026-11-09T13:45:52+05:30 Update the default host and target files for dlltool support (cherry picked from commit e4e22bfba7453800a69c2967d74a712b6c30fb51) - - - - - bd90ec7e by Rodrigo Mesquita at 2026-11-09T13:45:52+05:30 fix: Save FastStrings in the PMC There is no point in adding the unique to the occurrence FastString we create, since it is part of the Id anyway. Adding it to the FastString, meant each FastString was unique unnecessarily! In a separate branch, running the compiler on test `InstanceMatching` observed 30000 `FastString`s created by this code path. Plus, `fsLit "pm"` follows the existing pattern in `mkPmId`. (cherry picked from commit fa5defde38e319b2ff85026fee7630d3bf18faf4) - - - - - c74aea97 by Simon Hengel at 2026-11-09T13:45:52+05:30 Don't use global variables to address concurrency bugs! (fixes #27234) This was originally introduce with 88f38b03025386f0f1e8f5861eed67d80495168a to address #17922. In this specific case a better fix would have been to synchronize on stderr: withHandle_ "stderrSupportsAnsiColors" stderr $ \ _ -> do ... But apparently the dependency on `terminfo` was removed in 32ab07bf3d6ce45e8ea5b55e8095174a6b42a7f0, preventing #17922 in the first place. (cherry picked from commit 9284a1f77cec58abc94f29e18e8c69ef6cb22a18) - - - - - 1e3737bf by Cheng Shao at 2026-11-09T13:48:33+05:30 hadrian/rts: fix unregisterised build for gcc 15+ This patch fixes unregisterised build for gcc 15+: - Pass -optc-Wno-error in hadrian when +werror enables -optc-Werror, see added comment for details. - For RTS functions that the codegen would emit calls, ensure their real prototype is hidden when the header is included in .hc fies (IN_STG_CODE), and the dummy prototype is provided to match the EFF_ convention. In the future we should get rid of EFF_ (#14647) and remove these hacks, but for now this patch makes unregisterised work again on newer toolchains. Fixes #27404. Co-authored-by: Codex <codex@openai.com> (cherry picked from commit e22ad9972091e29ae56ed77686d3c8f1f492e219) - - - - - a97fb3e0 by Cheng Shao at 2026-11-09T13:48:54+05:30 hadrian: fix HLS support This patch fixes hadrian's HLS support so one can rely on HLS when working on the hadrian codebase. Fixes #27480. Not building/linking shared libraries for hadrian is a severely premature optimization; this top-level setting in `cabal.project` only affects home packages while the dependencies in the cabal store are built with vanilla/dynamic anyway, and even adding dynamic builds to home packages would not be costly due to cabal's usage of `-dynamic-too`. (cherry picked from commit ed261a7eef3e8e785c83b71c44fdaf392644e011) - - - - - 8b1f2a63 by cydparser at 2026-11-09T13:48:54+05:30 Reduce bytes allocated for `capabilities` in RTS (fixes #27487) In rts/Capability.c, `capabilities` is an array of pointers, but it was allocated as if it were an array of Capability's. (cherry picked from commit ef038aae3404b3b9865cfb9355106f2f66bc9e07) - - - - - b0d72178 by Cheng Shao at 2026-11-09T13:48:54+05:30 ci: add missing docker permission workaround in abi-test job (cherry picked from commit 0f64f348ee91c2def1408062eb6226e050110781) - - - - - dd89397f by Cheng Shao at 2026-11-09T13:48:54+05:30 bindist: Fix make install -j race condition on macos/freebsd This patch fixes make install -j race condition on macos/freebsd. BSD install fails with EEXIST when multiple install processes concurrently create the same prefix directory. So we add an `install_dirs` prerequisite job that sequentially creates the directories for subsequent jobs to work with. Fixes #27499. Co-authored-by: Codex <codex@openai.com> (cherry picked from commit 660cb23935e105046275fb7d1adddcc623405600) - - - - - fb876e05 by Cheng Shao at 2026-11-09T13:48:55+05:30 ci: run bindist make install with -j This patch makes the ci scripts run `make install` with `-j` to reduce wall clock time when installing the bindist, see related issue for benchmark numbers. This only affects ghc ci logic, the user-facing default is up to distributors and is still `-j1`. Closes #27029. (cherry picked from commit 08130257258dee8f87d084459796cc8d86fa49a1) - - - - - ae8128a5 by Cheng Shao at 2026-11-09T13:48:55+05:30 compiler: fix missing top-level procedure labels in cmm dumps This patch fixes missing top-level procedure labels in some intermediate Cmm pass dumps. Fixes #27553. Co-authored-by: Codex <codex@openai.com> (cherry picked from commit 90e95b34043c54351556ddee013e2d5453e9ae0f) - - - - - 63ff7542 by sheaf at 2026-11-09T13:49:32+05:30 Avoid wasteful allocations in mkTyConAppCo The idiom "traverse isReflCo_maybe" followed by "map fst" used in 'GHC.Core.Coercion.mkTyConAppCo' was allocating a lot of waste. This commit uses 'GHC.Data.Unboxed.traverseMaybeUB' to avoid all these unnecessary intermediate allocations. In a quick microbenchmark for 'mkTyConAppCo', this change resulted in: - refl case (all argument coercions are reflexive): - -60% runtime - -80% allocations - non-refl case: - from 0% to -12% runtime (depending on which argument is non-refl) - from 0% to -70% allocations ( -- '' -- ) Fixes #27648 ------------------------- Metric Decrease: FamAppCachePerf SimplCastPerf T12425 T15703 T26426 T3064 T9872a T9872b T9872b_defer T9872c T9872d T5321Fun T9020 T9630 TcPlugin_RewritePerf Metric Increase: LinkableUsage02 ------------------------- (cherry picked from commit 1aac70958f3774332131b22a948f3785a9c48083) - - - - - 3209cab8 by Andreas Klebinger at 2026-11-09T13:49:33+05:30 rts linker: Fix pointer arithmetic issue in flushInstructionCacheRISCV64 We accidentally operated over `uint64_t*` when we should use `uint8_t`. Fixes #27569 (cherry picked from commit e60eb3bc61d55421adcf33ca39e8dbed6ad8f046) - - - - - 3e0005a7 by Andreas Klebinger at 2026-11-09T13:49:33+05:30 cmm: Always favour entry block during block deduplication. We now always keep the first block in the CmmGraph. This way we avoid the need to update the entry info table. Failing to do so caused #27722. Fixes #27722. (cherry picked from commit a1d8139054c4d329f3222da96675b3a5deff0978) - - - - - 2f228e93 by Andreas Klebinger at 2026-11-09T13:49:33+05:30 Compile Word64{Map,Set} with -O2 always. This is the hottest code and even if we build GHC with -O0 otherwise -O2 pays off for these modules. Fixes #27814. (cherry picked from commit 5236634abce50db7e8e7ecf375def90bf45d2476) - - - - - e350dde6 by ARATA Mizuki at 2026-11-09T13:49:33+05:30 Change the C types of hs_{bitrev,bswap}{16,32} to match the Haskell types bitReverse{16,32}# and byteSwap{16,32}# have the type Word# -> Word#, but their C correspondents took and returned StgWord{16,32}. The mismatch on bitReverse16# led to the problem reported in #27299. Although no similar issue is reported for bitReverse32# and byteSwap{16,32}#, it seemed wise to change them proactively. This commit fixes the mismatch by changing the C type. Fixes #27299 (cherry picked from commit 545fd4fb69d7572180f13fe81e65e42198207840) - - - - - 97eedc6c by fendor at 2026-11-09T13:49:33+05:30 Don't lose instances from shadowed imported modules with the same name When we look for instances below the current module, we need to check the unit id as well when we check for whether the module is the current module, otherwise we ignore modules we import that have the same name as the import module. Adds regression test. (cherry picked from commit bf17f289eb6abf929917350e6e3c549474024539) - - - - - 9ab26cf5 by Andreas Klebinger at 2026-11-09T13:49:33+05:30 Fix MultiLayerModules timeout multiplier. We accidentally used the compile multiplier for ghci commands which use the run timeout setting to set the timeout. Fixes #26263 and #27796. (cherry picked from commit 984ee82ba96cc831ad932ecacedf1fe3cc5d4292) - - - - - b2b71e3c by Hannes Siebenhandl at 2026-11-09T13:50:24+05:30 Add regression test for #27641 (cherry picked from commit 3cc21e4c181cce3d339b0bbc3984ead013b43a0e) - - - - - 747c9d8e by Hannes Siebenhandl at 2026-11-09T13:50:24+05:30 Don't `:add` modules the loader will reject Only home modules can be actually added to the loader context, thus we only accept the module if it belongs to a home unit. (cherry picked from commit c35096f55daffde5d17ca878a965345db410abf5) - - - - - f20fc8af by Hannes Siebenhandl at 2026-11-09T13:50:37+05:30 Extend the `TrustOverlay` for wired-in units The TrustOverlay only contained the `UnitId` of all on-disk units. However, wired-in units are referred to by their wired-in unit id, which is not the same as the on-disk unit id. Thus, trust checks for wired-in units failed because the lookup was using the wired-in unit, which wasn't present in the `TrustOverlay`. We fix #27834, by copying the trust info for wired-in unit ids. (cherry picked from commit 54381079e5a0808f798d1a74e5b94d9fb0cbf3c7) - - - - - 39e2ec55 by mangoiv at 2026-11-09T13:50:37+05:30 configure: fix sed script and subst tooldir script Fixes #27672 Adds sanity checking for SUBST_TOOLDIR Metric Decrease: LinkableUsage01 MultiLayerModulesTH_OneShot T10547 T12234 T12425 T13035 T13820 T18140 T18730 T18923 T9198 TcPlugin_RewritePerf mhu-perf (cherry picked from commit f977837b50ff6c65a87f1bebffb023a2c6a1a525) - - - - - 1f49b8e8 by Hannes Siebenhandl at 2026-11-09T13:50:52+05:30 Prepend in-memory unit database for backpack The packageDbFlags are stored in reverse order. Thus, prepending will ensure that the in-memory unit database is the last item on the unit database stack. Further, the in-memory unit database needs to be able to shadow units from earlier unit databases in the unit database stack. Moreover, a `-clear-package-db` would remove the in-memory database if it weren't the last item on the stack. Closes #27835 (cherry picked from commit f1cb08bee1ad6ae5b23b162a7e56280ab316c0f5) - - - - - 283256df by Kazu Yamamoto at 2026-11-09T13:50:52+05:30 Do not leave standard file descriptors free at startup (#24450) A process may be started with stdout closed -- `prog >&-` from a shell does exactly that. Nothing then reserves descriptor 1, and open(), pipe() and socket() hand out the lowest free descriptor, so the next descriptor the runtime creates for itself takes it: the ticker's pipe, or a capability's IO manager control pipe. 'GHC.Internal.IO.StdHandles.stdout' is a CAF, built the first time the program writes to stdout, which is long after that has happened. It builds a 'Handle' over descriptor 1, which now belongs to the runtime, and nothing reports an error because the descriptor is perfectly good. The program then writes its output into the runtime's own plumbing. What that looks like from the outside is a hang. The descriptor the Handle has taken over is the read end of a pipe, so poll() for POLLOUT on it never says yes and epoll_ctl() accepts a registration for it; the thread waiting to write blocks for ever. Closing the Handle at exit closes the runtime's descriptor, which is worse: the ticker then fails on every tick. 'hs_init_ghc' now opens /dev/null onto whichever of descriptors 0, 1 and 2 are closed, before the runtime creates any descriptor of its own. Each is opened for the access that descriptor would normally have, read-only for 0 and write-only for 1 and 2, so that writing to 'stdin' or reading from 'stdout' still fails rather than quietly succeeding against /dev/null. See Note [Standard file descriptors must be open]. Moving only the descriptors the runtime opens would not do: the first file the program itself opened would land on the free number instead. The fix has to leave no free number. A program run this way therefore finds stdout connected to /dev/null rather than failing with EBADF on the first write, which is what such a program would get from most other language runtimes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> (cherry picked from commit 8d49ed42d8ec1ad92737fa338571aad9fe538380) - - - - - 89c1870b by Zubin Duggal at 2026-11-09T13:50:52+05:30 DmdAnal: Make AbsDmd neutral in maxDmd fixes #27845 (cherry picked from commit f76464cff4a9b55bb01e612bffe0dd866a9982e3) - - - - - 6e420799 by Facundo Domínguez at 2026-11-09T13:50:52+05:30 Propagate annotations to simple interfaces This allows annotations to be visible to plugins when run by haddock. The LiquidHaskell plugin needs the annotations, in particular. Fixes #26761 (cherry picked from commit d538cac9aab579eb9e2db60512427b2c2341fe7a) - - - - - 5b1c7bc2 by meooow25 at 2026-11-09T13:50:52+05:30 Bump containers submodule to 0.8.1 And fix affected tests. * T4086a: containers depends on template-haskell-lift now instead of template-haskell. * T22611: Updated to be less dependent on containers internals. (cherry picked from commit 32c4f4ab2bcb2ef8249f83bf13760a0657ba3bce) - - - - - 2d1f73a8 by sheaf at 2026-11-09T13:50:52+05:30 Take into account ifKind in freeNamesIfDecl Commit 3c2f4bb4 added the 'ifKind' field to various constructors of 'IfaceDecl', which preserves the original kind (before type synonym expansion) for better error messages. However, that commit forgot to update 'freeNamesIfDecl' correspondingly. This could result in a "urk! lookup local fingerpring" crash when e.g. a type's kind uses a type synonym defined later, as we failed to add a dependency on the type synonym during dependency analysis. Fixes #27916 (cherry picked from commit e7cacf59b891f999708cf7c7f7412de058bb8913) - - - - - ebd1a7da by Simon Peyton Jones at 2026-11-09T14:17:47+05:30 Refactor fundeps again This MR fixes #27828; there was a bad scoping error in `trim_qtvs`. The main changes are * Refactor `trim_qtvs` completely to eliminate the bug. * Remove a redundant `apartnessCheck` from `mkTopOpenFamEqFDs`. * Lots of improvements to the Notes in FunDeps.hs I also did a couple of pure refactors: * I realised that we were carefully caching `cab_incomps` in each `CoAxBranch`, to make it more efficient to reduce a type family application, but we were not doing the same thing when computing relevance for functional dependencies; see Note [Relevance] in GHC.Tc.Solver.FunDeps. So I added `cab_overlaps`, which is now used in `noEarlierMatch`. * Use a proper data types, `AmIUnifying` and `OuterKindsFlag`, for two previously-Boolean arguments to `tc_unify_tys`. This is a pure refactor. (cherry picked from commit 836ec50a2bda086d73657ea291fdd51176fac335) - - - - - 2f9c671a by Simon Peyton Jones at 2026-11-09T14:34:55+05:30 Line up simpleUnifyCheck and check_ty_eq_rhs Even after #26543 was allegedly fixed, the original repo case in the Description continued to fail. The reason was that the QuickLook unifier, `qlUnify`, used `simpleUnifyCheck` for checking unification invariants; and `simpleUnifyCheck` conservatively rejected any RHS with a coercion hole in it. The upshot was that QuickLook was not as clever as it should be, wrongly failing to do an impredicative instantiation. Interestingly `check_ty_eq_rhs`, which does the same job during constraint solving, was more liberal: it just looked at the free vars of the coercion, and allowed coercion holes. This MR lines them up, adding some careful notes. See Note [simpleUnifyCheck] Note [Occurs check and coercions] Note [Unification preconditions] esp (COERCIONS) Things are better than before, but I am still uncomfortable about the possibilty that a hole might be filled with a coercion that mentions the LHS type variable; for now I have left this discomfort documented in Note [Occurs check and coercions]. Main changes * `qlUnify` now only unifies /instantiation variables/ not regular unification variables. This makes QuickLook more predictable. See (UQL6) in Note [QuickLook unification]. * `qlUnify` no longer needs to call `simpleUnifyCheck`, so we can get rid of `UC_QuickLook` and its code in `simpleUnifyCheck`. * I found I could get rid of `mkOccFolders` in favour of `anyFreeVarsOfType`. Hooray. * Improve documentation of CycleBreakerTv, and rename it to GivenCycleBreakerTv because they are only uesd for Givens! * I accepted a 9% worsening in compile time allocation on T5030 because the newly-consistent story triggered #27934. Other changes * I refactored `atvFolder` so that it pairs the "interesting-var" function with the in-scope set, to avoid building a closure with a free variable. Now we get nice tight loops for `anyFreeVarsOfType` and friends. See Note [Any-free-var folder]. Metric Increase: T5030 (cherry picked from commit 97adaf89b09da0fa211f2fd264d8bdaaebff9061) - - - - - fd02ef5b by Simon Peyton Jones at 2026-11-09T14:35:04+05:30 Fix order-dependence in QuickLook Ticket #27917 pointed out that QuickLook was order-dependent -- very bad! The solution is in `qlUnify`: spot when we are unifying a type with a definite monotype, and then monomorphise any free instantiation variables of that type. See (UQL8) and (UQL9) in Note [QuickLook unification]. (cherry picked from commit 5f7b304755aab1bcf0223517c175bbc185512fa2) - - - - - b039838e by Simon Peyton Jones at 2026-11-09T14:35:34+05:30 Add some comments about RuntimeUnk This commit just adds comments explaining why we don't need to worry about RuntimeUnkTv in the constraint solver. It also tightens up docmentation of earlier (overlapping) commits in this MR. (cherry picked from commit c391c70c7da0465bbde3489cf9376cec0ca08ab2) - - - - - 6732ea66 by Hannes Siebenhandl at 2026-11-09T14:53:59+05:30 Fix #27836, normalise unit database path in ExternalUnitDatabases Add a regression test, proofing that all variations: - local-unit-db/my-test.conf - ./local-unit-db/my-test.conf - ./local-unit-db/my-test.conf/ are parsed only once. (cherry picked from commit 3a72b8a28a281008d6904210107b95c063203646) - - - - - 17ddfc0f by Andreas Klebinger at 2026-11-09T14:54:20+05:30 Fix a few tag inference bugs. * Treat bottoming functions and nullary join points as functions. * When generating bytecode don't rely on imported tag sigs. Fixes #27831, #27841 and #27842. (cherry picked from commit 6bbca56943ef68ba32520bcf8712a8faf9021ed6) - - - - - 9935189a by Simon Jakobi at 2026-11-09T14:54:20+05:30 Cmm: keep the CBE substitution idempotent When blocks are merged over multiple rounds during common block elimination, a block that won a merge in an earlier round can still lose a merge in a later round. The substitution map (Subst) used to record this as a chain: the earlier loser mapped to a block that was itself eliminated. In PLT terminology, the substitution became *non-idempotent*. Applying such a substitution with a single lookup left edges to unreachable blocks in the Cmm graph, eventually leading to a setInfoTableStackMap panic (#27368). With this patch, each round's fresh substitutions are applied to the old ones as they are added (extendSubst), so every eliminated block maps directly to its final replacement and the substitution stays idempotent. Fixes #27368. Assisted-by: Claude Fable 5.1 (cherry picked from commit 14656fd45e4d1cef388587dd73ee4edb037c8c4a) - - - - - d6514533 by Evgeny Malyshev at 2026-11-09T14:55:06+05:30 hadrian: Include transitive dependencies in Haddock builds Haddock needs indirect dependency interfaces to resolve references to definitions outside a package's direct dependencies. Expose Cabal's configured dependency closure through ContextData and use it alongside the direct list, preserving direct-interface precedence. Bump Shake's cache version for the serialized oracle change. Add a Hadrian selftest requiring template-haskell's indirect ghc-prim interface. Fixes #25850. Fixes #27786. Assisted-By: OpenAI Codex Metric Increase: haddock.Cabal (cherry picked from commit 92848e6186123d5820bcfb2f4ef5059e471be963) - - - - - 5d6eee2c by Zubin Duggal at 2026-11-09T14:55:34+05:30 WinIO: Don't confuse Win32 errors and NTSTATUS codes WinIO misinterpreted NTSTATUS codes as Win32 errors, and had some ad hoc logic to deal with this. However, this logic was incomplete and resulted in the mishandling of results of certain I/O operations (see testcase). Now the `ErrCode` argument in `CompletionCallback` is always the Win32 error code, and we convert the NTSTATUS using RtlNtStatusToDosError. Also when an overlapped/async operation such as ReadFile fails immediately, with a Win32 error such as ERROR_BROKEN_PIPE, we don't get a further completion notification, so we never recorded the failure. This worked by coincidence earlier, because `STATUS_PENDING` happened to have the same numerical code as `ERROR_NO_MORE_ITEMS`, but it doesn't now that we translate `STATUS_PENDING` into the correct Win32 error code (`ERROR_IO_PENDING`). Fix this by using the Win32 error value we obtained when an operation returns `STATUS_PENDING`. Fixes #27971 (cherry picked from commit 5e8ae81beb5fcb0b30842f8602f062dc99bfa638) - - - - - b973896d by Luite Stegeman at 2026-11-09T14:56:09+05:30 rts: tombstone Weak# copies that lose an evacuation race (#23160) Mark the losing copy of a Weak# during an evacuation race in parallel GC with stg_DEAD_WEAK_info. This ensures that the nonmoving GC doesn't follow dangling pointers, leading to crashes. Fixes #23160 (cherry picked from commit 13d38047f6ef2cba401867f031c9ee5241b0931c) - - - - - 1e583ab4 by Zubin Duggal at 2026-11-09T14:56:23+05:30 ghci: Drop GHCi's exception context when rethrowing in ghc -e Fixes #27847. (cherry picked from commit 6334732840eaac8bc5beb24267f1f10247349e1d) - - - - - f25454c7 by Zubin Duggal at 2026-11-09T14:56:23+05:30 base: Preserve exception context in modifyIOError Fixes #27851. CLC proposal: https://github.com/haskell/core-libraries-committee/issues/446 (cherry picked from commit a85fef3fe4b3058cb4dc46a49cb5fe43f9dfc5e5) - - - - - 54e111e8 by Zubin Duggal at 2026-11-09T14:57:28+05:30 base: Preserve exception context in mapException Fixes #27851. CLC proposal: https://github.com/haskell/core-libraries-committee/issues/446 (cherry picked from commit 1d60b591a307c372a6ee85620aaacfac896013cd) - - - - - 752751c9 by Zubin Duggal at 2026-11-09T14:57:29+05:30 base: Preserve exception context when rethrowing exceptions in Handle reads Fixes #27875. CLC proposal: https://github.com/haskell/core-libraries-committee/issues/447 (cherry picked from commit 3c029a1b0750b0fb0fa67ba9a27c5c0f2ccc472b) - - - - - 63d4b131 by Zubin Duggal at 2026-11-09T14:57:29+05:30 base: Preserve exception context when rethrowing exceptions in hClose Fixes #27875. CLC proposal: https://github.com/haskell/core-libraries-committee/issues/447 (cherry picked from commit ab2b317ad6808f8f955f5249aff5b186697fccc3) - - - - - 25f62b28 by Zubin Duggal at 2026-11-09T14:57:29+05:30 base: Preserve exception context when rethrowing exceptions in Windows openFile Fixes #27875. CLC proposal: https://github.com/haskell/core-libraries-committee/issues/447 (cherry picked from commit f5abf277c041f652541d2ad06f6bc3b5f947f715) - - - - - b0024432 by Zubin Duggal at 2026-11-09T14:58:23+05:30 base: Preserve exception context when rethrowing exceptions in executablePath Fixes #27875. CLC proposal: https://github.com/haskell/core-libraries-committee/issues/447 (cherry picked from commit d842c67282c6719534e11cdf2c14863a3af245d8) - - - - - 1a1cf65e by Simon Peyton Jones at 2026-11-09T15:01:01+05:30 Simplify a tc-trace which could crash the compiler The trace formatted an error message, which prematurely read the ExpType in a FunResCtxt. Solution: don't put call the error message formatting when tc-tracing. (cherry picked from commit c5a8bb9fc76688ef00d9752c4f2f1425db67f109) - - - - - 72d2e661 by Simon Peyton Jones at 2026-11-09T15:01:01+05:30 Tiny comment change to uniqAway (cherry picked from commit ab49b1d2e08b050c6e07688605306f419532712f) - - - - - 50d379f1 by Simon Peyton Jones at 2026-11-09T15:04:09+05:30 Make niFixSubst idempotent I discovered (when fixing #27994) that `niFixSubst` didn't actually generate an idempotent subsitution despite its claims. It could return a substitution that mentions domain variables on in its range, when those variables are hidden inside the kind of a type variable occurrence. As a result it can generate ill-kinded types. Boo! The fix is simple, and uses deep substitution. See Note [Finding the substitution fixpoint] I don't think it actually /caused/ any bugs, so there is no regression test. (cherry picked from commit 6efe4ba395b7c821d1a897642cd2cf43df41d539) - - - - - f251c8bf by Simon Peyton Jones at 2026-11-09T15:04:16+05:30 Fix a nasty bug in fundeps This MR fixes #27994, which turned out to be very tricky. See Note [Exploiting closed type famililes], especially (CF7). I was ending up with TyVars (not TcTyVars) in the solver, because the substitution computed in `getRelevantBranches` mixed the two. The code was just too clever. I ended up simplifying it quite a bit. For /closed/ families we no longer call `trimQtvs` (was `trim_qtvs`). Open families still do use `trimQtvs`. See Note [trimQTvs] This patch also fixes one other buglet in the same code. * Over-saturated type families were being mis-handled. See the new use of `saturatedFamApp_maybe`. (cherry picked from commit 3b60ae7e105f6450243451a8e8b06b4474d34fdb) - - - - - 605465f8 by sheaf at 2026-11-09T15:30:22+05:30 mightBeFunTy: hotfix for #27979 ce01ccb6 refactored 'GHC.Types.RepType.mightBeFunTy' to look through unary classes. That change introduced the helper function 'unwrap_type' which was supposed to always return an unwrapped type, but its fallback equation mistakenly returned the original type. This caused the subsequent 'tyConAppTyCon_maybe' to fail in cases where it should succeed (e.g. looking through foralls). In this commit, we move all the unary class unwrapping logic into 'unwrapType' where it belonged from the start, and update the documentation of 'unwrapType' to better explain what it should be used for (#26695). Fixes #27979 #26695 ------------------------- Metric Increase: T5642 ------------------------- (cherry picked from commit bc6c0db64a4a3e0f217c2db94cbdc0672c349b96) - - - - - af90ee76 by Luite Stegeman at 2026-11-09T15:30:22+05:30 rts: move stack check to the start of the stg_unpack_cstring thunks fixes a deadlock see #27272 (cherry picked from commit 9af64305adb72f31a68f10751956a8277f321568) - - - - - 85984b05 by Simon Jakobi at 2026-11-09T15:30:22+05:30 Cmm: exclude the entry block from common block elimination a1d8139054c had fixed #27722 only partially, because it didn't prevent elimination of the entry block in later rounds, where the entry block is no longer guaranteed to come first. To close this loophole, we exclude the entry block from the CBE merge logic. See Note [Retain entry block during common block elimination] for details. This also deletes a misleading comment regarding unreachable blocks: the control-flow optimiser doesn't actually guarantee that no unreachable blocks reach CBE. Fixes #27722. Assisted-by: Claude Fable 5.1 (cherry picked from commit a2208b21fcb5b417e7dd535295eb823eb4c3527f) - - - - - 71baaea6 by sheaf at 2026-11-09T15:30:22+05:30 Avoid panic in 'solveImplicationsUsingUnsatGiven' Commit 52a4d1da refactored this code to use 'setWantedDict' which panics for equality constraints. This commit fixes that by explicitly handling HoleDest. Fixes #28081 (cherry picked from commit 20334e1d1fe9ffc646bf521af232f8558ce3305d) - - - - - 596278c2 by Mika Tammi at 2026-11-09T15:30:22+05:30 hadrian: no target libffi for cross stage0 ghci Since b2721819f3, hadrian passes configure's libffi dirs, which are the target's, to ghci at every stage. Stage0 of a cross build is built for the build platform, so linking the stage1 compiler can pick the target's libffi. Master avoids this since 23c9b6c392. Fixes #28053. Assisted-by: Claude Code (Claude Opus 5.5) Signed-off-by: Mika Tammi <mikatammi@gmail.com> (cherry picked from commit dc0d401af20d497f80f5f08bfb84ec94362028a8) - - - - - 2d6f61a7 by Zubin Duggal at 2026-11-09T19:43:13+05:30 release notes: add missing entries to the included libraries section Fixes #28065 - - - - - cfdfd2e1 by Zubin Duggal at 2026-11-09T19:50:43+05:30 hadrian: build with Cabal 3.18 Fixes #27823 - - - - - 6ac698a1 by Zubin Duggal at 2026-11-09T19:50:43+05:30 Prepare 10.0.1-alpha2 Metric Increase: T24984 Metric Decrease: T12707 - - - - - 506cc46d by Zubin Duggal at 2026-11-12T09:57:42+05:30 Accept metric decrease Metric Decrease: LinkableUsage01 - - - - - 221 changed files: - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - compiler/GHC/ByteCode/Binary.hs - compiler/GHC/Cmm/CommonBlockElim.hs - compiler/GHC/Cmm/Pipeline.hs - compiler/GHC/Core/Coercion.hs - compiler/GHC/Core/Coercion/Axiom.hs - compiler/GHC/Core/FVs.hs - compiler/GHC/Core/FamInstEnv.hs - compiler/GHC/Core/Predicate.hs - compiler/GHC/Core/TyCo/FVs.hs - compiler/GHC/Core/TyCo/Subst.hs - compiler/GHC/Core/Unify.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/OsPath.hs - compiler/GHC/Data/Unboxed.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Env.hs - compiler/GHC/HsToCore/Pmc/Solver.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Syntax.hs - compiler/GHC/Iface/Tidy.hs - compiler/GHC/IfaceToCore.hs - compiler/GHC/Runtime/Heap/Inspect.hs - compiler/GHC/Stg/EnforceEpt.hs - compiler/GHC/Stg/EnforceEpt/Rewrite.hs - compiler/GHC/Stg/EnforceEpt/TagSig.hs - compiler/GHC/Stg/EnforceEpt/Types.hs - compiler/GHC/SysTools/Terminal.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Instance/Family.hs - compiler/GHC/Tc/Instance/FunDeps.hs - compiler/GHC/Tc/Solver/Default.hs - compiler/GHC/Tc/Solver/Equality.hs - compiler/GHC/Tc/Solver/FunDeps.hs - compiler/GHC/Tc/Solver/InertSet.hs - compiler/GHC/Tc/Solver/Monad.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/Tc/Utils/TcMType.hs - compiler/GHC/Tc/Utils/TcType.hs - compiler/GHC/Tc/Utils/Unify.hs - compiler/GHC/Types/Demand.hs - compiler/GHC/Types/RepType.hs - compiler/GHC/Types/Var/Env.hs - compiler/GHC/Types/Var/FV.hs - compiler/GHC/Unit/External/Database.hs - compiler/GHC/Unit/External/Wired.hs - compiler/GHC/Unit/State.hs - compiler/GHC/Utils/Binary.hs - configure.ac - distrib/configure.ac.in - docs/users_guide/10.0.1-notes.rst - ghc/GHCi/UI.hs - ghc/GHCi/UI/Monad.hs - hadrian/bindist/Makefile - hadrian/cabal.project - hadrian/cfg/default.host.target.in - hadrian/cfg/default.target.in - hadrian/hadrian.cabal - hadrian/src/Flavour.hs - hadrian/src/Hadrian/Haskell/Cabal/Parse.hs - hadrian/src/Hadrian/Haskell/Cabal/Type.hs - hadrian/src/Hadrian/Oracles/Cabal/Rules.hs - hadrian/src/Main.hs - hadrian/src/Rules/Documentation.hs - hadrian/src/Rules/Selftest.hs - hadrian/src/Settings/Packages.hs - libraries/base/changelog.md - + libraries/base/tests/IO/T27971.hs - + libraries/base/tests/IO/T27971.stdout - libraries/base/tests/IO/all.T - libraries/containers - libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs - libraries/ghc-internal/src/GHC/Internal/Event/Windows.hsc - libraries/ghc-internal/src/GHC/Internal/Event/Windows/FFI.hsc - libraries/ghc-internal/src/GHC/Internal/IO/Handle/Internals.hs - libraries/ghc-internal/src/GHC/Internal/IO/Handle/Text.hs - libraries/ghc-internal/src/GHC/Internal/IO/Handle/Windows.hs - libraries/ghc-internal/src/GHC/Internal/IO/Windows/Handle.hsc - libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc - libraries/ghc-internal/src/GHC/Internal/System/IO/Error.hs - m4/find_llvm_prog.m4 - m4/fp_setup_windows_toolchain.m4 - m4/ghc_toolchain.m4 - m4/prep_target_file.m4 - m4/subst_tooldir.m4 - rts/Capability.c - rts/RtsStartup.c - rts/StgStdThunks.cmm - rts/include/rts/NonMoving.h - rts/include/stg/MiscClosures.h - rts/include/stg/Prim.h - rts/linker/elf_reloc_riscv64.c - rts/prim/bitrev.c - rts/prim/bswap.c - rts/sm/Evac.c - + testsuite/tests/backpack/should_compile/T27835.bkp - + testsuite/tests/backpack/should_compile/T27835.stderr - testsuite/tests/backpack/should_compile/all.T - + testsuite/tests/bytecode/T27842.hs - + testsuite/tests/bytecode/T27842.stdout - + testsuite/tests/bytecode/T27842A.hs - + testsuite/tests/bytecode/T27842N.hs - testsuite/tests/bytecode/all.T - + testsuite/tests/cmm/should_run/T27722.hs - + testsuite/tests/cmm/should_run/T27722_cmm.cmm - testsuite/tests/cmm/should_run/all.T - + testsuite/tests/codeGen/should_compile/T27368.hs - + testsuite/tests/codeGen/should_compile/T27979.hs - + testsuite/tests/codeGen/should_compile/T27979.stderr - testsuite/tests/codeGen/should_compile/all.T - testsuite/tests/count-deps/CountDepsAst.stdout - testsuite/tests/count-deps/CountDepsParser.stdout - testsuite/tests/default/default-fail05.stderr - + testsuite/tests/dmdanal/should_run/T27845.hs - + testsuite/tests/dmdanal/should_run/T27845.stdout - + testsuite/tests/dmdanal/should_run/T27845_Lib.hs - + testsuite/tests/dmdanal/should_run/T27845b.hs - + testsuite/tests/dmdanal/should_run/T27845b.stdout - + testsuite/tests/dmdanal/should_run/T27845b_Lib.hs - testsuite/tests/dmdanal/should_run/all.T - + testsuite/tests/driver/T27836/A.hs - + testsuite/tests/driver/T27836/B.hs - + testsuite/tests/driver/T27836/C.hs - + testsuite/tests/driver/T27836/Makefile - + testsuite/tests/driver/T27836/T27836.stdout - + testsuite/tests/driver/T27836/all.T - + testsuite/tests/driver/T27836/unitA - + testsuite/tests/driver/T27836/unitB - + testsuite/tests/driver/T27836/unitC - + testsuite/tests/exceptions/T27851.hs - + testsuite/tests/exceptions/T27851.stderr - + testsuite/tests/exceptions/T27851b.hs - + testsuite/tests/exceptions/T27851b.stderr - + testsuite/tests/exceptions/T27851c.hs - + testsuite/tests/exceptions/T27851c.stdout - + testsuite/tests/exceptions/T27851d.hs - + testsuite/tests/exceptions/T27851d.stdout - + testsuite/tests/exceptions/T27851d.stdout-javascript-unknown-ghcjs - testsuite/tests/exceptions/all.T - testsuite/tests/ghc-e/should_fail/T18441fail7.stderr - testsuite/tests/ghc-e/should_run/ghc-e005.stderr - testsuite/tests/ghci.debugger/scripts/T14628.stderr - + testsuite/tests/ghci/prog-mhu008/Makefile - + testsuite/tests/ghci/prog-mhu008/a/M.hs - + testsuite/tests/ghci/prog-mhu008/all.T - + testsuite/tests/ghci/prog-mhu008/b/M.hs - + testsuite/tests/ghci/prog-mhu008/prog-mhu008.script - + testsuite/tests/ghci/prog-mhu008/prog-mhu008.stdout - + testsuite/tests/ghci/prog-mhu008/unitA - + testsuite/tests/ghci/prog-mhu008/unitB - + testsuite/tests/ghci/scripts/T27641.script - + testsuite/tests/ghci/scripts/T27641.stderr - + testsuite/tests/ghci/scripts/T27641.stdout - + testsuite/tests/ghci/scripts/T27834.hs - + testsuite/tests/ghci/scripts/T27834.script - + testsuite/tests/ghci/scripts/T27834.stdout - testsuite/tests/ghci/scripts/all.T - + testsuite/tests/impredicative/T27917.hs - testsuite/tests/impredicative/all.T - + testsuite/tests/indexed-types/should_compile/T27828.hs - + testsuite/tests/indexed-types/should_compile/T27828a.hs - + testsuite/tests/indexed-types/should_compile/T27828b.hs - testsuite/tests/indexed-types/should_compile/all.T - testsuite/tests/indexed-types/should_fail/T1897b.stderr - testsuite/tests/package/T4806a.stderr - testsuite/tests/package/all.T - testsuite/tests/perf/compiler/all.T - + testsuite/tests/plugins/T26761.hs - + testsuite/tests/plugins/T26761.stderr - + testsuite/tests/plugins/T26761Plugin.hs - + testsuite/tests/plugins/T26761a.hs - testsuite/tests/plugins/all.T - + testsuite/tests/primops/should_run/T27299.hs - + testsuite/tests/primops/should_run/T27299.stdout - testsuite/tests/primops/should_run/all.T - + testsuite/tests/rts/T23160.hs - + testsuite/tests/rts/T23160.stdout - + testsuite/tests/rts/T24450.hs - + testsuite/tests/rts/T24450.stderr - + testsuite/tests/rts/T27272.hs - + testsuite/tests/rts/T27272_gen.py - testsuite/tests/rts/all.T - testsuite/tests/simplCore/should_compile/T22611.hs - testsuite/tests/simplCore/should_compile/T22611.stderr - + testsuite/tests/simplCore/should_compile/T22611a.hs - testsuite/tests/simplCore/should_compile/all.T - testsuite/tests/simplStg/should_compile/all.T - + testsuite/tests/simplStg/should_compile/inferTags005.hs - + testsuite/tests/simplStg/should_compile/inferTags005.stderr - + testsuite/tests/simplStg/should_compile/inferTags006.hs - + testsuite/tests/simplStg/should_compile/inferTags006.stderr - + testsuite/tests/simplStg/should_run/InferTags007_A.hs - + testsuite/tests/simplStg/should_run/T27831.hs - + testsuite/tests/simplStg/should_run/T27831.stdout - + testsuite/tests/simplStg/should_run/T27857.hs - + testsuite/tests/simplStg/should_run/T27857.stdout - testsuite/tests/simplStg/should_run/all.T - + testsuite/tests/simplStg/should_run/inferTags007.hs - + testsuite/tests/simplStg/should_run/inferTags007.stdout - testsuite/tests/typecheck/should_compile/LocalGivenEqs.hs - + testsuite/tests/typecheck/should_compile/T26543_orig.hs - + testsuite/tests/typecheck/should_compile/T27916.hs - + testsuite/tests/typecheck/should_compile/T27994.hs - + testsuite/tests/typecheck/should_compile/T27994a.hs - + testsuite/tests/typecheck/should_compile/T27994b.hs - testsuite/tests/typecheck/should_compile/all.T - testsuite/tests/typecheck/should_fail/T22707.stderr - + testsuite/tests/typecheck/should_fail/T26543a.hs - + testsuite/tests/typecheck/should_fail/T26543a.stderr - testsuite/tests/typecheck/should_fail/all.T - + testsuite/tests/unsatisfiable/T28081.hs - testsuite/tests/unsatisfiable/all.T - utils/ghc-toolchain/exe/Main.hs - utils/ghc-toolchain/src/GHC/Toolchain/Target.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2994ef05eac4650923c4beb5e6707e9... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2994ef05eac4650923c4beb5e6707e9... 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)
-
Zubin (@wz1000)