Fix issue #18262 by zonking constraints after solving
Zonk residual constraints in checkForExistence to reveal user type errors. Previously when `:instances` was used with instances that have TypeError constraints the result would look something like: instance [safe] s0 => Err 'A -- Defined at ../Bug2.hs:8:10 whereas after zonking, `:instances` now sees the `TypeError` and properly eliminates the constraint from the results.
Showing
- compiler/GHC/Runtime/Eval.hs 13 additions, 17 deletionscompiler/GHC/Runtime/Eval.hs
- docs/users_guide/ghci.rst 19 additions, 0 deletionsdocs/users_guide/ghci.rst
- testsuite/tests/ghci/T18262/T18262.hs 10 additions, 0 deletionstestsuite/tests/ghci/T18262/T18262.hs
- testsuite/tests/ghci/T18262/T18262.script 6 additions, 0 deletionstestsuite/tests/ghci/T18262/T18262.script
- testsuite/tests/ghci/T18262/T18262.stdout 1 addition, 0 deletionstestsuite/tests/ghci/T18262/T18262.stdout
- testsuite/tests/ghci/T18262/all.T 1 addition, 0 deletionstestsuite/tests/ghci/T18262/all.T
Loading
Please register or sign in to comment