
#8710: Overlapping patterns warning misplaced -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 7.7 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: | Differential Rev(s): Phab:D1910, Wiki Page: | Phab:D1920 -------------------------------------+------------------------------------- Comment (by bgamari): So to be clear, I believe that given a function with redundant patterns, {{{#!hs module Bug where hello _ = "world" hello 1 = "turtle" hello 2 = "frog" }}} Phab:D1910 will provide a warning like, {{{ Bug.hs:3:1: Warning: Pattern match(es) are overlapped In an equation for ‘hello’: hello 1 = ... hello 2 = ... }}} whereas Phab:D1920 will provide, {{{ Bug.hs:3:1: Warning: Pattern match is overlapped In an equation for ‘hello’: hello 1 = ... Bug.hs:4:1: Warning: Pattern match is overlapped In an equation for ‘hello’: hello 2 = ... }}} Is this right George? The former seems more user friendly to me -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8710#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler