summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/tests/typecheck/should_compile/T12928.hs17
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
2 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T12928.hs b/testsuite/tests/typecheck/should_compile/T12928.hs
new file mode 100644
index 0000000000..55a7de7273
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T12928.hs
@@ -0,0 +1,17 @@
+{-# LANGUAGE DataKinds, PolyKinds #-}
+
+module T12928 where
+
+data P (a::k) = MkP
+
+data FffSym0 (l :: P a)
+
+-- Make sure that the kind of 'k' is not defaulted:
+--
+-- data FffSym0 (l :: P (a :: Type))
+--
+-- We expect kind polymorphism:
+--
+-- data FffSym0 (l :: P (a :: k))
+--
+type Inst (a :: P Either) (b :: P Maybe) = (FffSym0 a, FffSym0 b)
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index f7d92b6210..42f0480fd0 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -673,3 +673,4 @@ test('T13951', normal, compile, [''])
test('T16411', normal, compile, [''])
test('T16609', normal, compile, [''])
test('T505', normal, compile, [''])
+test('T12928', normal, compile, [''])