[Git][ghc/ghc][wip/andreask/revert-generics] 7 commits: Migrate `ghc-pkg` to use `OsPath` and `file-io`
Andreas Klebinger pushed to branch wip/andreask/revert-generics at Glasgow Haskell Compiler / GHC Commits: 7666f4a9 by Fendor at 2026-04-17T22:29:51-04:00 Migrate `ghc-pkg` to use `OsPath` and `file-io` `ghc-pkg` should use UNC paths as much as possible to avoid MAX_PATH issues on windows. `file-io` uses UNC Paths by default on windows, ensuring we use the correct APIs and that we finally are no longer plagued by MAX_PATH issues in CI and private machines. On top of it, the higher correctness of `OsPath` is appreciated in this small codebase. Also, we improve memory usage very slightly, due to the more efficient memory representation of `OsPath` over `FilePath` Adds `ghc-pkg` regression test for MAX_PATH on windows Make sure `ghc-pkg` behaves as expected when long paths (> 255) are involved on windows. Let's generate a testcase where we can actually observe that `ghc-pkg` behaves as epxected. See the documentation for windows on Maximum Path Length Limitation: * `https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation` Adds changelog entry for long path support in ghc-pkg. - - - - - 78434e8c by Simon Peyton Jones at 2026-04-17T22:30:38-04:00 Kill off the substitution in Lint Now that we have invariant (NoTypeShadowing) we no longer need Lint to carry an ambient substitution. This makes it simpler and faster. A really worthwhile refactor. There are some knock-on effects * Linting join points after worker/wrapper. See Note [Join points and beta redexes] * Running a type substitution after the desugarer. See Note [Substituting type-lets] in the new module GHC.Core.SubstTypeLets Implements #27078 Most perf tests don't use Lint so we won't see a perf incresae. But T1969, which uses -O0 and Lint, gets 1.3% worse because it has to run the SubstTypeLets pass which is a somewhat expensive no-op Overall though compile-time allocations are down 0.1%. Metric Increase: T1969 - - - - - 86ca6c2c by mangoiv at 2026-04-17T22:31:22-04:00 testsuite: inline elemCoreTest Some weird (probably python scoping) rule caused elemCoreTest, a regex being out of scope on ubuntu, presumably because of a newer python version. This patch just inlines the regex, which fixes the issue. Fixes #27193 - - - - - 72d6dc74 by aparker at 2026-04-20T20:15:44-04:00 NCG: Implement constant folding for vector simd ops (Issue #25030) - - - - - b9cab907 by sheaf at 2026-04-20T20:15:44-04:00 Mark some SIMD tests as broken on i386 optllvm As seen in #25498, several SIMD tests are broken on i386 in the optllvm way. This commit marks them as "expect_broken". - - - - - 76528cc3 by Wolfgang Jeltsch at 2026-04-20T20:16:25-04:00 Move most of the `System.IO` implementation into `base` This involves a rewrite of the `combine` helper function to avoid the use of `last`, which would now be flagged as an error. Metric Decrease: LinkableUsage01 T3294 Metric Increase: T12227 T12707 T5642 - - - - - 288a6698 by Andreas Klebinger at 2026-04-21T14:31:21+02:00 Revert use of generic instances for compiler time perf reasons. Revert "Derive Semigroup/Monoid for instances believed could be derived in #25871" This reverts commit 11a04cbb221cc404fe00d65d7c951558ede4caa9. Revert "add Ghc.Data.Pair deriving" This reverts commit 15d9ce449e1be8c01b89fd39bdf1e700ea7d1dce. - - - - - 63 changed files: - + changelog.d/ghc-pkg-long-path-support - + changelog.d/simd_constant_folding - compiler/GHC/Cmm/Opt.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToLlvm/CodeGen.hs - compiler/GHC/Core/Lint.hs - + compiler/GHC/Core/Lint/SubstTypeLets.hs - compiler/GHC/Core/Opt/OccurAnal.hs - compiler/GHC/Core/Opt/WorkWrap/Utils.hs - compiler/GHC/Core/Subst.hs - compiler/GHC/Data/Pair.hs - compiler/GHC/Driver/Config/Core/Lint.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Pmc.hs - compiler/GHC/HsToCore/Pmc/Solver/Types.hs - compiler/GHC/Parser/PostProcess/Haddock.hs - compiler/GHC/Tc/Utils/TcMType.hs - compiler/GHC/Types/Unique/DSet.hs - compiler/GHC/Unit/State.hs - compiler/GHC/Utils/Misc.hs - compiler/GHC/Utils/Ppr/Colour.hs - compiler/ghc.cabal.in - libraries/base/src/Control/Concurrent.hs - libraries/base/src/GHC/IO/Handle.hs - libraries/base/src/Prelude.hs - libraries/base/src/System/IO.hs - libraries/base/src/Text/Printf.hs - libraries/base/tests/perf/all.T - libraries/ghc-boot/GHC/Unit/Database.hs - libraries/ghc-boot/ghc-boot.cabal.in - libraries/ghc-internal/src/GHC/Internal/System/IO.hs - testsuite/tests/cabal/Makefile - testsuite/tests/cabal/all.T - + testsuite/tests/cabal/ghcpkg10.stdout - testsuite/tests/corelint/LintEtaExpand.stderr - testsuite/tests/corelint/T21115b.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/simd/should_run/Makefile - + testsuite/tests/simd/should_run/T25030.hs - + testsuite/tests/simd/should_run/T25030.stdout - testsuite/tests/simd/should_run/all.T - testsuite/tests/typecheck/should_compile/T9497a.stderr - testsuite/tests/typecheck/should_compile/holes.stderr - testsuite/tests/typecheck/should_compile/holes3.stderr - testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr - testsuite/tests/typecheck/should_fail/T9497d.stderr - testsuite/tests/typecheck/should_run/T9497a-run.stderr - testsuite/tests/typecheck/should_run/T9497b-run.stderr - testsuite/tests/typecheck/should_run/T9497c-run.stderr - utils/ghc-pkg/Main.hs - utils/ghc-pkg/ghc-pkg.cabal.in - utils/haddock/html-test/ref/Bug1004.html - utils/haddock/html-test/ref/Bug973.html - utils/haddock/html-test/ref/ConstructorPatternExport.html - utils/haddock/html-test/ref/DefaultSignatures.html - utils/haddock/html-test/ref/Hash.html - utils/haddock/html-test/ref/PatternSyns.html - utils/haddock/html-test/ref/PatternSyns2.html - utils/haddock/html-test/ref/QuasiExpr.html - utils/haddock/html-test/ref/Test.html The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e989ad19482ffab5f51d67fccfc6f79... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e989ad19482ffab5f51d67fccfc6f79... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Andreas Klebinger (@AndreasK)