Test case for #10141
authorRichard Eisenberg <eir@cis.upenn.edu>
Thu, 23 Apr 2015 21:02:32 +0000 (17:02 -0400)
committerRichard Eisenberg <eir@cis.upenn.edu>
Fri, 24 Apr 2015 21:00:43 +0000 (17:00 -0400)
testsuite/tests/indexed-types/should_fail/T10141.hs [new file with mode: 0644]
testsuite/tests/indexed-types/should_fail/T10141.stderr [new file with mode: 0644]
testsuite/tests/indexed-types/should_fail/all.T

diff --git a/testsuite/tests/indexed-types/should_fail/T10141.hs b/testsuite/tests/indexed-types/should_fail/T10141.hs
new file mode 100644 (file)
index 0000000..a2b3931
--- /dev/null
@@ -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 (file)
index 0000000..2cb2652
--- /dev/null
@@ -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’
index 2954458..6615c02 100644 (file)
@@ -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, [''])