[Git][ghc/ghc][master] Implement modifiers syntax.
Marge Bot pushed to branch master 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... - - - - - 165 changed files: - compiler/GHC/Core/Multiplicity.hs - compiler/GHC/Core/TyCo/Ppr.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/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/Error/Codes.hs - compiler/GHC/Types/Hint.hs - compiler/GHC/Types/Hint/Ppr.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/using-warnings.rst - libraries/ghc-internal/src/GHC/Internal/LanguageExtensions.hs - 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/-/commit/4a122bb68f515af580b4fa07217a0853... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4a122bb68f515af580b4fa07217a0853... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)