(Alternative way to) address #8710
authorGeorge Karachalias <george.karachalias@gmail.com>
Thu, 25 Feb 2016 14:50:35 +0000 (15:50 +0100)
committerBen Gamari <ben@smart-cactus.org>
Thu, 25 Feb 2016 16:18:27 +0000 (17:18 +0100)
commit67393977489942ef41f4f7d4a77076c15db18b92
treee0be5926c048bb2fd1c8b6970723df9d08392b65
parent073e20ebda73309173b6b6e3ea10164e8808cc79
(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
20 files changed:
compiler/deSugar/Check.hs
testsuite/tests/deSugar/should_compile/T2395.stderr
testsuite/tests/deSugar/should_compile/T5117.stderr
testsuite/tests/deSugar/should_compile/ds002.stderr
testsuite/tests/deSugar/should_compile/ds003.stderr
testsuite/tests/deSugar/should_compile/ds019.stderr
testsuite/tests/deSugar/should_compile/ds020.stderr
testsuite/tests/deSugar/should_compile/ds022.stderr
testsuite/tests/deSugar/should_compile/ds043.stderr
testsuite/tests/deSugar/should_compile/ds051.stderr
testsuite/tests/deSugar/should_compile/ds056.stderr
testsuite/tests/deSugar/should_compile/ds058.stderr
testsuite/tests/driver/werror.stderr
testsuite/tests/gadt/T7294.stderr
testsuite/tests/ghci/scripts/Defer02.stderr
testsuite/tests/pmcheck/should_compile/pmc003.stderr
testsuite/tests/pmcheck/should_compile/pmc004.stderr
testsuite/tests/pmcheck/should_compile/pmc005.stderr
testsuite/tests/th/TH_repUnboxedTuples.stderr
testsuite/tests/typecheck/should_compile/T5490.stderr