Pmc: Do inhabitation test for unlifted vars (#20631)
Although I thought we were already set to handle unlifted datatypes correctly, it appears we weren't. #20631 showed that it's wrong to assume `vi_bot=IsNotBot` for `VarInfo`s of unlifted types from their inception if we don't follow up with an inhabitation test to see if there are any habitable constructors left. We can't trigger the test from `emptyVarInfo`, so now we instead fail early in `addBotCt` for variables of unlifted types. Fixed #20631.
Showing
- compiler/GHC/HsToCore/Pmc/Solver.hs 26 additions, 15 deletionscompiler/GHC/HsToCore/Pmc/Solver.hs
- compiler/GHC/HsToCore/Pmc/Solver/Types.hs 4 additions, 2 deletionscompiler/GHC/HsToCore/Pmc/Solver/Types.hs
- testsuite/tests/pmcheck/should_compile/T20631.hs 24 additions, 0 deletionstestsuite/tests/pmcheck/should_compile/T20631.hs
- testsuite/tests/pmcheck/should_compile/all.T 2 additions, 0 deletionstestsuite/tests/pmcheck/should_compile/all.T
Loading
Please register or sign in to comment