diff options
author | Sebastian Graf <sebastian.graf@kit.edu> | 2020-09-01 19:00:37 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-09-12 00:32:13 -0400 |
commit | 2a9422859e0c079aaa38bb9a760034f887501fce (patch) | |
tree | 571a816809930cf86fb302cd524fc050e9f045cc /testsuite/tests/pmcheck/complete_sigs/completesig04.stderr | |
parent | fb6e29e8d19deaf7581fdef14adc88a02573c83e (diff) | |
download | haskell-2a9422859e0c079aaa38bb9a760034f887501fce.tar.gz |
PmCheck: Disattach COMPLETE pragma lookup from TyCons
By not attaching COMPLETE pragmas with a particular TyCon and instead
assume that every COMPLETE pragma is applicable everywhere, we can
drastically simplify the logic that tries to initialise available
COMPLETE sets of a variable during the pattern-match checking process,
as well as fixing a few bugs.
Of course, we have to make sure not to report any of the
ill-typed/unrelated COMPLETE sets, which came up in a few regression
tests.
In doing so, we fix #17207, #18277 and #14422.
There was a metric decrease in #18478 by ~20%.
Metric Decrease:
T18478
Diffstat (limited to 'testsuite/tests/pmcheck/complete_sigs/completesig04.stderr')
-rw-r--r-- | testsuite/tests/pmcheck/complete_sigs/completesig04.stderr | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/testsuite/tests/pmcheck/complete_sigs/completesig04.stderr b/testsuite/tests/pmcheck/complete_sigs/completesig04.stderr index 21a6377ba3..a114d0199e 100644 --- a/testsuite/tests/pmcheck/complete_sigs/completesig04.stderr +++ b/testsuite/tests/pmcheck/complete_sigs/completesig04.stderr @@ -1,4 +1,11 @@ -completesig04.hs:6:1: error: - • Cannot form a group of complete patterns from patterns ‘Just’ and ‘L’ as they match different type constructors (‘Maybe’ resp. ‘E’) - • In {-# COMPLETE Just, L #-} +completesig04.hs:10:1: warning: [-Wincomplete-patterns (in -Wextra)] + Pattern match(es) are non-exhaustive + In an equation for ‘f’: + Patterns not matched: + B + C + +completesig04.hs:12:1: warning: [-Wincomplete-patterns (in -Wextra)] + Pattern match(es) are non-exhaustive + In an equation for ‘g’: Patterns not matched: Nothing |