[GHC] #8494: Warn if a pattern guard obviates all others

GHC ghc-devs at haskell.org
Fri Nov 1 08:41:06 UTC 2013


#8494: Warn if a pattern guard obviates all others
-------------------------------------------------+-------------------------
        Reporter:  JohnWiegley                   |            Owner:
            Type:  feature request               |           Status:  new
        Priority:  normal                        |        Milestone:
       Component:  Compiler                      |          Version:  7.6.3
      Resolution:                                |         Keywords:
Operating System:  Unknown/Multiple              |     Architecture:
 Type of failure:  Incorrect warning at          |  Unknown/Multiple
  compile-time                                   |       Difficulty:
       Test Case:                                |  Unknown
        Blocking:                                |       Blocked By:
                                                 |  Related Tickets:
-------------------------------------------------+-------------------------

Comment (by hvr):

 Are you just interested in warning for the case of a reduced constant
 expression (such as `True`)? Or shall the compiler warn about dead code in
 general as soon as it is detected (in the case above, when compiling with
 -O, the following guards are optimized away when looking at Core)?

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


More information about the ghc-tickets mailing list