Test Trac #5716
authorSimon Peyton Jones <simonpj@microsoft.com>
Mon, 5 Mar 2012 17:10:33 +0000 (17:10 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Mon, 5 Mar 2012 17:10:33 +0000 (17:10 +0000)
testsuite/tests/polykinds/T5716.hs [new file with mode: 0644]
testsuite/tests/polykinds/T5716.stderr [new file with mode: 0644]
testsuite/tests/polykinds/all.T

diff --git a/testsuite/tests/polykinds/T5716.hs b/testsuite/tests/polykinds/T5716.hs
new file mode 100644 (file)
index 0000000..572de5e
--- /dev/null
@@ -0,0 +1,13 @@
+{-# LANGUAGE GADTs                      #-}
+{-# LANGUAGE TypeFamilies               #-}
+{-# LANGUAGE PolyKinds, DataKinds       #-}
+
+module T5716 where
+
+
+data family DF a 
+data instance DF Int = DFInt
+
+data U = U1 (DF Int)
+
+data I :: U -> * where I1 :: I (U1 DFInt)
diff --git a/testsuite/tests/polykinds/T5716.stderr b/testsuite/tests/polykinds/T5716.stderr
new file mode 100644 (file)
index 0000000..8839856
--- /dev/null
@@ -0,0 +1,6 @@
+
+T5716.hs:13:33:
+    `U1' of type `DF * Int -> U' is not promotable
+    In the type `I (U1 DFInt)'
+    In the definition of data constructor `I1'
+    In the data type declaration for `I'
index a13ca64..5767f8c 100644 (file)
@@ -28,4 +28,5 @@ test('T5717', normal, compile, [''])
 test('T5862', normal, compile, [''])
 test('T5912', normal, compile, [''])
 test('T5881', normal, run_command, ['$MAKE -s --no-print-directory T5881'])
+test('T5716', normal, compile_fail, [''])