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

GHC ghc-devs at haskell.org
Mon Apr 11 17:44:48 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):

 Oh, I see what you mean about recursively checking strict fields to some
 limit. That would be very nice, yes, but it's not urgent because there's a
 good way to work around it:

 {{{#!hs
 data SId a = SId !a

 --With recursive checking
 foo :: SId Void -> a
 foo bad = case bad of

 --Without recursive checking
 foo (SId bad) = absurd bad
 }}}


 What I don't understand is what you mean about unfolding something to
 WHNF. If the goal is to try to determine the actual WHNF of the scrutinee,
 that sounds like overkill to me, unless you're doing that in other cases
 already.

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


More information about the ghc-tickets mailing list