Added more testing for #9200. (polykinds/T9200b)
authorRichard Eisenberg <eir@cis.upenn.edu>
Thu, 7 Aug 2014 12:19:22 +0000 (08:19 -0400)
committerRichard Eisenberg <eir@cis.upenn.edu>
Tue, 12 Aug 2014 15:46:21 +0000 (11:46 -0400)
testsuite/tests/polykinds/T9200b.hs [new file with mode: 0644]
testsuite/tests/polykinds/T9200b.stderr [new file with mode: 0644]
testsuite/tests/polykinds/all.T

diff --git a/testsuite/tests/polykinds/T9200b.hs b/testsuite/tests/polykinds/T9200b.hs
new file mode 100644 (file)
index 0000000..f780aba
--- /dev/null
@@ -0,0 +1,10 @@
+{-# LANGUAGE TypeFamilies, PolyKinds, DataKinds #-}
+
+module T9200b where
+
+---------
+--- test CUSK on closed type families
+type family F (a :: k) where
+  F True = False
+  F False = True
+  F x = x
diff --git a/testsuite/tests/polykinds/T9200b.stderr b/testsuite/tests/polykinds/T9200b.stderr
new file mode 100644 (file)
index 0000000..5e8c730
--- /dev/null
@@ -0,0 +1,6 @@
+
+T9200b.hs:8:5:
+    The first argument of ‘F’ should have kind ‘k’,
+      but ‘True’ has kind ‘Bool’
+    In the type ‘True’
+    In the type family declaration for ‘F’
index abb158b..82c1824 100644 (file)
@@ -107,3 +107,4 @@ test('T9264', normal, compile, [''])
 test('T9263', normal, run_command, ['$MAKE -s --no-print-directory T9263'])
 test('T9063', normal, compile, [''])
 test('T9200', normal, compile, [''])
+test('T9200b', normal, compile_fail, [''])