diff options
author | George Karachalias <george.karachalias@gmail.com> | 2016-02-25 15:50:35 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-02-25 17:18:27 +0100 |
commit | 67393977489942ef41f4f7d4a77076c15db18b92 (patch) | |
tree | e0be5926c048bb2fd1c8b6970723df9d08392b65 /testsuite/tests/pmcheck | |
parent | 073e20ebda73309173b6b6e3ea10164e8808cc79 (diff) | |
download | haskell-67393977489942ef41f4f7d4a77076c15db18b92.tar.gz |
(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
Diffstat (limited to 'testsuite/tests/pmcheck')
-rw-r--r-- | testsuite/tests/pmcheck/should_compile/pmc003.stderr | 5 | ||||
-rw-r--r-- | testsuite/tests/pmcheck/should_compile/pmc004.stderr | 5 | ||||
-rw-r--r-- | testsuite/tests/pmcheck/should_compile/pmc005.stderr | 7 |
3 files changed, 10 insertions, 7 deletions
diff --git a/testsuite/tests/pmcheck/should_compile/pmc003.stderr b/testsuite/tests/pmcheck/should_compile/pmc003.stderr index 4006b0c042..f1561730a3 100644 --- a/testsuite/tests/pmcheck/should_compile/pmc003.stderr +++ b/testsuite/tests/pmcheck/should_compile/pmc003.stderr @@ -1,3 +1,4 @@ -pmc003.hs:6:1: warning: - Pattern match(es) have inaccessible right hand side + +pmc003.hs:7:1: warning: + Pattern match has inaccessible right hand side In an equation for ‘f’: f True False = ... diff --git a/testsuite/tests/pmcheck/should_compile/pmc004.stderr b/testsuite/tests/pmcheck/should_compile/pmc004.stderr index 53f590dd4e..37f85d5938 100644 --- a/testsuite/tests/pmcheck/should_compile/pmc004.stderr +++ b/testsuite/tests/pmcheck/should_compile/pmc004.stderr @@ -1,3 +1,4 @@ -pmc004.hs:15:1: warning: - Pattern match(es) have inaccessible right hand side + +pmc004.hs:16:1: warning: + Pattern match has inaccessible right hand side In an equation for ‘h’: h _ G1 = ... diff --git a/testsuite/tests/pmcheck/should_compile/pmc005.stderr b/testsuite/tests/pmcheck/should_compile/pmc005.stderr index 940dd3a1e9..ddb4af92ee 100644 --- a/testsuite/tests/pmcheck/should_compile/pmc005.stderr +++ b/testsuite/tests/pmcheck/should_compile/pmc005.stderr @@ -1,7 +1,8 @@ -pmc005.hs:11:1: warning: - Pattern match(es) have inaccessible right hand side - In an equation for ‘foo’: foo _ TList = ... pmc005.hs:11:1: warning: Pattern match(es) are non-exhaustive In an equation for ‘foo’: Patterns not matched: TBool TBool + +pmc005.hs:12:1: warning: + Pattern match has inaccessible right hand side + In an equation for ‘foo’: foo _ TList = ... |