diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-07-12 17:20:22 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-07-12 17:20:22 +0100 |
commit | ad859f5c8de95465edbe1f5f174b56d771e8fc57 (patch) | |
tree | 0428ef944f86a0d05199ad0737e2e5268cde9f1d /testsuite | |
parent | 4968a28216a081c08cd29b38f91aaafbca75d3de (diff) | |
download | haskell-ad859f5c8de95465edbe1f5f174b56d771e8fc57.tar.gz |
Tests for Trac #7053
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/polykinds/T7053.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/polykinds/T7053.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/polykinds/T7053a.hs | 8 | ||||
-rw-r--r-- | testsuite/tests/polykinds/all.T | 2 |
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,['']) |