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

GHC ghc-devs at haskell.org
Wed Jul 19 20:40:28 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 nomeata):

 The cleanest solution might be:

  * extend `CoreUtils.filterAlts` to filter out impossible alternatives,
 i.e. constructors with fields with an empty type and a bang pattern. This
 code already filters out constructors that are impossible for other
 reasons.
  * extend `CoreLint` to not complain when a `case` is empty for this
 particular reason.

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


More information about the ghc-tickets mailing list