summaryrefslogtreecommitdiff
path: root/testsuite/tests/dependent/should_fail
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2016-02-22 12:54:56 -0500
committerRichard Eisenberg <eir@cis.upenn.edu>2016-03-14 21:44:16 -0400
commite9bf7bb5cc9fb3f87dd05111aa23da76b86a8967 (patch)
tree7b8ccfa63aae3acce2ea00178572056b02c329ca /testsuite/tests/dependent/should_fail
parent18fbfa39104b92a05061ec5f6f5bf3b84b462605 (diff)
downloadhaskell-e9bf7bb5cc9fb3f87dd05111aa23da76b86a8967.tar.gz
Fix #11407.
This removes the `defer_me` check that was in checkTauTvUpdate and uses only a type family check instead. The old defer_me check repeated work done by fast_check in occurCheckExpand. There is also some error message improvement, necessitated by the terrible error message that the test case produced, even when it didn't consume all of memory. test case: dependent/should_fail/T11407 [skip ci]
Diffstat (limited to 'testsuite/tests/dependent/should_fail')
-rw-r--r--testsuite/tests/dependent/should_fail/T11407.hs10
-rw-r--r--testsuite/tests/dependent/should_fail/T11407.stderr8
-rw-r--r--testsuite/tests/dependent/should_fail/all.T1
3 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/dependent/should_fail/T11407.hs b/testsuite/tests/dependent/should_fail/T11407.hs
new file mode 100644
index 0000000000..533870f94b
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T11407.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE TypeInType #-}
+module T11407 where
+
+import Data.Kind
+
+type Const a b = a
+
+data family UhOh (f :: k1) (a :: k2) (b :: k3)
+data instance UhOh (f :: * -> * -> *) (a :: x a) (b :: Const * a) = UhOh
diff --git a/testsuite/tests/dependent/should_fail/T11407.stderr b/testsuite/tests/dependent/should_fail/T11407.stderr
new file mode 100644
index 0000000000..b5d95bf2a1
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T11407.stderr
@@ -0,0 +1,8 @@
+
+T11407.hs:10:40: error:
+ • Occurs check: cannot construct the infinite kind: k0 ~ x a
+ • In the second argument of ‘UhOh’, namely ‘(a :: x a)’
+ In the data instance declaration for ‘UhOh’
+ • Type variable kinds:
+ a :: k0
+ x :: k0 -> *
diff --git a/testsuite/tests/dependent/should_fail/all.T b/testsuite/tests/dependent/should_fail/all.T
index 8f9c9d0016..08f6cf653d 100644
--- a/testsuite/tests/dependent/should_fail/all.T
+++ b/testsuite/tests/dependent/should_fail/all.T
@@ -8,3 +8,4 @@ test('PromotedClass', normal, compile_fail, [''])
test('SelfDep', normal, compile_fail, [''])
test('BadTelescope4', normal, compile_fail, [''])
test('RenamingStar', normal, compile_fail, [''])
+test('T11407', normal, compile_fail, [''])