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 [Expanding Recursive Superclasses and ExpansionFuel]
parent
cad5c576
No related branches found
No related tags found
Pipeline #64090 canceled
Stage: tool-lint
Stage: quick-build
Stage: full-build
Stage: packaging
Stage: testing
Stage: deploy
Showing
- compiler/GHC/Core/Class.hs 5 additions, 2 deletionscompiler/GHC/Core/Class.hs
- compiler/GHC/Driver/Session.hs 18 additions, 1 deletioncompiler/GHC/Driver/Session.hs
- compiler/GHC/Settings/Constants.hs 21 additions, 0 deletionscompiler/GHC/Settings/Constants.hs
- compiler/GHC/Tc/Solver.hs 71 additions, 0 deletionscompiler/GHC/Tc/Solver.hs
- compiler/GHC/Tc/Solver/Canonical.hs 92 additions, 58 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 62 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