summaryrefslogtreecommitdiff
path: root/testsuite/tests/gadt
diff options
context:
space:
mode:
authorGeorge Karachalias <george.karachalias@gmail.com>2016-02-25 15:50:35 +0100
committerBen Gamari <ben@smart-cactus.org>2016-02-25 17:18:27 +0100
commit67393977489942ef41f4f7d4a77076c15db18b92 (patch)
treee0be5926c048bb2fd1c8b6970723df9d08392b65 /testsuite/tests/gadt
parent073e20ebda73309173b6b6e3ea10164e8808cc79 (diff)
downloadhaskell-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/gadt')
-rw-r--r--testsuite/tests/gadt/T7294.stderr24
1 files changed, 12 insertions, 12 deletions
diff --git a/testsuite/tests/gadt/T7294.stderr b/testsuite/tests/gadt/T7294.stderr
index 94798403a5..a8ea17df80 100644
--- a/testsuite/tests/gadt/T7294.stderr
+++ b/testsuite/tests/gadt/T7294.stderr
@@ -1,12 +1,12 @@
-
-T7294.hs:23:1: warning:
- Pattern match(es) are redundant
- In an equation for ‘nth’: nth Nil _ = ...
-
-T7294.hs:25:5: warning:
- • Couldn't match type ‘'True’ with ‘'False’
- Inaccessible code in
- a pattern with constructor: Nil :: forall a. Vec a 'Zero,
- in an equation for ‘nth’
- • In the pattern: Nil
- In an equation for ‘nth’: nth Nil _ = undefined
+
+T7294.hs:25:1: warning:
+ Pattern match is redundant
+ In an equation for ‘nth’: nth Nil _ = ...
+
+T7294.hs:25:5: warning:
+ • Couldn't match type ‘'True’ with ‘'False’
+ Inaccessible code in
+ a pattern with constructor: Nil :: forall a. Vec a 'Zero,
+ in an equation for ‘nth’
+ • In the pattern: Nil
+ In an equation for ‘nth’: nth Nil _ = undefined