diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-12-01 17:43:40 +0000 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-12-01 17:49:02 +0000 |
commit | 1ef6e7706c8ca12e79e68a0518289efcf7db3d6f (patch) | |
tree | 305a7f259e045088b975b49984a5745294c7fef0 /testsuite/tests/backpack/cabal | |
parent | b4cfa8e235715d8c73b2ba0ba05ed8ef92629218 (diff) | |
download | haskell-wip/t22483.tar.gz |
ApplicativeDo: Set pattern location before running exhaustiveness checkerwip/t22483
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/backpack/cabal')
0 files changed, 0 insertions, 0 deletions