[commit: ghc] master: Add regression test for #14055 (f839b9d)

git at git.haskell.org git at git.haskell.org
Sun Jul 30 00:04:13 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/f839b9de18a9f795e438314bea9f17e594afa354/ghc

>---------------------------------------------------------------

commit f839b9de18a9f795e438314bea9f17e594afa354
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Sat Jul 29 19:35:52 2017 -0400

    Add regression test for #14055


>---------------------------------------------------------------

f839b9de18a9f795e438314bea9f17e594afa354
 testsuite/tests/typecheck/should_fail/T14055.hs     | 6 ++++++
 testsuite/tests/typecheck/should_fail/T14055.stderr | 6 ++++++
 testsuite/tests/typecheck/should_fail/all.T         | 1 +
 3 files changed, 13 insertions(+)

diff --git a/testsuite/tests/typecheck/should_fail/T14055.hs b/testsuite/tests/typecheck/should_fail/T14055.hs
new file mode 100644
index 0000000..996c33b
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T14055.hs
@@ -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
index 0000000..19e4d59
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/T14055.stderr
@@ -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’
diff --git a/testsuite/tests/typecheck/should_fail/all.T b/testsuite/tests/typecheck/should_fail/all.T
index e31c7ee..d865c76 100644
--- a/testsuite/tests/typecheck/should_fail/all.T
+++ b/testsuite/tests/typecheck/should_fail/all.T
@@ -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, [''])



More information about the ghc-commits mailing list