summaryrefslogtreecommitdiff
path: root/testsuite/tests/pmcheck/should_compile/pmc009.stderr
diff options
context:
space:
mode:
authorSebastian Graf <sebastian.graf@kit.edu>2020-11-18 10:29:25 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-11-18 23:38:40 -0500
commit8150f6546e6fd0006252e245d5697f13ffd8ce3e (patch)
treeacaeb469600a942f0541b94485e4587caba198d8 /testsuite/tests/pmcheck/should_compile/pmc009.stderr
parent52114fa0f97805d4c4924bc3abce1a8b0fc7a5c6 (diff)
downloadhaskell-8150f6546e6fd0006252e245d5697f13ffd8ce3e.tar.gz
PmCheck: Print types of uncovered patterns (#18932)
In order to avoid confusion as in #18932, we display the type of the match variables in the non-exhaustiveness warning, e.g. ``` T18932.hs:14:1: warning: [-Wincomplete-patterns] Pattern match(es) are non-exhaustive In an equation for ‘g’: Patterns of type ‘T a’, ‘T a’, ‘T a’ not matched: (MkT2 _) (MkT1 _) (MkT1 _) (MkT2 _) (MkT1 _) (MkT2 _) (MkT2 _) (MkT2 _) (MkT1 _) (MkT2 _) (MkT2 _) (MkT2 _) ... | 14 | g (MkT1 x) (MkT1 _) (MkT1 _) = x | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` It also allows us to omit the type signature on wildcard matches which we previously showed in only some situations, particularly `-XEmptyCase`. Fixes #18932.
Diffstat (limited to 'testsuite/tests/pmcheck/should_compile/pmc009.stderr')
-rw-r--r--testsuite/tests/pmcheck/should_compile/pmc009.stderr4
1 files changed, 3 insertions, 1 deletions
diff --git a/testsuite/tests/pmcheck/should_compile/pmc009.stderr b/testsuite/tests/pmcheck/should_compile/pmc009.stderr
index 9614f2497b..6f1849a25f 100644
--- a/testsuite/tests/pmcheck/should_compile/pmc009.stderr
+++ b/testsuite/tests/pmcheck/should_compile/pmc009.stderr
@@ -1,4 +1,6 @@
pmc009.hs:6:1: warning: [-Wincomplete-patterns (in -Wextra)]
Pattern match(es) are non-exhaustive
- In an equation for ‘addPatSynSelector’: Patterns not matched: L _ _
+ In an equation for ‘addPatSynSelector’:
+ Patterns of type ‘GenLocated l (HsBindLR idL idR)’ not matched:
+ L _ _