diff options
Diffstat (limited to 'testsuite/tests/polykinds')
-rw-r--r-- | testsuite/tests/polykinds/T9200b.hs | 10 | ||||
-rw-r--r-- | testsuite/tests/polykinds/T9200b.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/polykinds/all.T | 1 |
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, ['']) |