summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/polykinds')
-rw-r--r--testsuite/tests/polykinds/T11648.hs8
-rw-r--r--testsuite/tests/polykinds/T11648b.hs7
-rw-r--r--testsuite/tests/polykinds/T11648b.stderr8
-rw-r--r--testsuite/tests/polykinds/T6039.stderr5
-rw-r--r--testsuite/tests/polykinds/all.T4
5 files changed, 31 insertions, 1 deletions
diff --git a/testsuite/tests/polykinds/T11648.hs b/testsuite/tests/polykinds/T11648.hs
new file mode 100644
index 0000000000..15fcfa4e05
--- /dev/null
+++ b/testsuite/tests/polykinds/T11648.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE PolyKinds, TypeOperators, TypeFamilies,
+ MultiParamTypeClasses #-}
+
+module T11648 where
+
+class Monoidy (to :: k0 -> k1 -> *) (m :: k1) where
+ type MComp to m :: k1 -> k1 -> k0
+ mjoin :: MComp to m m m `to` m
diff --git a/testsuite/tests/polykinds/T11648b.hs b/testsuite/tests/polykinds/T11648b.hs
new file mode 100644
index 0000000000..2ab27a6166
--- /dev/null
+++ b/testsuite/tests/polykinds/T11648b.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE TypeInType #-}
+
+module T11648b where
+
+import Data.Proxy
+
+data X (a :: Proxy k)
diff --git a/testsuite/tests/polykinds/T11648b.stderr b/testsuite/tests/polykinds/T11648b.stderr
new file mode 100644
index 0000000000..e709e006b0
--- /dev/null
+++ b/testsuite/tests/polykinds/T11648b.stderr
@@ -0,0 +1,8 @@
+
+T11648b.hs:7:1: error:
+ You have written a *complete user-suppled kind signature*,
+ but the following variable is undetermined: k0 :: *
+ Perhaps add a kind signature.
+ Inferred kinds of user-written variables:
+ k :: k0
+ a :: Proxy k
diff --git a/testsuite/tests/polykinds/T6039.stderr b/testsuite/tests/polykinds/T6039.stderr
new file mode 100644
index 0000000000..2ad2935e9b
--- /dev/null
+++ b/testsuite/tests/polykinds/T6039.stderr
@@ -0,0 +1,5 @@
+
+T6039.hs:5:14: error:
+ • Expecting one fewer argument to ‘j’
+ Expected kind ‘* -> *’, but ‘j’ has kind ‘*’
+ • In the kind ‘j k’
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index d48d1084ae..45981e9277 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -37,7 +37,7 @@ test('T6035', normal, compile, [''])
test('T6036', normal, compile, [''])
test('T6025', normal, run_command, ['$MAKE -s --no-print-directory T6025'])
test('T6002', normal, compile, [''])
-test('T6039', normal, compile, [''])
+test('T6039', normal, compile_fail, [''])
test('T6021', normal, compile_fail, [''])
test('T6020a', normal, compile, [''])
test('T6044', normal, compile, [''])
@@ -143,3 +143,5 @@ test('T11362', normal, compile, ['-dunique-increment=-1'])
# -dunique-increment=-1 doesn't work inside the file
test('T11399', normal, compile_fail, [''])
test('T11611', normal, compile_fail, [''])
+test('T11648', normal, compile, [''])
+test('T11648b', normal, compile_fail, [''])