[commit: ghc] master: Test Trac #8985 (ff9f9a7)

git at git.haskell.org git at git.haskell.org
Mon Apr 14 12:06:46 UTC 2014


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

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

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

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

    Test Trac #8985


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

ff9f9a7f2e227fcda7b8a2f52ec8be66de2e76cd
 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