diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2017-07-29 19:35:52 -0400 |
---|---|---|
committer | Ryan Scott <ryan.gl.scott@gmail.com> | 2017-07-29 19:35:52 -0400 |
commit | f839b9de18a9f795e438314bea9f17e594afa354 (patch) | |
tree | 745cebc6f1209367a854580b32f25d40284950da | |
parent | d1ef223cfebd23c25489a4b0c67fbaa2f91c1ec6 (diff) | |
download | haskell-f839b9de18a9f795e438314bea9f17e594afa354.tar.gz |
Add regression test for #14055
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T14055.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T14055.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/all.T | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T14055.hs b/testsuite/tests/typecheck/should_fail/T14055.hs new file mode 100644 index 0000000000..996c33be1c --- /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 0000000000..19e4d59112 --- /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 e31c7eea7e..d865c76718 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, ['']) |