summaryrefslogtreecommitdiff
path: root/testsuite/tests/dependent
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2022-05-04 11:33:33 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-05-04 16:15:34 -0400
commit934a90dd6a34d2d1100506795d5f76cd20e2c599 (patch)
tree561c17ba9967acec60db33c2f050c87a3c183848 /testsuite/tests/dependent
parentd61f742876bdf2cd32e76f7bca389106ad99a316 (diff)
downloadhaskell-934a90dd6a34d2d1100506795d5f76cd20e2c599.tar.gz
Improve error reporting in generated code
Our error reporting in generated code (via desugaring before typechecking) only worked when the generated code was just a simple call. This commit makes it work in nested cases.
Diffstat (limited to 'testsuite/tests/dependent')
-rw-r--r--testsuite/tests/dependent/should_fail/T15859.stderr3
-rw-r--r--testsuite/tests/dependent/should_fail/T15859a.stderr4
2 files changed, 4 insertions, 3 deletions
diff --git a/testsuite/tests/dependent/should_fail/T15859.stderr b/testsuite/tests/dependent/should_fail/T15859.stderr
index be25e98708..9779cb5f1a 100644
--- a/testsuite/tests/dependent/should_fail/T15859.stderr
+++ b/testsuite/tests/dependent/should_fail/T15859.stderr
@@ -4,5 +4,6 @@ T15859.hs:9:19: error:
forall k -> k -> *
(GHC does not yet support this)
• In an expression type signature: forall k -> k -> Type
- In the expression: undefined :: forall k -> k -> Type
In the expression: (undefined :: forall k -> k -> Type) @Int
+ In an equation for ‘a’:
+ a = (undefined :: forall k -> k -> Type) @Int
diff --git a/testsuite/tests/dependent/should_fail/T15859a.stderr b/testsuite/tests/dependent/should_fail/T15859a.stderr
index 491733c7b9..2d04f8d1fa 100644
--- a/testsuite/tests/dependent/should_fail/T15859a.stderr
+++ b/testsuite/tests/dependent/should_fail/T15859a.stderr
@@ -1,8 +1,8 @@
T15859a.hs:19:26: error:
• Expected kind ‘k0’, but ‘A’ has kind ‘forall k -> k -> *’
- Cannot instantiate unification variable ‘k0’
+ • Cannot instantiate unification variable ‘k0’
with a kind involving polytypes: forall k -> k -> *
• In the first argument of ‘KindOf’, namely ‘A’
In an expression type signature: KindOf A
- In the expression: undefined :: KindOf A
+ In the expression: (undefined :: KindOf A) @Int