summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2016-11-22 10:35:28 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2016-11-25 17:46:50 +0000
commitf0f468262d8b3932de0ce79f4fd98fecf51a62a3 (patch)
treee310630ec7c1c949f490ac814a8ac84dc75526bf /testsuite
parentc1b4b76931a58c59e5b269477e38db659cf7aea8 (diff)
downloadhaskell-f0f468262d8b3932de0ce79f4fd98fecf51a62a3.tar.gz
Test Trac #12867
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/indexed-types/should_fail/T12867.hs10
-rw-r--r--testsuite/tests/indexed-types/should_fail/T12867.stderr12
-rw-r--r--testsuite/tests/indexed-types/should_fail/all.T1
3 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/T12867.hs b/testsuite/tests/indexed-types/should_fail/T12867.hs
new file mode 100644
index 0000000000..e4a39ce56e
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/T12867.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE ConstraintKinds #-}
+{-# LANGUAGE FlexibleContexts #-}
+
+module T12866 where
+
+type Test2 a = (Eq (TestM a))
+
+class Test a where
+ type TestM :: *
diff --git a/testsuite/tests/indexed-types/should_fail/T12867.stderr b/testsuite/tests/indexed-types/should_fail/T12867.stderr
new file mode 100644
index 0000000000..e712c49c4f
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/T12867.stderr
@@ -0,0 +1,12 @@
+
+T12867.hs:7:21: error:
+ • Expecting one fewer arguments to ‘TestM’
+ Expected kind ‘k0 -> *’, but ‘TestM’ has kind ‘*’
+ • In the first argument of ‘Eq’, namely ‘TestM a’
+ In the type ‘Eq (TestM a)’
+ In the type declaration for ‘Test2’
+
+T12867.hs:9:1: error:
+ • The associated type ‘TestM’
+ mentions none of the type or kind variables of the class ‘Test a’
+ • In the class declaration for ‘Test’
diff --git a/testsuite/tests/indexed-types/should_fail/all.T b/testsuite/tests/indexed-types/should_fail/all.T
index 4b0e994610..8c243440dc 100644
--- a/testsuite/tests/indexed-types/should_fail/all.T
+++ b/testsuite/tests/indexed-types/should_fail/all.T
@@ -139,3 +139,4 @@ test('T7788', normal, compile_fail, [''])
test('T11450', normal, compile_fail, [''])
test('T12041', normal, compile_fail, [''])
test('T12522a', normal, compile_fail, [''])
+test('T12867', normal, compile_fail, [''])