summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2012-07-12 17:20:22 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2012-07-12 17:20:22 +0100
commitad859f5c8de95465edbe1f5f174b56d771e8fc57 (patch)
tree0428ef944f86a0d05199ad0737e2e5268cde9f1d /testsuite
parent4968a28216a081c08cd29b38f91aaafbca75d3de (diff)
downloadhaskell-ad859f5c8de95465edbe1f5f174b56d771e8fc57.tar.gz
Tests for Trac #7053
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/polykinds/T7053.hs7
-rw-r--r--testsuite/tests/polykinds/T7053.stderr6
-rw-r--r--testsuite/tests/polykinds/T7053a.hs8
-rw-r--r--testsuite/tests/polykinds/all.T2
4 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T7053.hs b/testsuite/tests/polykinds/T7053.hs
new file mode 100644
index 0000000000..4db1e0d7e9
--- /dev/null
+++ b/testsuite/tests/polykinds/T7053.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE PolyKinds #-}
+
+module T7053 where
+
+data TypeRep (a :: k) where
+ TyApp :: TypeRep a -> TypeRep b -> TypeRep (a b)
+
diff --git a/testsuite/tests/polykinds/T7053.stderr b/testsuite/tests/polykinds/T7053.stderr
new file mode 100644
index 0000000000..040a31e82f
--- /dev/null
+++ b/testsuite/tests/polykinds/T7053.stderr
@@ -0,0 +1,6 @@
+
+T7053.hs:6:52:
+ Expecting one more argument to `b'
+ In the type `TypeRep (a b)'
+ In the definition of data constructor `TyApp'
+ In the data declaration for `TypeRep'
diff --git a/testsuite/tests/polykinds/T7053a.hs b/testsuite/tests/polykinds/T7053a.hs
new file mode 100644
index 0000000000..f43f2f7602
--- /dev/null
+++ b/testsuite/tests/polykinds/T7053a.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE PolyKinds, GADTs #-}
+
+module T7053a where
+
+-- This time with a fully-specified kind signature
+data TypeRep (a :: k) :: * where
+ TyApp :: TypeRep a -> TypeRep b -> TypeRep (a b)
+
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index bec2cc11c5..6c8ef17111 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -54,3 +54,5 @@ test('T6137', normal, compile,[''])
test('T6093', normal, compile,[''])
test('T6049', normal, compile,[''])
test('T6129', normal, compile_fail,[''])
+test('T7053', normal, compile_fail,[''])
+test('T7053a', normal, compile,[''])