summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/polykinds/T16902.stderr2
-rw-r--r--testsuite/tests/polykinds/T17841.hs7
-rw-r--r--testsuite/tests/polykinds/T17841.stderr13
-rw-r--r--testsuite/tests/polykinds/all.T1
4 files changed, 22 insertions, 1 deletions
diff --git a/testsuite/tests/polykinds/T16902.stderr b/testsuite/tests/polykinds/T16902.stderr
index e265866119..2da3e41c36 100644
--- a/testsuite/tests/polykinds/T16902.stderr
+++ b/testsuite/tests/polykinds/T16902.stderr
@@ -1,6 +1,6 @@
T16902.hs:11:10: error:
- • Expected a type, but found something with kind ‘a1’
+ • Expected a type, but found something with kind ‘a’
• In the type ‘F a’
In the definition of data constructor ‘MkF’
In the data declaration for ‘F’
diff --git a/testsuite/tests/polykinds/T17841.hs b/testsuite/tests/polykinds/T17841.hs
new file mode 100644
index 0000000000..c728a11f02
--- /dev/null
+++ b/testsuite/tests/polykinds/T17841.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE PolyKinds #-}
+
+module T17841 where
+
+data Proxy a = Proxy
+
+class Foo (t :: k) where foo :: Proxy (a :: t)
diff --git a/testsuite/tests/polykinds/T17841.stderr b/testsuite/tests/polykinds/T17841.stderr
new file mode 100644
index 0000000000..975f5a11d0
--- /dev/null
+++ b/testsuite/tests/polykinds/T17841.stderr
@@ -0,0 +1,13 @@
+
+T17841.hs:7:40: error:
+ • Couldn't match kind ‘k’ with ‘*’
+ ‘k’ is a rigid type variable bound by
+ the class declaration for ‘Foo’
+ at T17841.hs:7:17
+ When matching kinds
+ k0 :: *
+ t :: k
+ Expected kind ‘t’, but ‘a’ has kind ‘k0’
+ • In the first argument of ‘Proxy’, namely ‘(a :: t)’
+ In the type signature: foo :: Proxy (a :: t)
+ In the class declaration for ‘Foo’
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index 4312691755..454be6fc62 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -215,3 +215,4 @@ test('T16342', normal, compile, [''])
test('T16263', normal, compile_fail, [''])
test('T16902', normal, compile_fail, [''])
test('CuskFam', normal, compile, [''])
+test('T17841', normal, compile_fail, [''])