summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2014-08-07 08:19:22 -0400
committerRichard Eisenberg <eir@cis.upenn.edu>2014-08-12 11:46:21 -0400
commit3dfd3c33a46ae01a45802cb5b97fe7a2c8a8f31a (patch)
treeb41c11de46714a4615ecde35c82fe1222356417d
parent64859308231551de2aed839003994b29b99409c0 (diff)
downloadhaskell-3dfd3c33a46ae01a45802cb5b97fe7a2c8a8f31a.tar.gz
Added more testing for #9200. (polykinds/T9200b)
-rw-r--r--testsuite/tests/polykinds/T9200b.hs10
-rw-r--r--testsuite/tests/polykinds/T9200b.stderr6
-rw-r--r--testsuite/tests/polykinds/all.T1
3 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T9200b.hs b/testsuite/tests/polykinds/T9200b.hs
new file mode 100644
index 0000000000..f780aba16a
--- /dev/null
+++ b/testsuite/tests/polykinds/T9200b.hs
@@ -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
index 0000000000..5e8c730878
--- /dev/null
+++ b/testsuite/tests/polykinds/T9200b.stderr
@@ -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’
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index abb158bc88..82c1824974 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -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, [''])