summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2019-05-16 19:41:46 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-05-29 10:39:05 -0400
commitf9d61ebbf4bba7862ae53c69b0f7116423b8f6d1 (patch)
treec2f63dc9f458ff4453c42d93ca778bd0b0ddb991 /testsuite/tests/typecheck/should_fail
parenta5b14ad4764c5596331dd5a0abf0b0f6df6b0053 (diff)
downloadhaskell-f9d61ebbf4bba7862ae53c69b0f7116423b8f6d1.tar.gz
In hole fits, don't show VTA for inferred variables (#16456)
We fetch the ArgFlag for every argument by using splitForAllVarBndrs instead of splitForAllTys in unwrapTypeVars.
Diffstat (limited to 'testsuite/tests/typecheck/should_fail')
-rw-r--r--testsuite/tests/typecheck/should_fail/T16456.hs7
-rw-r--r--testsuite/tests/typecheck/should_fail/T16456.stderr11
-rw-r--r--testsuite/tests/typecheck/should_fail/all.T1
3 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T16456.hs b/testsuite/tests/typecheck/should_fail/T16456.hs
new file mode 100644
index 0000000000..4257483c75
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T16456.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE PolyKinds #-}
+module T16456 where
+
+data T p = MkT
+
+foo :: T Int
+foo = _
diff --git a/testsuite/tests/typecheck/should_fail/T16456.stderr b/testsuite/tests/typecheck/should_fail/T16456.stderr
new file mode 100644
index 0000000000..fbc0cc6ed5
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T16456.stderr
@@ -0,0 +1,11 @@
+
+T16456.hs:7:7: error:
+ • Found hole: _ :: T Int
+ • In the expression: _
+ In an equation for ‘foo’: foo = _
+ • Relevant bindings include foo :: T Int (bound at T16456.hs:7:1)
+ Valid hole fits include
+ foo :: T Int (bound at T16456.hs:7:1)
+ MkT :: forall {k} (p :: k). T p
+ with MkT @Int
+ (defined at T16456.hs:4:12)
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index 962febd640..9e0ba2e455 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -514,5 +514,6 @@ test('T16255', normal, compile_fail, [''])
test('T16204c', normal, compile_fail, [''])
test('T16394', normal, compile_fail, [''])
test('T16414', normal, compile_fail, [''])
+test('T16456', normal, compile_fail, ['-fprint-explicit-foralls'])
test('T16627', normal, compile_fail, [''])
test('T502', normal, compile_fail, [''])