diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2014-04-14 13:06:22 +0100 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-04-22 01:22:59 -0500 |
commit | 1e0dddd7c96d1e7b89e6ac05bd0bfcc617e834ac (patch) | |
tree | 9cd927cbf65cbf6e7f053d44d5bf61cef93b0deb | |
parent | eefd614ae7ebe49bcf3df0d7ab1144a40e647bdf (diff) | |
download | haskell-1e0dddd7c96d1e7b89e6ac05bd0bfcc617e834ac.tar.gz |
Test Trac #8985
(cherry picked from commit ff9f9a7f2e227fcda7b8a2f52ec8be66de2e76cd)
-rw-r--r-- | testsuite/tests/polykinds/T8985.hs | 16 | ||||
-rw-r--r-- | testsuite/tests/polykinds/all.T | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T8985.hs b/testsuite/tests/polykinds/T8985.hs new file mode 100644 index 0000000000..28a354be27 --- /dev/null +++ b/testsuite/tests/polykinds/T8985.hs @@ -0,0 +1,16 @@ +{-# LANGUAGE DataKinds, PolyKinds, TypeFamilies, GADTs, TypeOperators #-} + +module T8905 where + +data X (xs :: [k]) = MkX +data Y :: (k -> *) -> [k] -> * where + MkY :: f x -> Y f (x ': xs) + +type family F (a :: [[*]]) :: * +type instance F xss = Y X xss + +works :: Y X '[ '[ ] ] -> () +works (MkY MkX) = () + +fails :: F '[ '[ ] ] -> () +fails (MkY MkX) = () diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T index 8dc11819a3..3634d83537 100644 --- a/testsuite/tests/polykinds/all.T +++ b/testsuite/tests/polykinds/all.T @@ -99,3 +99,4 @@ test('T8616', normal, compile_fail,['']) test('T8566a', expect_broken(8566), compile,['']) test('T7481', normal, compile_fail,['']) test('T8705', normal, compile, ['']) +test('T8985', normal, compile, ['']) |