Don't cache solved [W] HasCallStack constraints
This commit ensures we do not add solved Wanted constraints that mention HasCallStack or HasExceptionContext constraints to the set of solved Wanted dictionary constraints: caching them is invalid, because re-using such cached dictionaries means using an old call-stack instead of constructing a new one, as was reported in #25529. Fixes #25529.
Showing
- compiler/GHC/Core/Predicate.hs 59 additions, 21 deletionscompiler/GHC/Core/Predicate.hs
- compiler/GHC/Tc/Solver/Dict.hs 2 additions, 2 deletionscompiler/GHC/Tc/Solver/Dict.hs
- compiler/GHC/Tc/Solver/Monad.hs 91 additions, 14 deletionscompiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/Solver/Types.hs 1 addition, 1 deletioncompiler/GHC/Tc/Solver/Types.hs
- compiler/GHC/Tc/Types/Evidence.hs 1 addition, 1 deletioncompiler/GHC/Tc/Types/Evidence.hs
- testsuite/tests/plugins/plugins10.stdout 2 additions, 0 deletionstestsuite/tests/plugins/plugins10.stdout
- testsuite/tests/plugins/static-plugins.stdout 2 additions, 0 deletionstestsuite/tests/plugins/static-plugins.stdout
- testsuite/tests/typecheck/should_run/T25529.hs 33 additions, 0 deletionstestsuite/tests/typecheck/should_run/T25529.hs
- testsuite/tests/typecheck/should_run/T25529.stdout 7 additions, 0 deletionstestsuite/tests/typecheck/should_run/T25529.stdout
- testsuite/tests/typecheck/should_run/all.T 1 addition, 0 deletionstestsuite/tests/typecheck/should_run/all.T
Loading
Please register or sign in to comment