[GHC] #12435: Turn "No alternatives for a case scrutinee not known to diverge for sure" into a warning

GHC ghc-devs at haskell.org
Tue Jul 26 09:43:39 UTC 2016


#12435: Turn "No alternatives for a case scrutinee not known to diverge for sure"
into a warning
-------------------------------------+-------------------------------------
           Reporter:  nomeata        |             Owner:
               Type:  task           |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 This was discussed in the context of #10180, #11290 and Phab:D851; let’s
 focus on this here.

 In changeset:a0678f1f0e62496c108491e1c80d5eef3936474a/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 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''.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12435>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list