summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2015-04-23 17:02:32 -0400
committerRichard Eisenberg <eir@cis.upenn.edu>2015-04-24 17:00:43 -0400
commitdc587fe7f27e2bc762d8a6cae3687ca2ebbbdb9b (patch)
treefc4605e7c3593da7041119612ae3663c40d11998
parentd4cf5591e51e2b91b3877a05f8153db1f5328994 (diff)
downloadhaskell-dc587fe7f27e2bc762d8a6cae3687ca2ebbbdb9b.tar.gz
Test case for #10141
-rw-r--r--testsuite/tests/indexed-types/should_fail/T10141.hs8
-rw-r--r--testsuite/tests/indexed-types/should_fail/T10141.stderr6
-rw-r--r--testsuite/tests/indexed-types/should_fail/all.T1
3 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/T10141.hs b/testsuite/tests/indexed-types/should_fail/T10141.hs
new file mode 100644
index 0000000000..a2b3931d28
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/T10141.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE TypeFamilies, PolyKinds #-}
+
+module T10141 where
+
+type family G (a :: k) where
+ G Int = Bool
+ G Bool = Int
+ G a = a
diff --git a/testsuite/tests/indexed-types/should_fail/T10141.stderr b/testsuite/tests/indexed-types/should_fail/T10141.stderr
new file mode 100644
index 0000000000..2cb2652388
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/T10141.stderr
@@ -0,0 +1,6 @@
+
+T10141.hs:6:6: error:
+ The first argument of ‘G’ should have kind ‘k’,
+ but ‘Int’ has kind ‘*’
+ In the type ‘Int’
+ In the type family declaration for ‘G’
diff --git a/testsuite/tests/indexed-types/should_fail/all.T b/testsuite/tests/indexed-types/should_fail/all.T
index 2954458780..6615c02198 100644
--- a/testsuite/tests/indexed-types/should_fail/all.T
+++ b/testsuite/tests/indexed-types/should_fail/all.T
@@ -136,3 +136,4 @@ test('T6088', normal, compile_fail, [''])
test('T7788', normal, compile_fail, [''])
test('T8550', normal, compile_fail, [''])
test('T9554', normal, compile_fail, [''])
+test('T10141', normal, compile_fail, [''])