[Git][ghc/ghc][wip/sjakobi/T10531] 10 commits: Implement modifiers syntax.
Simon Jakobi pushed to branch wip/sjakobi/T10531 at Glasgow Haskell Compiler / GHC Commits: 4a122bb6 by Phil Hazelden at 2026-04-08T20:49:42-04:00 Implement modifiers syntax. The `%m` syntax of linear types is now accepted in more places, to allow use by future extensions, though so far linear types is still the only consumer. This may break existing code where it * Uses -XLinearTypes. * Has code of the form `a %m -> b`, where `m` can't be inferred to be kind Multiplicity. The code can be fixed either by adding a kind annotation, or by setting `-XLinearTypes -XNoModifiers`. Proposal: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0370-mo... - - - - - 07267f79 by Zubin Duggal at 2026-04-08T20:50:25-04:00 hadrian: Don't include the package hash in the haddock directory Since GHC 9.8 and hash_unit_ids, haddock urls have looked like`ghc-9.10.3/doc/html/libraries/base-4.20.2.0-39f9/**/*.html` The inclusion of the hash makes it hard for downstream non-boot packages to properly link to these files, as the hash is not part of a standard cabal substitution. Since we only build one version of each package, we don't need the hash to disambiguate anything, we can just remove it. Fixes #26635 - - - - - 0a83b95b by ARATA Mizuki at 2026-04-08T20:51:18-04:00 testsuite: Allow multiple ways to be run by setting multiple command-line options This patch allows multiple `--test-way`s to take effect, like: $ hadrian/build test --test-way=normal --test-way=llvm Previously, only one way was run if the test speed was 'normal' or 'fast'. Closes #26926 Co-authored-by: sheaf <sam.derbyshire@gmail.com> - - - - - e841931c by Teo Camarasu at 2026-04-08T20:52:00-04:00 doc: improve eventlog-flush-interval flag documentation We mention the performance cost and how this flag can be turned off. Resolves #27056 - - - - - e332db25 by Teo Camarasu at 2026-04-08T20:52:01-04:00 docs/user_guide: fix typo - - - - - 5b82080a by Simon Jakobi at 2026-04-08T20:52:44-04:00 Fix -dsuppress-uniques for free variables in demand signatures Before: Str=b{sXyZ->S} With this patch: Str=b{S} T13143.stderr is updated accordingly. Fixes #27106. - - - - - b7a084cc by Simon Jakobi at 2026-04-08T20:53:27-04:00 Documentation fixes for demand signature notation Fixes #27115. - - - - - 59391132 by Simon Jakobi at 2026-04-08T20:54:08-04:00 Use upsert for non-deleting map updates Some compiler functions were using `alter`, despite never removing any entries: they only update an existing entry or insert a new one. These functions are converted to using `upsert`: alter :: (Maybe a -> Maybe a) -> Key -> Map a -> Map a upsert :: (Maybe a -> a) -> Key -> Map a -> Map a `upsert` variants are also added to APIs of the various Word64Map wrapper types. The precedent for this `upsert` operation is in the containers library: see https://github.com/haskell/containers/pull/1145 Metrics: compile_time/bytes allocated ------------------------------------- geo. mean: -0.1% minimum: -0.5% maximum: +0.0% Resolves #27140. - - - - - da7e82f4 by Cheng Shao at 2026-04-08T20:54:49-04:00 testsuite: fix testsuite run for +ipe again This patch makes the +ipe flavour transformer pass the entire testsuite again by dropping stdout/stderr checks of certain tests that are sensitive to stack layout changes with `+ipe`. Related: #26799. - - - - - 22056fa5 by Simon Jakobi at 2026-04-10T13:12:27+02:00 Add regression test for #10531 Closes #10531. - - - - - 205 changed files: - compiler/GHC/Cmm/CommonBlockElim.hs - compiler/GHC/Cmm/Dataflow/Graph.hs - compiler/GHC/Cmm/Dataflow/Label.hs - compiler/GHC/CmmToAsm/CFG.hs - compiler/GHC/Core/Multiplicity.hs - compiler/GHC/Core/Opt/DmdAnal.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/RoughMap.hs - compiler/GHC/Core/TyCo/Ppr.hs - compiler/GHC/Core/TyCon/Env.hs - compiler/GHC/Core/Unify.hs - compiler/GHC/Data/FastString/Env.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Pat.hs - compiler/GHC/Hs/Syn/Type.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/HsToCore/Binds.hs - compiler/GHC/HsToCore/Docs.hs - compiler/GHC/HsToCore/Errors/Ppr.hs - compiler/GHC/HsToCore/Errors/Types.hs - compiler/GHC/HsToCore/Expr.hs - compiler/GHC/HsToCore/Match.hs - compiler/GHC/HsToCore/Pmc/Desugar.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/HsToCore/Ticks.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Type.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/PostProcess.hs - compiler/GHC/Parser/PostProcess/Haddock.hs - compiler/GHC/Parser/Types.hs - compiler/GHC/Rename/Bind.hs - compiler/GHC/Rename/Expr.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Module.hs - compiler/GHC/Rename/Names.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Deriv/Generate.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Errors/Types.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Bind.hs - compiler/GHC/Tc/Gen/Default.hs - compiler/GHC/Tc/Gen/Foreign.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Pat.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/Solver/Types.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/Tc/TyCl/PatSyn.hs - compiler/GHC/Tc/Types/Evidence.hs - compiler/GHC/Tc/Utils/Env.hs - compiler/GHC/Tc/Zonk/Type.hs - compiler/GHC/ThToHs.hs - compiler/GHC/Types/Demand.hs - compiler/GHC/Types/Error/Codes.hs - compiler/GHC/Types/Hint.hs - compiler/GHC/Types/Hint/Ppr.hs - compiler/GHC/Types/Name/Env.hs - compiler/GHC/Types/Name/Occurrence.hs - compiler/GHC/Types/Unique/DFM.hs - compiler/GHC/Types/Unique/FM.hs - compiler/GHC/Types/Var/Env.hs - compiler/GHC/Wasm/ControlFlow/FromCmm.hs - compiler/Language/Haskell/Syntax/Binds.hs - compiler/Language/Haskell/Syntax/Decls.hs - compiler/Language/Haskell/Syntax/Decls/Foreign.hs - compiler/Language/Haskell/Syntax/Expr.hs - compiler/Language/Haskell/Syntax/Extension.hs - compiler/Language/Haskell/Syntax/Pat.hs - compiler/Language/Haskell/Syntax/Type.hs - docs/users_guide/9.16.1-notes.rst - docs/users_guide/exts/linear_types.rst - + docs/users_guide/exts/modifiers.rst - docs/users_guide/exts/syntax.rst - docs/users_guide/runtime_control.rst - docs/users_guide/using-optimisation.rst - docs/users_guide/using-warnings.rst - hadrian/bindist/Makefile - hadrian/src/CommandLine.hs - hadrian/src/Context.hs - hadrian/src/Settings/Builders/Cabal.hs - libraries/ghc-experimental/tests/backtraces/all.T - libraries/ghc-internal/src/GHC/Internal/LanguageExtensions.hs - libraries/ghc-internal/tests/stack-annotation/all.T - testsuite/driver/testlib.py - testsuite/tests/dmdanal/should_compile/T13143.stderr - + testsuite/tests/dmdanal/should_compile/T27106.hs - + testsuite/tests/dmdanal/should_compile/T27106.stderr - testsuite/tests/dmdanal/should_compile/all.T - + testsuite/tests/driver/T10531/A.hs - + testsuite/tests/driver/T10531/B.hs - + testsuite/tests/driver/T10531/C.hs - + testsuite/tests/driver/T10531/Makefile - + testsuite/tests/driver/T10531/all.T - testsuite/tests/driver/T4437.hs - testsuite/tests/ghc-api/T25121_status.stdout - testsuite/tests/ghc-api/exactprint/Test20239.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr - testsuite/tests/haddock/should_compile_flag_haddock/haddockLinear.hs - testsuite/tests/haddock/should_compile_flag_haddock/haddockLinear.stderr - testsuite/tests/interface-stability/template-haskell-exports.stdout - testsuite/tests/linear/should_compile/Linear1Rule.hs - testsuite/tests/linear/should_compile/MultConstructor.hs - testsuite/tests/linear/should_compile/NonLinearRecord.hs - testsuite/tests/linear/should_compile/OldList.hs - testsuite/tests/linear/should_compile/T19400.hs - testsuite/tests/linear/should_compile/T22546.hs - testsuite/tests/linear/should_compile/T23025.hs - testsuite/tests/linear/should_compile/T26332.hs - testsuite/tests/linear/should_fail/LinearErrOrigin.hs - testsuite/tests/linear/should_fail/LinearErrOrigin.stderr - testsuite/tests/linear/should_fail/LinearLet10.hs - testsuite/tests/linear/should_fail/LinearLet10.stderr - testsuite/tests/linear/should_fail/LinearPartialSig.hs - testsuite/tests/linear/should_fail/LinearPartialSig.stderr - testsuite/tests/linear/should_fail/LinearRole.hs - + testsuite/tests/linear/should_fail/LinearUnknownModifierKind.hs - + testsuite/tests/linear/should_fail/LinearUnknownModifierKind.stderr - testsuite/tests/linear/should_fail/LinearVar.hs - testsuite/tests/linear/should_fail/LinearVar.stderr - testsuite/tests/linear/should_fail/T18888_datakinds.hs - testsuite/tests/linear/should_fail/T18888_datakinds.stderr - testsuite/tests/linear/should_fail/T19361.hs - testsuite/tests/linear/should_fail/T19361.stderr - testsuite/tests/linear/should_fail/T20083.hs - testsuite/tests/linear/should_fail/T20083.stderr - testsuite/tests/linear/should_fail/T21278.hs - testsuite/tests/linear/should_fail/T21278.stderr - + testsuite/tests/linear/should_fail/TooManyMultiplicities.hs - + testsuite/tests/linear/should_fail/TooManyMultiplicities.stderr - + testsuite/tests/linear/should_fail/TooManyMultiplicitiesU.hs - + testsuite/tests/linear/should_fail/TooManyMultiplicitiesU.stderr - testsuite/tests/linear/should_fail/all.T - + testsuite/tests/modifiers/Makefile - + testsuite/tests/modifiers/should_compile/LinearNoModifiers.hs - + testsuite/tests/modifiers/should_compile/Makefile - + testsuite/tests/modifiers/should_compile/Modifier1Linear.hs - + testsuite/tests/modifiers/should_compile/Modifier1Linear.stderr - + testsuite/tests/modifiers/should_compile/Modifiers.hs - + testsuite/tests/modifiers/should_compile/Modifiers.stderr - + testsuite/tests/modifiers/should_compile/ModifiersSuggestLinear.hs - + testsuite/tests/modifiers/should_compile/ModifiersSuggestLinear.stderr - + testsuite/tests/modifiers/should_compile/all.T - + testsuite/tests/modifiers/should_fail/Makefile - + testsuite/tests/modifiers/should_fail/ModifiersExprUnexpectedInQuote.hs - + testsuite/tests/modifiers/should_fail/ModifiersExprUnexpectedInQuote.stderr - + testsuite/tests/modifiers/should_fail/ModifiersForbiddenHere.hs - + testsuite/tests/modifiers/should_fail/ModifiersForbiddenHere.stderr - + testsuite/tests/modifiers/should_fail/ModifiersNoExt.hs - + testsuite/tests/modifiers/should_fail/ModifiersNoExt.stderr - + testsuite/tests/modifiers/should_fail/ModifiersUnexpectedInQuote.hs - + testsuite/tests/modifiers/should_fail/ModifiersUnexpectedInQuote.stderr - + testsuite/tests/modifiers/should_fail/ModifiersUnknownKind.hs - + testsuite/tests/modifiers/should_fail/ModifiersUnknownKind.stderr - + testsuite/tests/modifiers/should_fail/all.T - testsuite/tests/parser/should_compile/DumpParsedAst.stderr - testsuite/tests/parser/should_compile/DumpRenamedAst.stderr - testsuite/tests/parser/should_compile/DumpSemis.stderr - testsuite/tests/parser/should_compile/KindSigs.stderr - testsuite/tests/parser/should_compile/T14189.stderr - testsuite/tests/parser/should_compile/T15323.stderr - testsuite/tests/parser/should_compile/T18834a.stderr - testsuite/tests/parser/should_compile/T20452.stderr - testsuite/tests/parser/should_compile/T23315/T23315.stderr - testsuite/tests/parser/should_fail/T19928.stderr - testsuite/tests/printer/Makefile - + testsuite/tests/printer/PprModifiers.hs - testsuite/tests/printer/T18791.stderr - testsuite/tests/printer/Test20315.hs - testsuite/tests/printer/Test20315.stderr - testsuite/tests/printer/Test24533.stdout - testsuite/tests/printer/all.T - testsuite/tests/rename/should_compile/T22478a.hs - testsuite/tests/typecheck/no_skolem_info/T20232.hs - testsuite/tests/typecheck/no_skolem_info/T20232.stderr - utils/check-exact/ExactPrint.hs - utils/check-exact/Main.hs - utils/check-exact/Transform.hs - utils/haddock/haddock-api/src/Haddock/Backends/Hoogle.hs - utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs - utils/haddock/haddock-api/src/Haddock/Convert.hs - utils/haddock/haddock-api/src/Haddock/GhcUtils.hs - utils/haddock/haddock-api/src/Haddock/Interface/Create.hs - utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs - utils/haddock/haddock-api/src/Haddock/Interface/RenameType.hs - utils/haddock/haddock-api/src/Haddock/Types.hs - utils/haddock/html-test/src/LinearTypes.hs - utils/haddock/latex-test/src/LinearTypes/LinearTypes.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6a7aa147b8eff68f9982e0676d533dd... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6a7aa147b8eff68f9982e0676d533dd... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Simon Jakobi (@sjakobi2)