Zubin pushed to branch wip/9.10.3-backports at Glasgow Haskell Compiler / GHC Commits: 1d7e7535 by Ben Gamari at 2025-07-23T20:57:32+05:30 base: Expose Backtraces constructor and fields This was specified in the proposal (CLC #199) yet somehow didn't make it into the implementation. Fixes #26049. (cherry picked from commit 17db44c5b32fff82ea988fa4f1a233d1a27bdf57) - - - - - ab978c0b by ARATA Mizuki at 2025-07-23T20:57:32+05:30 x86 NCG: Fix code generation of bswap64 on i386 Co-authored-by: sheaf <sam.derbyshire@gmail.com> Fix #25601 (cherry picked from commit bfa6b70f27dc2ce7fc890ec71103c40f66497c77) - - - - - e712cfd4 by Cheng Shao at 2025-07-23T20:57:32+05:30 testsuite: add T26120 marked as broken (cherry picked from commit 44b8cee2d5c114b238898ce4ee7b44ecaa0bf491) - - - - - 8b3a3f0b by Cheng Shao at 2025-07-23T20:57:32+05:30 compiler: fix GHC.SysTools.Ar archive member size writing logic This patch fixes a long-standing bug in `GHC.SysTools.Ar` that emits the wrong archive member size in each archive header. It should encode the exact length of the member payload, excluding any padding byte, otherwise malformed archive that extracts a broken object with an extra trailing byte could be created. Apart from the in-tree `T26120` test, I've also created an out-of-tree testsuite at https://github.com/TerrorJack/ghc-ar-quickcheck that contains QuickCheck roundtrip tests for `GHC.SysTools.Ar`. With this fix, simple roundtrip tests and `writeGNUAr`/GNU `ar` roundtrip test passes. There might be more bugs lurking in here, but this patch is still a critical bugfix already. Fixes #26120 #22586. Co-authored-by: Codex <codex@openai.com> (cherry picked from commit 894a04f3a82dd39ecef71619e2032c4dfead556e) - - - - - f760b936 by Vladislav Zavialov at 2025-07-23T20:57:32+05:30 Error message with EmptyCase and RequiredTypeArguments (#25004) Fix a panic triggered by a combination of \case{} and forall t -> ghci> let f :: forall (xs :: Type) -> (); f = \case {} panic! (the 'impossible' happened) GHC version 9.10.1: Util: only The new error message looks like this: ghci> let f :: forall (xs :: Type) -> (); f = \case {} <interactive>:5:41: error: [GHC-48010] • Empty list of alternatives in \case expression checked against a forall-type: forall xs -> ... This is achieved as follows: * A new data type, BadEmptyCaseReason, is now used to describe why an empty case has been rejected. Used in TcRnEmptyCase. * HsMatchContextRn is passed to tcMatches, so that the type checker can attach the syntactic context to the error message. * tcMatches now rejects type arguments if the list of alternatives is empty. This is what fixes the bug. (cherry picked from commit cce869ea2439bb16c284ce7ed71a173d54a8c9ad) - - - - - 57a337c1 by Vladislav Zavialov at 2025-07-23T20:57:32+05:30 Fix EmptyCase panic in tcMatches (#25960) Due to faulty reasoning in Note [Pattern types for EmptyCase], tcMatches was too keen to panic. * Old (incorrect) assumption: pat_tys is a singleton list. This does not hold when \case{} is checked against a function type preceded by invisible forall. See the new T25960 test case. * New (hopefully correct) assumption: vis_pat_tys is a singleton list. This should follow from: checkArgCounts :: MatchGroup GhcRn ... -> TcM VisArity checkArgCounts (MG { mg_alts = L _ [] }) = return 1 ... (cherry picked from commit b34890c7d4803041caff060391eec298e2b0a098) - - - - - f1883204 by Vladislav Zavialov at 2025-07-23T20:57:32+05:30 Take subordinate 'type' specifiers into account This patch fixes multiple bugs (#22581, #25983, #25984, #25991) in name resolution of subordinate import lists. Bug #22581 ---------- In subordinate import lists, the use of the `type` namespace specifier used to be ignored. For example, this import statement was incorrectly accepted: import Prelude (Bool(type True)) Now it results in an error message: <interactive>:2:17: error: [GHC-51433] In the import of ‘Prelude’: a data type called ‘Bool’ is exported, but its subordinate item ‘True’ is not in the type namespace. Bug #25983 ---------- In subordinate import lists within a `hiding` clause, non-existent items led to a poor warning message with -Wdodgy-imports. Consider: import Prelude hiding (Bool(X)) The warning message for this import statement used to misreport the cause of the problem: <interactive>:3:24: warning: [GHC-56449] [-Wdodgy-imports] In the import of ‘Prelude’: an item called ‘Bool’ is exported, but it is a type. Now the warning message is correct: <interactive>:2:24: warning: [GHC-10237] [-Wdodgy-imports] In the import of ‘Prelude’: a data type called ‘Bool’ is exported, but it does not export any constructors or record fields called ‘X’. Bug #25984 ---------- In subordinate import lists within a `hiding` clause, non-existent items resulted in the entire import declaration being discarded. For example, this program was incorrectly accepted: import Prelude hiding (Bool(True,X)) t = True Now it results in an error message: <interactive>:2:5: error: [GHC-88464] Data constructor not in scope: True Bug #25991 ---------- In subordinate import lists, it was not possible to refer to a class method if there was an associated type of the same name: module M_helper where class C a b where type a # b (#) :: a -> b -> () module M where import M_helper (C((#))) This import declaration failed with: M.hs:2:28: error: [GHC-10237] In the import of ‘M_helper’: an item called ‘C’ is exported, but it does not export any children (constructors, class methods or field names) called ‘#’. Now it is accepted. Summary ------- The changes required to fix these bugs are almost entirely confined to GHC.Rename.Names. Other than that, there is a new error constructor BadImportNonTypeSubordinates with error code [GHC-51433]. Test cases: T22581a T22581b T22581c T22581d T25983a T25983b T25983c T25983d T25983e T25983f T25983g T25984a T25984b T25991a T25991b1 T25991b2 (cherry picked from commit 282df90570fa9c777c914ae543fea291f7158482) - - - - - c9096e26 by Zubin Duggal at 2025-07-23T20:57:32+05:30 fetch_gitlab: Ensure we copy users_guide.pdf and Haddock.pdf to the release docs directory Fixes #24093 (cherry picked from commit 48cf32dbd2cf52e1db7ee68bc79a5511ff52a2a6) - - - - - 7e1b6e02 by Ben Gamari at 2025-07-23T20:57:32+05:30 configure: Drop probing of ld.gold As noted in #25716, `gold` has been dropped from binutils-2.44. Fixes #25716. Metric Increase: size_hello_artifact_gzip size_hello_unicode_gzip ghc_prim_so (cherry picked from commit c635f164cb62bcb3f34166adc24e5a9437415311) - - - - - f16147da by Ben Gamari at 2025-07-23T20:57:32+05:30 testsuite/recomp015: Ignore stderr This is necessary since ld.bfd complains that we don't have a .note.GNU-stack section, potentially resulting in an executable stack. (cherry picked from commit 637bb53825b9414f7c7dbed4cc3e5cc1ed4d2329) - - - - - de602ca5 by Andreas Klebinger at 2025-07-23T20:57:32+05:30 Add since tag and more docs for do-clever-arg-eta-expansion Fixes #26113 (cherry picked from commit 699deef58bf89ef2f111b35f72d303a3624d219d) - - - - - a85ce260 by Zubin Duggal at 2025-07-23T20:57:32+05:30 release: copy index.html from correct directory (cherry picked from commit cbfd0829cd61928976c9eb17ba4af18272466063) (cherry picked from commit ea3f7fd5f702d41077fff0a749b9c443d54e4844) - - - - - 980e5ca5 by Tamar Christina at 2025-07-23T20:57:32+05:30 rts: Handle API set symbol versioning conflicts (cherry picked from commit 63373b95331f07c16e3eef511379fe3bed484839) - - - - - fcf1abae by Tamar Christina at 2025-07-23T20:57:32+05:30 rts: Implement WEAK EXTERNAL undef redirection by target symbol name (cherry picked from commit e3bfc62416dd738bfd1a4464f0a622c9d0b7c393) - - - - - 28b4865e by Zubin Duggal at 2025-07-23T20:57:32+05:30 bump deepseq to 1.5.2.0 - - - - - 09ac882b by Zubin Duggal at 2025-07-23T20:57:32+05:30 bump os-string to 2.0.7 - - - - - 97f014f5 by Zubin Duggal at 2025-07-23T20:57:32+05:30 bump process to 1.6.26.1 - - - - - c746f850 by Zubin Duggal at 2025-07-23T20:57:32+05:30 bump unix to 2.8.7.0 - - - - - 08002328 by Jens Petersen at 2025-07-23T20:57:32+05:30 9.10 hadrian can build with Cabal-3.12.1 fixes #25605 (cherry picked from commit 07f17b6ed1bb0ba7134ee8dfd992036e97552c94) - - - - - 22538fff by sheaf at 2025-07-23T20:57:32+05:30 Don't cache solved [W] HasCallStack constraints This commit ensures we do not add solved Wanted constraints that mention HasCallStack or HasExceptionContext constraints to the set of solved Wanted dictionary constraints: caching them is invalid, because re-using such cached dictionaries means using an old call-stack instead of constructing a new one, as was reported in #25529. Fixes #25529. (cherry picked from commit 256ac29c8df4f17a1d50ea243408d506ebf395d6) - - - - - ef3533e2 by Zubin Duggal at 2025-07-23T20:57:32+05:30 In commit "Don't cache solved [W] HasCallStack constraints" (256ac29c8df4f17a1d50ea243408d506ebf395d6), we attempt to use `tryM` to avoid errors when looking up certain known-key names like CallStack while compiling ghc-prim and ghc-internal. Unfortunately, `tryM` doesn't catch module lookup errors. This manifests as a failure to build ghc-prim in `--make` mode on the GHC 9.10 branch. Instead, we explicitly avoid doing lookups when we are compiling ghc-prim or ghc-internal instead of relying on catching the exception. - - - - - 102 changed files: - .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/Core/Predicate.hs - compiler/GHC/Rename/Bind.hs - compiler/GHC/Rename/Names.hs - compiler/GHC/SysTools/Ar.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Errors/Types.hs - compiler/GHC/Tc/Gen/Arrow.hs - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Tc/Gen/Match.hs - compiler/GHC/Tc/Solver/Dict.hs - compiler/GHC/Tc/Solver/Monad.hs - compiler/GHC/Tc/Solver/Types.hs - compiler/GHC/Types/Error/Codes.hs - compiler/GHC/Utils/Outputable.hs - docs/users_guide/exts/explicit_namespaces.rst - docs/users_guide/using-optimisation.rst - hadrian/hadrian.cabal - hadrian/src/Context.hs - hadrian/src/Hadrian/Haskell/Cabal/Parse.hs - hadrian/src/Hadrian/Haskell/Cabal/Type.hs - hadrian/src/Rules/BinaryDist.hs - hadrian/src/Rules/CabalReinstall.hs - hadrian/src/Rules/Register.hs - hadrian/src/Rules/Rts.hs - hadrian/src/Settings/Builders/Ghc.hs - libraries/base/changelog.md - libraries/base/src/Control/Exception/Backtrace.hs - libraries/deepseq - libraries/os-string - libraries/process - libraries/unix - m4/find_ld.m4 - rts/linker/PEi386.c - + testsuite/tests/cmm/should_run/T25601.hs - + testsuite/tests/cmm/should_run/T25601.stdout - + testsuite/tests/cmm/should_run/T25601a.cmm - testsuite/tests/cmm/should_run/all.T - testsuite/tests/driver/recomp015/all.T - + testsuite/tests/ghc-api/T26120.hs - + testsuite/tests/ghc-api/T26120.stdout - testsuite/tests/ghc-api/all.T - 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/module/T21826.stderr - testsuite/tests/module/mod81.stderr - testsuite/tests/module/mod91.stderr - testsuite/tests/plugins/plugins10.stdout - testsuite/tests/plugins/static-plugins.stdout - + testsuite/tests/rename/should_compile/T22581c.hs - + testsuite/tests/rename/should_compile/T22581c_helper.hs - + testsuite/tests/rename/should_compile/T22581d.script - + testsuite/tests/rename/should_compile/T22581d.stdout - + testsuite/tests/rename/should_compile/T25983a.hs - + testsuite/tests/rename/should_compile/T25983a.stderr - + testsuite/tests/rename/should_compile/T25983b.hs - + testsuite/tests/rename/should_compile/T25983b.stderr - + testsuite/tests/rename/should_compile/T25983c.hs - + testsuite/tests/rename/should_compile/T25983c.stderr - + testsuite/tests/rename/should_compile/T25983d.hs - + testsuite/tests/rename/should_compile/T25983d.stderr - + testsuite/tests/rename/should_compile/T25983e.hs - + testsuite/tests/rename/should_compile/T25983e.stderr - + testsuite/tests/rename/should_compile/T25983f.hs - + testsuite/tests/rename/should_compile/T25983f.stderr - + testsuite/tests/rename/should_compile/T25983g.hs - + testsuite/tests/rename/should_compile/T25983g.stderr - + testsuite/tests/rename/should_compile/T25984a.hs - + testsuite/tests/rename/should_compile/T25984a.stderr - + testsuite/tests/rename/should_compile/T25984a_helper.hs - + testsuite/tests/rename/should_compile/T25991a.hs - + testsuite/tests/rename/should_compile/T25991a_helper.hs - testsuite/tests/rename/should_compile/all.T - + testsuite/tests/rename/should_fail/T22581a.hs - + testsuite/tests/rename/should_fail/T22581a.stderr - + testsuite/tests/rename/should_fail/T22581a_helper.hs - + testsuite/tests/rename/should_fail/T22581b.hs - + testsuite/tests/rename/should_fail/T22581b.stderr - + testsuite/tests/rename/should_fail/T22581b_helper.hs - + testsuite/tests/rename/should_fail/T25984b.hs - + testsuite/tests/rename/should_fail/T25984b.stderr - + testsuite/tests/rename/should_fail/T25991b1.hs - + testsuite/tests/rename/should_fail/T25991b1.stderr - + testsuite/tests/rename/should_fail/T25991b2.hs - + testsuite/tests/rename/should_fail/T25991b2.stderr - + testsuite/tests/rename/should_fail/T25991b_helper.hs - testsuite/tests/rename/should_fail/T9006.stderr - testsuite/tests/rename/should_fail/all.T - + testsuite/tests/typecheck/should_compile/T25960.hs - testsuite/tests/typecheck/should_compile/all.T - + testsuite/tests/typecheck/should_fail/T25004.hs - + testsuite/tests/typecheck/should_fail/T25004.stderr - + testsuite/tests/typecheck/should_fail/T25004k.hs - + testsuite/tests/typecheck/should_fail/T25004k.stderr - testsuite/tests/typecheck/should_fail/all.T - + testsuite/tests/typecheck/should_run/T25529.hs - + testsuite/tests/typecheck/should_run/T25529.stdout - testsuite/tests/typecheck/should_run/all.T - utils/ghc-toolchain/src/GHC/Toolchain/Tools/Link.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4d4269b65f3ab1291b8de42486738b4... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4d4269b65f3ab1291b8de42486738b4... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Zubin (@wz1000)