Do not bind coercion variables in SpecConstr rules
Trac #14270 showed that SpecConstr could cause nasty Lint failures if it generates a RULE that binds coercion varables. See * Note [SpecConstr and casts], and * the test simplCore/should_compile/T14270. This doesn't feel like the final word to me, because somehow the specialisation "ought" to work. So I left in a debug WARN to yell if the new check acutally fires. Meanwhile, it stops the erroneous specialisation. binding coercion
Showing
- compiler/specialise/SpecConstr.hs 42 additions, 2 deletionscompiler/specialise/SpecConstr.hs
- testsuite/tests/simplCore/should_compile/T14270a.hs 27 additions, 0 deletionstestsuite/tests/simplCore/should_compile/T14270a.hs
- testsuite/tests/simplCore/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/simplCore/should_compile/all.T
Please register or sign in to comment