Turn "No alternatives for a case scrutinee not known to diverge for sure" into a warning
This was discussed in the context of #10180 (closed), #11290 (closed) and D851; let’s focus on this here.
In changeset:a0678f1f/ghc we introduced a lint error that would abort compilation if there is an empty case with a scrutinee not known to diverge for sure. It is then nature of such a test that it is never complete (we’d solve the halting problem). Occasionally, when working on other parts of the code, together with other transformations (such as CSE), we get Core code that does not pass the test, even though the scrutinee is diverging.
Whenever it occurs, we have to find out why needs to be done to make the test pass again, e.g. by ensuring that CSE cse’s things in the right order, or whatnot. This slows down development (e.g. I cannot test my work on #12368 (closed) on the auto-builders because of this).
It feels wrong to me to give a necessarily non-complete test such a high priority. I therefore propose to turn this check into a lint warning.
Trac metadata
Trac field | Value |
---|---|
Version | 8.1 |
Type | Task |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | simonpj |
Operating system | |
Architecture |