[GHC] #10746: No non-exhaustive pattern match warning given for empty case analysis

GHC ghc-devs at haskell.org
Sun Apr 10 20:56:19 UTC 2016


#10746: No non-exhaustive pattern match warning given for empty case analysis
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.2
      Resolution:                    |             Keywords:
                                     |  PatternMatchWarnings
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  warning at compile-time            |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #7669, #11806     |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 To summarize, empty case is desugared specially. It therefore needs a
 special case for coverage checking, but ''not'' the trivial one we
 currently have. I suspect the right thing is probably to avoid including
 `_|_` in `mkInitialUncovered` when checking an empty `case`, whatever that
 involves. You may need to do something else if you want to catch an
 overlapping trivial pattern in since cases, but even if you miss that it's
 no big deal.

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


More information about the ghc-tickets mailing list