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

GHC ghc-devs at haskell.org
Thu Aug 6 14:40:06 UTC 2015


#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
              Keywords:              |  Operating System:  Unknown/Multiple
          Architecture:              |   Type of failure:  Incorrect
  Unknown/Multiple                   |  warning at compile-time
             Test Case:              |        Blocked By:
              Blocking:              |   Related Tickets:
Differential Revisions:              |
-------------------------------------+-------------------------------------
 I would expect GHC to warn of a non-exhaustive pattern match at compile-
 time when faced with this,

 {{{#!hs
 {-# LANGUAGE EmptyCase #-}
 module Test where

 test :: Bool -> Int
 test a = case a of
 }}}

 Yet it happily accepts this without complaint. If one attempts to
 evaluate, e.g., `test True` the expected "Non-exhaustive patterns in case"
 error is thrown at runtime.

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


More information about the ghc-tickets mailing list