summaryrefslogtreecommitdiff
path: root/testsuite/tests/dependent
diff options
context:
space:
mode:
authorAlfredo Di Napoli <alfredo@well-typed.com>2021-07-14 08:50:22 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-07-21 02:46:13 -0400
commit06d1ca856d3374bf8dac952740cfe4cef76a350d (patch)
treeb9ae2c342dca4457445b3da4dc30730043791ff3 /testsuite/tests/dependent
parent9eb1641e0ef10a7887e794d4d114c9a18a2fd265 (diff)
downloadhaskell-06d1ca856d3374bf8dac952740cfe4cef76a350d.tar.gz
Refactor SuggestExtension constructor in GhcHint
This commit refactors the SuggestExtension type constructor of the GhcHint to be more powerful and flexible. In particular, we can now embed extra user information (essentially "sugar") to help clarifying the suggestion. This makes the following possible: Suggested fix: Perhaps you intended to use GADTs or a similar language extension to enable syntax: data T where We can still give to IDEs and tools a `LangExt.Extension` they can use, but in the pretty-printed message we can tell the user a bit more on why such extension is needed. On top of that, we now have the ability to express conjuctions and disjunctons, for those cases where GHC suggests to enable "X or Y" and for the cases where we need "X and Y".
Diffstat (limited to 'testsuite/tests/dependent')
-rw-r--r--testsuite/tests/dependent/should_fail/T16326_Fail7.stderr5
1 files changed, 3 insertions, 2 deletions
diff --git a/testsuite/tests/dependent/should_fail/T16326_Fail7.stderr b/testsuite/tests/dependent/should_fail/T16326_Fail7.stderr
index c5aba0b06d..edb1c1c8f5 100644
--- a/testsuite/tests/dependent/should_fail/T16326_Fail7.stderr
+++ b/testsuite/tests/dependent/should_fail/T16326_Fail7.stderr
@@ -1,5 +1,6 @@
T16326_Fail7.hs:9:13: error:
Illegal symbol ‘forall’ in type
- Perhaps you intended to use RankNTypes or a similar language
- extension to enable explicit-forall syntax: forall <tvs>. <type>
+ Suggested fix:
+ Perhaps you intended to use RankNTypes
+ or a similar language extension to enable explicit-forall syntax: forall <tvs>. <type>