Constraint simplification loop now depends on `ExpansionFuel`
instead of a boolean flag for `CDictCan.cc_pend_sc`. Pending givens get a fuel of 3 while Wanted and quantified constraints get a fuel of 1. This helps pending given constraints to keep up with pending wanted constraints in case of `UndecidableSuperClasses` and superclass expansions while simplifying the infered type. Adds 3 dynamic flags for controlling the fuels for each type of constraints `-fgivens-expansion-fuel` for givens `-fwanteds-expansion-fuel` for wanteds and `-fqcs-expansion-fuel` for quantified constraints Fixes #21909 Added Tests T21909, T21909b Added Note [SimplifyInfer and UndecidableSuperClasses]
parent
c6a967d9
No related branches found
No related tags found
Pipeline #63637 failed
Showing
- compiler/GHC/Driver/Session.hs 18 additions, 1 deletioncompiler/GHC/Driver/Session.hs
- compiler/GHC/Settings/Constants.hs 15 additions, 0 deletionscompiler/GHC/Settings/Constants.hs
- compiler/GHC/Tc/Solver.hs 41 additions, 0 deletionscompiler/GHC/Tc/Solver.hs
- compiler/GHC/Tc/Solver/Canonical.hs 86 additions, 54 deletionscompiler/GHC/Tc/Solver/Canonical.hs
- compiler/GHC/Tc/Solver/Monad.hs 21 additions, 14 deletionscompiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/Types/Constraint.hs 58 additions, 23 deletionscompiler/GHC/Tc/Types/Constraint.hs
- docs/users_guide/expected-undocumented-flags.txt 3 additions, 0 deletionsdocs/users_guide/expected-undocumented-flags.txt
- testsuite/tests/typecheck/should_compile/T21909.hs 24 additions, 0 deletionstestsuite/tests/typecheck/should_compile/T21909.hs
- testsuite/tests/typecheck/should_compile/T21909b.hs 12 additions, 0 deletionstestsuite/tests/typecheck/should_compile/T21909b.hs
- testsuite/tests/typecheck/should_compile/all.T 2 additions, 0 deletionstestsuite/tests/typecheck/should_compile/all.T
Loading
Please register or sign in to comment