[Git][ghc/ghc][master] 5 commits: Improved fundeps for closed type families
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 0b7df6db by Simon Peyton Jones at 2026-01-06T09:32:23-05:00 Improved fundeps for closed type families The big payload of this commit is to execute the plan suggested in #23162, by improving the way that we generate functional dependencies for closed type families. It is all described in Note [Exploiting closed type families] Most of the changes are in GHC.Tc.Solver.FunDeps Other small changes * GHC.Tc.Solver.bumpReductionDepth. This function brings together the code that * Bumps the depth * Checks for overflow Previously the two were separated, sometimes quite widely. * GHC.Core.Unify.niFixSubst: minor improvement, removing an unnecessary itraetion in the base case. * GHC.Core.Unify: no need to pass an InScopeSet to tcUnifyTysForInjectivity. It can calculate one for itself; and it is never inspected anyway so it's free to do so. * GHC.Tc.Errors.Ppr: slight impovement to the error message for reduction-stack overflow, when a constraint (rather than a type) is involved. * GHC.Tc.Solver.Monad.wrapUnifier: small change to the API - - - - - fde8bd88 by Simon Peyton Jones at 2026-01-06T09:32:23-05:00 Add missing (KK4) to kick-out criteria There was a missing case in kick-out that meant we could fail to solve an eminently-solvable constraint. See the new notes about (KK4) - - - - - 00082844 by Simon Peyton Jones at 2026-01-06T09:32:23-05:00 Some small refactorings of error reporting in the typechecker This is just a tidy-up commit. * Add ei_insoluble to ErrorItem, to cache insolubility. Small tidy-up. * Remove `is_ip` and `mkIPErr` from GHC.Tc.Errors; instead enhance mkDictErr to handle implicit parameters. Small refactor. - - - - - fe4cb252 by Simon Peyton Jones at 2026-01-06T09:32:24-05:00 Improve recording of insolubility for fundeps This commit addresses #22652, by recording when the fundeps for a constraint are definitely insoluble. That in turn improves the perspicacity of the pattern-match overlap checker. See Note [Insoluble fundeps] - - - - - df0ffaa5 by Simon Peyton Jones at 2026-01-06T09:32:24-05:00 Fix a buglet in niFixSubst The MR of which this is part failed an assertion check extendTvSubst because we extended the TvSubst with a CoVar. Boo. This tiny patch fixes it, and adds the regression test from #13882 that showed it up. - - - - - 69 changed files: - compiler/GHC/Core/FamInstEnv.hs - compiler/GHC/Core/TyCo/Subst.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/Core/Unify.hs - compiler/GHC/HsToCore/Monad.hs - compiler/GHC/Tc/Errors.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Errors/Types.hs - compiler/GHC/Tc/Gen/Splice.hs - compiler/GHC/Tc/Solver.hs - compiler/GHC/Tc/Solver/Default.hs - compiler/GHC/Tc/Solver/Dict.hs - compiler/GHC/Tc/Solver/Equality.hs - compiler/GHC/Tc/Solver/FunDeps.hs - compiler/GHC/Tc/Solver/InertSet.hs - compiler/GHC/Tc/Solver/Monad.hs - compiler/GHC/Tc/Solver/Rewrite.hs - compiler/GHC/Tc/Types/Constraint.hs - compiler/GHC/Tc/Types/CtLoc.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Tc/Utils/Unify.hs - compiler/GHC/Types/TyThing.hs - docs/users_guide/9.16.1-notes.rst - linters/lint-codes/LintCodes/Static.hs - testsuite/tests/indexed-types/should_compile/CEqCanOccursCheck.hs - testsuite/tests/indexed-types/should_fail/T12522a.hs - testsuite/tests/indexed-types/should_fail/T26176.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail10.stderr - testsuite/tests/parser/should_fail/RecordDotSyntaxFail13.stderr - testsuite/tests/parser/should_fail/T20654a.stderr - testsuite/tests/pmcheck/should_compile/T15753c.hs - + testsuite/tests/pmcheck/should_compile/T15753c.stderr - testsuite/tests/pmcheck/should_compile/T15753d.hs - + testsuite/tests/pmcheck/should_compile/T15753d.stderr - + testsuite/tests/pmcheck/should_compile/T22652.hs - + testsuite/tests/pmcheck/should_compile/T22652a.hs - testsuite/tests/pmcheck/should_compile/all.T - + testsuite/tests/polykinds/T13882.hs - testsuite/tests/polykinds/all.T - testsuite/tests/quantified-constraints/T15316A.stderr - testsuite/tests/quantified-constraints/T17267.stderr - testsuite/tests/quantified-constraints/T17267a.stderr - testsuite/tests/quantified-constraints/T17267b.stderr - testsuite/tests/quantified-constraints/T17267c.stderr - testsuite/tests/quantified-constraints/T17267e.stderr - testsuite/tests/quantified-constraints/T17458.stderr - testsuite/tests/typecheck/should_compile/T16188.hs - testsuite/tests/typecheck/should_fail/ContextStack1.stderr - testsuite/tests/typecheck/should_fail/FD3.stderr - testsuite/tests/typecheck/should_fail/FDsFromGivens2.stderr - testsuite/tests/typecheck/should_fail/FunDepOrigin1b.stderr - testsuite/tests/typecheck/should_fail/T13506.stderr - testsuite/tests/typecheck/should_fail/T15767.stderr - testsuite/tests/typecheck/should_fail/T19415.stderr - testsuite/tests/typecheck/should_fail/T19415b.stderr - testsuite/tests/typecheck/should_fail/T22924b.stderr - + testsuite/tests/typecheck/should_fail/T23162b.hs - + testsuite/tests/typecheck/should_fail/T23162b.stderr - + testsuite/tests/typecheck/should_fail/T23162c.hs - + testsuite/tests/typecheck/should_fail/T23162d.hs - testsuite/tests/typecheck/should_fail/T25325.stderr - testsuite/tests/typecheck/should_fail/T5236.stderr - testsuite/tests/typecheck/should_fail/T5246.stderr - testsuite/tests/typecheck/should_fail/T5978.stderr - testsuite/tests/typecheck/should_fail/T9612.stderr - testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr - testsuite/tests/typecheck/should_fail/all.T - testsuite/tests/typecheck/should_fail/tcfail143.stderr - utils/haddock/haddock-api/src/Haddock/Convert.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8f2093363fd8a3b8386770c72aefa74... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8f2093363fd8a3b8386770c72aefa74... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)