[GHC] #8710: Overlapping patterns warning misplaced

GHC ghc-devs at haskell.org
Thu Feb 25 16:16:46 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 Ben Gamari <ben@…>):

 In [changeset:"67393977489942ef41f4f7d4a77076c15db18b92/ghc"
 67393977/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="67393977489942ef41f4f7d4a77076c15db18b92"
 (Alternative way to) address #8710

 Issue a separate warning per redundant (or inaccessible) clause.
 This way each warning can have more precice location information
 (the location of the clause under consideration and not the whole
 match).

 I thought that this could be too much but actually the number of
 such warnings is bound by the number of cases matched against (in
 contrast to the non-exhaustive warnings which may be exponentially
 more).

 Test Plan: validate

 Reviewers: simonpj, austin, bgamari

 Reviewed By: bgamari

 Subscribers: thomie

 Differential Revision: https://phabricator.haskell.org/D1920

 GHC Trac Issues: #8710
 }}}

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


More information about the ghc-tickets mailing list