summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2012-07-12 17:42:57 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2012-07-12 17:43:09 +0100
commitaab80f88e58e67cc8e1769b0f5bffab20d20c084 (patch)
treebfa6409dbd69a60eda727a9d37c62bcad2fd536c /testsuite/tests
parent8197fe804d515d6fff64aa86e662de283ae0fe90 (diff)
downloadhaskell-aab80f88e58e67cc8e1769b0f5bffab20d20c084.tar.gz
Test Trac #7020
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/polykinds/T7020.hs17
-rw-r--r--testsuite/tests/polykinds/all.T1
2 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T7020.hs b/testsuite/tests/polykinds/T7020.hs
new file mode 100644
index 0000000000..b67c1d8e63
--- /dev/null
+++ b/testsuite/tests/polykinds/T7020.hs
@@ -0,0 +1,17 @@
+{-# LANGUAGE KindSignatures, RankNTypes, PolyKinds, GADTs,
+ FlexibleContexts, DataKinds, TypeFamilies #-}
+
+module T7020 where
+
+import GHC.Exts
+
+data family Sing (a :: k)
+
+class SingKind (Any :: k) => SingI (s :: k) where
+ sing :: Sing s
+
+data SingInstance :: k -> * where
+ SingInstance :: SingI a => SingInstance a
+
+class (b ~ Any) => SingKind (b :: k) where
+ singInstance :: forall (a :: k). Sing a -> SingInstance a
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index 6c8ef17111..079671a139 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -56,3 +56,4 @@ test('T6049', normal, compile,[''])
test('T6129', normal, compile_fail,[''])
test('T7053', normal, compile_fail,[''])
test('T7053a', normal, compile,[''])
+test('T7020', normal, compile,[''])