[commit: ghc] master: Add an expect-broken test for Trac #8566 (45d825b)

git at git.haskell.org git at git.haskell.org
Fri Jan 17 14:07:29 UTC 2014


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

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

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

commit 45d825bb8ba659696788aca712b6f5d2b15a05cf
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Jan 16 18:12:49 2014 +0000

    Add an expect-broken test for Trac #8566


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

45d825bb8ba659696788aca712b6f5d2b15a05cf
 testsuite/tests/polykinds/T8566a.hs |   22 ++++++++++++++++++++++
 testsuite/tests/polykinds/all.T     |    1 +
 2 files changed, 23 insertions(+)

diff --git a/testsuite/tests/polykinds/T8566a.hs b/testsuite/tests/polykinds/T8566a.hs
new file mode 100644
index 0000000..3d20c3e
--- /dev/null
+++ b/testsuite/tests/polykinds/T8566a.hs
@@ -0,0 +1,22 @@
+{-# LANGUAGE DataKinds                  #-}
+{-# LANGUAGE PolyKinds                  #-}
+{-# LANGUAGE TypeFamilies               #-}
+{-# LANGUAGE GADTs                      #-}
+{-# LANGUAGE ScopedTypeVariables        #-}
+{-# LANGUAGE TypeOperators              #-}
+module T8566a where
+
+data Field = forall k. APP k [Field]
+
+data InField (u :: Field) :: * where
+  A :: AppVars t (ExpandField args) -> InField (APP t args)
+
+type family ExpandField (args :: [Field]) :: [*]
+type family AppVars (t :: k) (vs :: [*]) :: *
+
+-- This function fails to compile, because we discard
+-- 'given' kind equalities.  See comment 7 in Trac #8566
+-- This is really a bug, I claim
+unA :: InField (APP t args) -> AppVars t (ExpandField args)
+unA (A x) = x
+
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index 6d942d3..34253fd 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -96,3 +96,4 @@ test('T8449', normal, run_command, ['$MAKE -s --no-print-directory T8449'])
 test('T8534', normal, compile, [''])
 test('T8566', normal, compile_fail,[''])
 test('T8616', normal, compile_fail,[''])
+test('T8566a', expect_broken(8566), compile,[''])



More information about the ghc-commits mailing list