[commit: ghc] ghc-7.8: Test Trac #8985 (1e0dddd)

git at git.haskell.org git at git.haskell.org
Tue Apr 22 07:27:23 UTC 2014


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

On branch  : ghc-7.8
Link       : http://ghc.haskell.org/trac/ghc/changeset/1e0dddd7c96d1e7b89e6ac05bd0bfcc617e834ac/ghc

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

commit 1e0dddd7c96d1e7b89e6ac05bd0bfcc617e834ac
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Apr 14 13:06:22 2014 +0100

    Test Trac #8985
    
    (cherry picked from commit ff9f9a7f2e227fcda7b8a2f52ec8be66de2e76cd)


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

1e0dddd7c96d1e7b89e6ac05bd0bfcc617e834ac
 testsuite/tests/polykinds/T8985.hs |   16 ++++++++++++++++
 testsuite/tests/polykinds/all.T    |    1 +
 2 files changed, 17 insertions(+)

diff --git a/testsuite/tests/polykinds/T8985.hs b/testsuite/tests/polykinds/T8985.hs
new file mode 100644
index 0000000..28a354b
--- /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 8dc1181..3634d83 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, [''])



More information about the ghc-commits mailing list