diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-12-01 17:43:40 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-12-02 01:22:48 -0500 |
commit | 74c767df770766d8d52e87b9ff7da10f94620a91 (patch) | |
tree | 5fad1240679760d2810652de2ba4422f69b7d6f8 /testsuite/tests/driver/FullGHCVersion.hs | |
parent | ce126993688e7ea803aee5b831655e318bde58d3 (diff) | |
download | haskell-74c767df770766d8d52e87b9ff7da10f94620a91.tar.gz |
ApplicativeDo: Set pattern location before running exhaustiveness checker
This improves the error messages of the exhaustiveness checker when
checking statements which have been moved around with ApplicativeDo.
Before:
Test.hs:2:3: warning: [GHC-62161] [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a pattern binding:
Patterns of type ‘Maybe ()’ not matched: Nothing
|
2 | let x = ()
| ^^^^^^^^^^
After:
Test.hs:4:3: warning: [GHC-62161] [-Wincomplete-uni-patterns]
Pattern match(es) are non-exhaustive
In a pattern binding:
Patterns of type ‘Maybe ()’ not matched: Nothing
|
4 | ~(Just res1) <- seq x (pure $ Nothing @())
|
Fixes #22483
Diffstat (limited to 'testsuite/tests/driver/FullGHCVersion.hs')
0 files changed, 0 insertions, 0 deletions