Add regression test for #14055
authorRyan Scott <ryan.gl.scott@gmail.com>
Sat, 29 Jul 2017 23:35:52 +0000 (19:35 -0400)
committerRyan Scott <ryan.gl.scott@gmail.com>
Sat, 29 Jul 2017 23:35:52 +0000 (19:35 -0400)
testsuite/tests/typecheck/should_fail/T14055.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/T14055.stderr [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/all.T

diff --git a/testsuite/tests/typecheck/should_fail/T14055.hs b/testsuite/tests/typecheck/should_fail/T14055.hs
new file mode 100644 (file)
index 0000000..996c33b
--- /dev/null
@@ -0,0 +1,6 @@
+{-# LANGUAGE DataKinds, TypeFamilies #-}
+
+newtype X = RollX (() -> X)
+
+type family F t :: X where
+    F t = RollX (t -> ())
diff --git a/testsuite/tests/typecheck/should_fail/T14055.stderr b/testsuite/tests/typecheck/should_fail/T14055.stderr
new file mode 100644 (file)
index 0000000..19e4d59
--- /dev/null
@@ -0,0 +1,6 @@
+
+T14055.hs:6:18: error:
+    • Expected kind ‘() -> X’, but ‘t -> ()’ has kind ‘*’
+    • In the first argument of ‘RollX’, namely ‘(t -> ())’
+      In the type ‘RollX (t -> ())’
+      In the type family declaration for ‘F’
index e31c7ee..d865c76 100644 (file)
@@ -453,3 +453,4 @@ test('T11672', normal, compile_fail, [''])
 test('T13819', normal, compile_fail, [''])
 test('T11963', normal, compile_fail, [''])
 test('T14000', normal, compile_fail, [''])
+test('T14055', normal, compile_fail, [''])