[GHC] #13990: Core Lint error on empty case

GHC ghc-devs at haskell.org
Sun Jul 23 14:46:59 UTC 2017


#13990: Core Lint error on empty case
-------------------------------------+-------------------------------------
        Reporter:  mbieleck          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.2.2
       Component:  Compiler          |              Version:  8.2.1-rc3
      Resolution:                    |             Keywords:  core-lint
                                     |  case
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Without reading all the commentary above:

 I conjecture that the only way to get this right is to come up with some
 datatype which serves as evidence that an empty case is acceptable. There
 may be several constructors of the datatype depending on why GHC believes
 the empty case, and we may need to do transformations to elements of this
 type during simplification, etc. In other words, it's all quite like what
 `Coercion` does for type equality. Then, Lint could check various
 invariants of the datatype. (Also known as typing rules.)

 Is this worth it? It certainly doesn't seem like it.

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


More information about the ghc-tickets mailing list