[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 5 commits: Drop HsTyLit in favor of HsLit (#26862, #25121)
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: dcd7819c by Vladislav Zavialov at 2026-02-27T18:46:03-05:00 Drop HsTyLit in favor of HsLit (#26862, #25121) This patch is a small step towards unification of HsExpr and HsType, taking care of literals (HsLit) and type literals (HsTyLit). Additionally, it improves error messages for unsupported type literals, such as unboxed or fractional literals (test cases: T26862, T26862_th). Changes to the AST: * Use HsLit where HsTyLit was previously used * Use HsChar where HsCharTy was previously used * Use HsString where HsStrTy was previously used * Use HsNatural (NEW) where HsNumTy was previously used * Use HsDouble (NEW) to represent unsupported fractional type literals Changes to logic: * Parse unboxed and fractional type literals (to be rejected later) * Drop the check for negative literals in the renamer (rnHsTyLit) in favor of checking in the type checker (tc_hs_lit_ty) * Check for invalid type literals in TH (repTyLit) and report unrepresentable literals with ThUnsupportedTyLit * Allow negative type literals in TH (numTyLit). This is fine as these will be taken care of at splice time (test case: T8306_th) - - - - - c927954f by Vladislav Zavialov at 2026-02-27T18:46:50-05:00 Increase test coverage of diagnostics Add test cases for the previously untested diagnostics: [GHC-01239] PsErrIfInFunAppExpr [GHC-04807] PsErrProcInFunAppExpr [GHC-08195] PsErrInvalidRecordCon [GHC-16863] PsErrUnsupportedBoxedSumPat [GHC-18910] PsErrSemiColonsInCondCmd [GHC-24737] PsErrInvalidWhereBindInPatSynDecl [GHC-25037] PsErrCaseInFunAppExpr [GHC-25078] PsErrPrecedenceOutOfRange [GHC-28021] PsErrRecordSyntaxInPatSynDecl [GHC-35827] TcRnNonOverloadedSpecialisePragma [GHC-40845] PsErrUnpackDataCon [GHC-45106] PsErrInvalidInfixHole [GHC-50396] PsErrInvalidRuleActivationMarker [GHC-63930] MultiWayIfWithoutAlts [GHC-65536] PsErrNoSingleWhereBindInPatSynDecl [GHC-67630] PsErrMDoInFunAppExpr [GHC-70526] PsErrLetCmdInFunAppCmd [GHC-77808] PsErrDoCmdInFunAppCmd [GHC-86934] ClassPE [GHC-90355] PsErrLetInFunAppExpr [GHC-91745] CasesExprWithoutAlts [GHC-92971] PsErrCaseCmdInFunAppCmd [GHC-95644] PsErrBangPatWithoutSpace [GHC-97005] PsErrIfCmdInFunAppCmd Remove unused error constructors: [GHC-44524] PsErrExpectedHyphen [GHC-91382] TcRnIllegalKindSignature - - - - - 3a9470fd by Torsten Schmits at 2026-02-27T18:47:34-05:00 Avoid expensive computation for debug logging in `mergeDatabases` when log level is low This computed and traversed a set intersection for every single dependency unconditionally. - - - - - ea4c2cbd by Brandon Chinn at 2026-02-27T16:22:38-08:00 Implement QualifiedStrings (#26503) See Note [Implementation of QualifiedStrings] - - - - - 6ffe1ccb by sheaf at 2026-02-28T04:05:16-05:00 Clean up join points, casts & ticks This commit shores up the logic dealing with casts and ticks occurring in between a join point binding and a jump. Fixes #26642 #26929 #26693 Makes progress on #14610 #26157 #26422 Changes: - Remove 'GHC.Types.Tickish.TickishScoping' in favour of simpler predicates 'tickishHasNoScope'/'tickishHasSoftScope', as things were before commit 993975d3. This makes the code easier to read and document (fewer indirections). - Introduce 'canCollectArgsThroughTick' for consistent handling of ticks around PrimOps and other 'Id's that cannot be eta-reduced. See overhauled Note [Ticks and mandatory eta expansion]. - New Note [JoinId vs TailCallInfo] in GHC.Core.SimpleOpt that explains robustness of JoinId vs fragility of TailCallInfo. - Allow casts/non-soft-scoped ticks to occur in between a join point binder and a jump, but only in Core Prep. See Note [Join points, casts, and ticks] and Note [Join points, casts, and ticks... in Core Prep] in GHC.Core.Opt.Simplify.Iteration. Also update Core Lint to account for this. See Note [Linting join points with casts or ticks] in GHC.Core.Lint. - Update 'GHC.Core.Utils.mergeCaseAlts' to avoid pushing a cast in between a join point binding and its jumps. This fixes #26642. See the new (MC5) and (MC6) in Note [Merge Nested Cases]. Test cases: T26642 and TrickyJoins. - - - - - 164 changed files: - compiler/GHC/Builtin/Types.hs - compiler/GHC/Cmm/Node.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Lint.hs - compiler/GHC/Core/Opt/Arity.hs - compiler/GHC/Core/Opt/FloatIn.hs - compiler/GHC/Core/Opt/FloatOut.hs - compiler/GHC/Core/Opt/OccurAnal.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/SimpleOpt.hs - compiler/GHC/Core/Utils.hs - compiler/GHC/CoreToStg/Prep.hs - compiler/GHC/Driver/Config/Core/Lint.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Lit.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/Errors/Ppr.hs - compiler/GHC/HsToCore/Errors/Types.hs - compiler/GHC/HsToCore/Expr.hs - compiler/GHC/HsToCore/Match/Literal.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/Tidy.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/String.hs - compiler/GHC/Rename/Bind.hs - compiler/GHC/Rename/Expr.hs - compiler/GHC/Rename/HsType.hs - + compiler/GHC/Rename/Lit.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Rename/Utils.hs - compiler/GHC/StgToCmm/Expr.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Errors/Types.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Pat.hs - compiler/GHC/Tc/TyCl/PatSyn.hs - compiler/GHC/Tc/Types/Origin.hs - compiler/GHC/Tc/Zonk/Type.hs - compiler/GHC/ThToHs.hs - compiler/GHC/Types/Basic.hs - compiler/GHC/Types/Error/Codes.hs - compiler/GHC/Types/Id/Info.hs - compiler/GHC/Types/SourceText.hs - compiler/GHC/Types/Tickish.hs - compiler/GHC/Unit/State.hs - compiler/Language/Haskell/Syntax/Expr.hs - compiler/Language/Haskell/Syntax/Extension.hs - compiler/Language/Haskell/Syntax/Lit.hs - compiler/Language/Haskell/Syntax/Pat.hs - compiler/Language/Haskell/Syntax/Type.hs - compiler/ghc.cabal.in - docs/users_guide/9.16.1-notes.rst - + docs/users_guide/exts/qualified_strings.rst - libraries/ghc-internal/src/GHC/Internal/LanguageExtensions.hs - libraries/ghc-internal/src/GHC/Internal/TH/Lib.hs - testsuite/tests/codeGen/should_compile/debug.stdout - + testsuite/tests/dependent/should_fail/SelfDepCls.hs - + testsuite/tests/dependent/should_fail/SelfDepCls.stderr - testsuite/tests/dependent/should_fail/all.T - testsuite/tests/diagnostic-codes/codes.stdout - testsuite/tests/driver/T4437.hs - testsuite/tests/ghc-api/annotations-literals/literals.stdout - testsuite/tests/ghc-api/annotations-literals/parsed.hs - testsuite/tests/interface-stability/template-haskell-exports.stdout - testsuite/tests/module/all.T - + testsuite/tests/module/mod70b.hs - + testsuite/tests/module/mod70b.stderr - + testsuite/tests/parser/should_fail/NoBlockArgumentsFail4.hs - + testsuite/tests/parser/should_fail/NoBlockArgumentsFail4.stderr - testsuite/tests/parser/should_fail/NoBlockArgumentsFailArrowCmds.hs - testsuite/tests/parser/should_fail/NoBlockArgumentsFailArrowCmds.stderr - + testsuite/tests/parser/should_fail/NoDoAndIfThenElseArrowCmds.hs - + testsuite/tests/parser/should_fail/NoDoAndIfThenElseArrowCmds.stderr - testsuite/tests/parser/should_fail/all.T - + testsuite/tests/parser/should_fail/badRuleMarker.hs - + testsuite/tests/parser/should_fail/badRuleMarker.stderr - + testsuite/tests/parser/should_fail/patFail010.hs - + testsuite/tests/parser/should_fail/patFail010.stderr - + testsuite/tests/parser/should_fail/patFail011.hs - + testsuite/tests/parser/should_fail/patFail011.stderr - + testsuite/tests/parser/should_fail/precOutOfRange.hs - + testsuite/tests/parser/should_fail/precOutOfRange.stderr - + testsuite/tests/parser/should_fail/unpack_data_con.hs - + testsuite/tests/parser/should_fail/unpack_data_con.stderr - testsuite/tests/patsyn/should_fail/T10426.stderr - testsuite/tests/patsyn/should_fail/all.T - + testsuite/tests/patsyn/should_fail/patsyn_where_fail1.hs - + testsuite/tests/patsyn/should_fail/patsyn_where_fail1.stderr - + testsuite/tests/patsyn/should_fail/patsyn_where_fail2.hs - + testsuite/tests/patsyn/should_fail/patsyn_where_fail2.stderr - + testsuite/tests/patsyn/should_fail/patsyn_where_fail3.hs - + testsuite/tests/patsyn/should_fail/patsyn_where_fail3.stderr - + testsuite/tests/patsyn/should_fail/patsyn_where_fail4.hs - + testsuite/tests/patsyn/should_fail/patsyn_where_fail4.stderr - + testsuite/tests/qualified-strings/Makefile - + testsuite/tests/qualified-strings/should_compile/Example/Length.hs - + testsuite/tests/qualified-strings/should_compile/all.T - + testsuite/tests/qualified-strings/should_compile/qstrings_redundant_pattern.hs - + testsuite/tests/qualified-strings/should_compile/qstrings_redundant_pattern.stderr - + testsuite/tests/qualified-strings/should_fail/Example/Length.hs - + testsuite/tests/qualified-strings/should_fail/Makefile - + testsuite/tests/qualified-strings/should_fail/all.T - + testsuite/tests/qualified-strings/should_fail/qstrings_bad_expr.hs - + testsuite/tests/qualified-strings/should_fail/qstrings_bad_expr.stderr - + testsuite/tests/qualified-strings/should_fail/qstrings_bad_pat.hs - + testsuite/tests/qualified-strings/should_fail/qstrings_bad_pat.stderr - + testsuite/tests/qualified-strings/should_fail/qstrings_multiline_no_ext.hs - + testsuite/tests/qualified-strings/should_fail/qstrings_multiline_no_ext.stderr - + testsuite/tests/qualified-strings/should_run/Example/ByteStringAscii.hs - + testsuite/tests/qualified-strings/should_run/Example/ByteStringUtf8.hs - + testsuite/tests/qualified-strings/should_run/Example/Text.hs - + testsuite/tests/qualified-strings/should_run/Makefile - + testsuite/tests/qualified-strings/should_run/all.T - + testsuite/tests/qualified-strings/should_run/qstrings_expr.hs - + testsuite/tests/qualified-strings/should_run/qstrings_expr.stdout - + testsuite/tests/qualified-strings/should_run/qstrings_pat.hs - + testsuite/tests/qualified-strings/should_run/qstrings_pat.stdout - + testsuite/tests/qualified-strings/should_run/qstrings_th.hs - + testsuite/tests/qualified-strings/should_run/qstrings_th.stdout - + testsuite/tests/simplCore/should_compile/T26642.hs - + testsuite/tests/simplCore/should_compile/TrickyJoins.hs - testsuite/tests/simplCore/should_compile/all.T - + testsuite/tests/th/T26862_th.script - + testsuite/tests/th/T26862_th.stderr - + testsuite/tests/th/T8306_th.script - + testsuite/tests/th/T8306_th.stderr - + testsuite/tests/th/T8306_th.stdout - testsuite/tests/th/T8412.stderr - + testsuite/tests/th/TH_EmptyLamCases.hs - + testsuite/tests/th/TH_EmptyLamCases.stderr - + testsuite/tests/th/TH_EmptyMultiIf.hs - + testsuite/tests/th/TH_EmptyMultiIf.stderr - testsuite/tests/th/all.T - + testsuite/tests/typecheck/should_fail/T26862.hs - + testsuite/tests/typecheck/should_fail/T26862.stderr - testsuite/tests/typecheck/should_fail/T8306.stderr - testsuite/tests/typecheck/should_fail/all.T - testsuite/tests/unboxedsums/all.T - + testsuite/tests/unboxedsums/unboxedsums4p.hs - + testsuite/tests/unboxedsums/unboxedsums4p.stderr - + testsuite/tests/warnings/should_compile/SpecMultipleTysMono.hs - + testsuite/tests/warnings/should_compile/SpecMultipleTysMono.stderr - testsuite/tests/warnings/should_compile/all.T - utils/check-exact/ExactPrint.hs - utils/haddock/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.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/Interface/Rename.hs - utils/haddock/haddock-api/src/Haddock/Types.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c7f6b7d3e78ba00f29912a382cc3fdf... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c7f6b7d3e78ba00f29912a382cc3fdf... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)