[GHC] #14546: -Woverlapping-patterns warns on wrong patterns for Int

GHC ghc-devs at haskell.org
Sun Jun 3 12:18:54 UTC 2018


#14546: -Woverlapping-patterns warns on wrong patterns for Int
-------------------------------------+-------------------------------------
        Reporter:  Lemming           |                Owner:  sighingnow
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.2.2
  checker)                           |             Keywords:
      Resolution:  fixed             |  PatternMatchWarnings
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Incorrect         |            Test Case:
  error/warning at compile-time      |  deSugar/should_compile/T14546a,
                                     |  deSugar/should_compile/T14546b,
                                     |  deSugar/should_compile/T14546c
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4571
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by jrp):

 It is probably this patch that breaks test T14547

 {{{
 cd "./T14547.run" &&  "/home/jrp/Projects/ghc/inplace/test   spaces/ghc-
 stage2" -c T14547.hs -dcore-lint -dcmm-lint -no-user-package-db -rtsopts
 -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-
 color=never -fno-diagnostics-show-caret -dno-debug-output  -Wincomplete-
 patterns
 Actual stderr output differs from expected:
 diff -uw "/dev/null" "./T14547.run/T14547.comp.stderr.normalised"
 --- /dev/null   2018-06-02 19:10:04.172693400 +0100
 +++ ./T14547.run/T14547.comp.stderr.normalised  2018-06-03
 13:14:15.645102495 +0100
 @@ -0,0 +1,4 @@
 +
 +T14547.hs:14:9: warning: [-Wincomplete-patterns (in -Wextra)]
 +    Pattern match(es) are non-exhaustive
 +    In an equation for ‘foo’: Patterns not matched: []
 *** unexpected failure for T14547(normal)

 Unexpected results from:
 TEST="T14547"
 }}}

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


More information about the ghc-tickets mailing list