PmCheck: Adjust recursion depth for inhabitation test
In #17977, we ran into the reduction depth limit of the typechecker. That was only a symptom of a much broader issue: The recursion depth of the coverage checker for trying to instantiate strict fields in the `nonVoid` test was far too high (100, the `defaultMaxTcBound`). As a result, we were performing quite poorly on `T17977`. Short of a proper termination analysis to prove emptyness of a type, we just arbitrarily default to a much lower recursion limit of 3. Fixes #17977.
Showing
- compiler/GHC/HsToCore/PmCheck/Oracle.hs 33 additions, 9 deletionscompiler/GHC/HsToCore/PmCheck/Oracle.hs
- testsuite/tests/pmcheck/should_compile/T17977.hs 33 additions, 0 deletionstestsuite/tests/pmcheck/should_compile/T17977.hs
- testsuite/tests/pmcheck/should_compile/T17977b.hs 24 additions, 0 deletionstestsuite/tests/pmcheck/should_compile/T17977b.hs
- testsuite/tests/pmcheck/should_compile/T17977b.stderr 4 additions, 0 deletionstestsuite/tests/pmcheck/should_compile/T17977b.stderr
- testsuite/tests/pmcheck/should_compile/all.T 4 additions, 0 deletionstestsuite/tests/pmcheck/should_compile/all.T
Loading
Please register or sign in to comment