[GHC] #8710: Overlapping patterns warning misplaced

GHC ghc-devs at haskell.org
Tue Feb 23 22:50:53 UTC 2016


#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 gkaracha):

 Replying to [comment:13 bgamari]:

 Phab:D1910 will actually provide the following:
 {{{
 Bug.hs:3:1: Warning:
     Pattern match(es) are overlapped
     In an equation for ‘hello’:
         hello 1 = ... (at Bug.hs:3:1)
         hello 2 = ... (at Bug.hs:4:1)
 }}}
 , since there are two redundant clauses. If there was just one it would
 omit the (at <location>)-part.

 From Phab:D1920, we will indeed get the warnings you mentioned.

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


More information about the ghc-tickets mailing list