[GHC] #11806: GHC does not warn for mistakenly empty case

GHC ghc-devs at haskell.org
Sat Apr 9 15:58:34 UTC 2016


#11806: GHC does not warn for mistakenly empty case
-------------------------------------+-------------------------------------
        Reporter:  dfeuer            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
      Resolution:                    |             Keywords:
                                     |  PatternMatchWarnings
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC accepts       |  Unknown/Multiple
  invalid program                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #10746, #7669,    |  Differential Rev(s):
  #11390                             |
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by nomeata):

 gkaracha, you are right that dfeuer’s working is unfortunate. He probably
 should have said “inhabited by a value” (in contrast to “inhabited by ⊥”).

 I don’t follow your argument about `silly1` and your conclusion. I would
 say that an empty case should issue an warning whenever the type has a
 constructor (and in with GADTs, if GHC cannot prove this constructor to
 have an impossible type).

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


More information about the ghc-tickets mailing list