summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2014-01-16 18:12:49 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2014-01-17 14:06:26 +0000
commit45d825bb8ba659696788aca712b6f5d2b15a05cf (patch)
tree2e4ee6665301dc7f0b7c6c9f48629ba9ead2ff9c /testsuite
parent98db754a3209a48c79273b5752d006086c75f6ae (diff)
downloadhaskell-45d825bb8ba659696788aca712b6f5d2b15a05cf.tar.gz
Add an expect-broken test for Trac #8566
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/polykinds/T8566a.hs22
-rw-r--r--testsuite/tests/polykinds/all.T1
2 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T8566a.hs b/testsuite/tests/polykinds/T8566a.hs
new file mode 100644
index 0000000000..3d20c3e27d
--- /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 6d942d3c63..34253fd45d 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,[''])