diff options
author | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2022-10-24 22:34:55 +0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-10-26 12:17:14 -0400 |
commit | f60a1a62bf88ec787a5b5d1725129a24b6b81f4a (patch) | |
tree | f49fc1e2b34bb7b1ec833133cf5160bc0977a6af /testsuite/tests | |
parent | 9ab31f42da8796363187e387c4085e8c9197f4e5 (diff) | |
download | haskell-f60a1a62bf88ec787a5b5d1725129a24b6b81f4a.tar.gz |
Use TcRnVDQInTermType in noNestedForallsContextsErr (#20115)
When faced with VDQ in the type of a term, GHC generates the following
error message:
Illegal visible, dependent quantification in the type of a term
(GHC does not yet support this)
Prior to this patch, there were two ways this message could have been
generated and represented:
1. with the dedicated constructor TcRnVDQInTermType
(see check_type in GHC.Tc.Validity)
2. with the transitional constructor TcRnUnknownMessage
(see noNestedForallsContextsErr in GHC.Rename.Utils)
Not only this led to duplication of code generating the final SDoc,
it also made it tricky to track the origin of the error message.
This patch fixes the problem by using TcRnVDQInTermType exclusively.
Diffstat (limited to 'testsuite/tests')
3 files changed, 3 insertions, 3 deletions
diff --git a/testsuite/tests/dependent/should_fail/T16326_Fail6.stderr b/testsuite/tests/dependent/should_fail/T16326_Fail6.stderr index e4acd7a7fd..6790247a36 100644 --- a/testsuite/tests/dependent/should_fail/T16326_Fail6.stderr +++ b/testsuite/tests/dependent/should_fail/T16326_Fail6.stderr @@ -1,5 +1,5 @@ -T16326_Fail6.hs:9:12: error: +T16326_Fail6.hs:9:12: error: [GHC-51580] Illegal visible, dependent quantification in the type of a term (GHC does not yet support this) In the definition of data constructor ‘MkFoo’ diff --git a/testsuite/tests/dependent/should_fail/T16326_Fail8.stderr b/testsuite/tests/dependent/should_fail/T16326_Fail8.stderr index d7666cf84d..b464931e6e 100644 --- a/testsuite/tests/dependent/should_fail/T16326_Fail8.stderr +++ b/testsuite/tests/dependent/should_fail/T16326_Fail8.stderr @@ -1,5 +1,5 @@ -T16326_Fail8.hs:7:10: error: +T16326_Fail8.hs:7:10: error: [GHC-51580] Illegal visible, dependent quantification in the type of a term (GHC does not yet support this) In an instance declaration diff --git a/testsuite/tests/dependent/should_fail/T18271.stderr b/testsuite/tests/dependent/should_fail/T18271.stderr index 0bc21f394d..8d906b3b2d 100644 --- a/testsuite/tests/dependent/should_fail/T18271.stderr +++ b/testsuite/tests/dependent/should_fail/T18271.stderr @@ -1,5 +1,5 @@ -T18271.hs:7:19: error: +T18271.hs:7:19: error: [GHC-51580] Illegal visible, dependent quantification in the type of a term (GHC does not yet support this) In a deriving declaration |