... | ... | @@ -172,6 +172,16 @@ Foo.hs:11:10: warning: [-Wredundant-record-wildcards] |
|
|
|
|
|
To fix the warnings, simply remove the uses of `..`, as neither use is necessary.
|
|
|
|
|
|
### Improvements to pattern match checking with user-defined COMPLETE sets
|
|
|
|
|
|
Previously, the user guide specified a couple of heuristics to define how pattern match warnings with user-defined COMPLETE sets are handled. Now these heuristics (and surprising behavior such as in #13363) are gone and it should "just work". This means that potentially more and more accurate warnings are generated, which might lead to compilation errors with `-Werror`.
|
|
|
|
|
|
An example from the wild is [this catch-all match](https://github.com/kolmodin/binary/blob/722622d8dbb3497b56b1a21b591602cde6c35567/src/Data/Binary/Class.hs#L981) which is now correctly flagged as redundant, because `Con'`, `App` and `Fun` form a COMPLETE set.
|
|
|
|
|
|
Deletion of redundant matches should always get rid of the warning without introducing new inexhaustiveness warnings (or, worse, introducing inexhaustiveness crashes at runtime without producing a warning).
|
|
|
|
|
|
Apart from that, redundancy checking around pattern guards improved, all while the performance of the checker increased.
|
|
|
|
|
|
---
|
|
|
|
|
|
## Library changes
|
... | ... | |