Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 4038a28b by Andreas Klebinger at 2025-10-30T12:38:52-04:00 Add a perf test for #26425 - - - - - f997618e by Andreas Klebinger at 2025-10-30T12:38:52-04:00 OccAnal: Be stricter for better compiler perf. In particular we are now stricter: * When combining usageDetails. * When computing binder info. In combineUsageDetails when combining the underlying adds we compute a new `LocalOcc` for each entry by combining the two existing ones. Rather than wait for those entries to be forced down the road we now force them immediately. Speeding up T26425 by about 10% with little effect on the common case. We also force binders we put into the Core AST everywhere now. Failure to do so risks leaking the occ env used to set the binders OccInfo. For T26425 compiler residency went down by a factor of ~10x. Compile time also improved by a factor of ~1.6. ------------------------- Metric Decrease: T18698a T26425 T9233 ------------------------- - - - - - 5618645b by Vladislav Zavialov at 2025-10-30T12:39:33-04:00 Fix namespace specifiers in subordinate exports (#12488) This patch fixes an oversight in the `lookupChildrenExport` function that caused explicit namespace specifiers of subordinate export items to be ignored: module M (T (type A)) where -- should be rejected data T = A Based on the `IEWrappedName` data type, there are 5 cases to consider: 1. Unadorned name: P(X) 2. Named default: P(default X) 3. Pattern synonym: P(pattern X) 4. Type name: P(type X) 5. Data name: P(data X) Case 1 is already handled correctly; cases 2 and 3 are parse errors; and it is cases 4 and 5 that we are concerned with in this patch. Following the precedent established in `LookupExactName`, we introduce a boolean flag in `LookupChildren` to control whether to look up in all namespaces or in a specific one. If an export item is accompanied by an explicit namespace specifier `type` or `data`, we restrict the lookup in `lookupGRE` to a specific namespace. The newly introduced diagnostic `TcRnExportedSubordinateNotFound` provides error messages and suggestions more tailored to this context than the previously used `reportUnboundName`. - - - - - 3f30366b by Peter Trommler at 2025-10-31T13:12:51-04:00 ghc-toolchain: detect PowerPC 64 bit ABI Check preprocessor macro defined for ABI v2 and assume v1 otherwise. Fixes #26521 - - - - - aae591ae by Peter Trommler at 2025-10-31T13:12:51-04:00 ghc-toolchain: refactor, move lastLine to Utils - - - - - da43e877 by Vladislav Zavialov at 2025-10-31T13:12:52-04:00 Tests for -Wduplicate-exports, -Wdodgy-exports Add test cases for the previously untested diagnostics: [GHC-51876] TcRnDupeModuleExport [GHC-64649] TcRnNullExportedModule This also revealed a typo (incorrect capitalization of "module") in the warning text for TcRnDupeModuleExport, which is now fixed. - - - - - 44 changed files: - compiler/GHC/Core/Opt/OccurAnal.hs - compiler/GHC/Rename/Env.hs - compiler/GHC/Rename/Names.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Errors/Types.hs - compiler/GHC/Tc/Gen/Export.hs - compiler/GHC/Types/Error/Codes.hs - compiler/GHC/Types/Hint.hs - compiler/GHC/Types/Hint/Ppr.hs - compiler/GHC/Types/Name/Reader.hs - compiler/GHC/Types/Unique/FM.hs - compiler/GHC/Types/Var/Env.hs - testsuite/tests/diagnostic-codes/codes.stdout - testsuite/tests/module/mod4.stderr - + testsuite/tests/parser/should_fail/T12488c.hs - + testsuite/tests/parser/should_fail/T12488c.stderr - + testsuite/tests/parser/should_fail/T12488d.hs - + testsuite/tests/parser/should_fail/T12488d.stderr - testsuite/tests/parser/should_fail/all.T - + testsuite/tests/perf/compiler/T26425.hs - testsuite/tests/perf/compiler/all.T - + testsuite/tests/rename/should_compile/T12488b.hs - + testsuite/tests/rename/should_compile/T12488f.hs - testsuite/tests/rename/should_compile/all.T - + testsuite/tests/rename/should_fail/T12488a.hs - + testsuite/tests/rename/should_fail/T12488a.stderr - + testsuite/tests/rename/should_fail/T12488a_foo.hs - + testsuite/tests/rename/should_fail/T12488a_foo.stderr - + testsuite/tests/rename/should_fail/T12488e.hs - + testsuite/tests/rename/should_fail/T12488e.stderr - + testsuite/tests/rename/should_fail/T12488g.hs - + testsuite/tests/rename/should_fail/T12488g.stderr - testsuite/tests/rename/should_fail/T25899e2.stderr - testsuite/tests/rename/should_fail/all.T - + testsuite/tests/warnings/should_compile/DuplicateModExport.hs - + testsuite/tests/warnings/should_compile/DuplicateModExport.stderr - + testsuite/tests/warnings/should_compile/EmptyModExport.hs - + testsuite/tests/warnings/should_compile/EmptyModExport.stderr - testsuite/tests/warnings/should_compile/all.T - utils/ghc-toolchain/ghc-toolchain.cabal - utils/ghc-toolchain/src/GHC/Toolchain/CheckArm.hs - + utils/ghc-toolchain/src/GHC/Toolchain/CheckPower.hs - utils/ghc-toolchain/src/GHC/Toolchain/ParseTriple.hs - utils/ghc-toolchain/src/GHC/Toolchain/Utils.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/46bf1b5806d531b0164ccc0f7301003... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/46bf1b5806d531b0164ccc0f7301003... You're receiving this email because of your account on gitlab.haskell.org.