[commit: ghc] master: Test Trac #11611 (ef7b1d5)

git at git.haskell.org git at git.haskell.org
Fri Feb 26 17:43:36 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/ef7b1d5efb17fdca14ee1269f79b9c08d4f8636f/ghc

>---------------------------------------------------------------

commit ef7b1d5efb17fdca14ee1269f79b9c08d4f8636f
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Feb 26 17:45:18 2016 +0000

    Test Trac #11611


>---------------------------------------------------------------

ef7b1d5efb17fdca14ee1269f79b9c08d4f8636f
 testsuite/tests/polykinds/T11611.hs     | 8 ++++++++
 testsuite/tests/polykinds/T11611.stderr | 6 ++++++
 testsuite/tests/polykinds/all.T         | 1 +
 3 files changed, 15 insertions(+)

diff --git a/testsuite/tests/polykinds/T11611.hs b/testsuite/tests/polykinds/T11611.hs
new file mode 100644
index 0000000..e4ee977
--- /dev/null
+++ b/testsuite/tests/polykinds/T11611.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE DataKinds, StandaloneDeriving, TypeOperators, GADTs, FlexibleInstances #-}
+
+module T11611 where
+
+data A a where
+  A :: A (a:as) -> a -> A as
+
+deriving instance Show a => Show (A a)
diff --git a/testsuite/tests/polykinds/T11611.stderr b/testsuite/tests/polykinds/T11611.stderr
new file mode 100644
index 0000000..15d4749
--- /dev/null
+++ b/testsuite/tests/polykinds/T11611.stderr
@@ -0,0 +1,6 @@
+
+T11611.hs:8:37: error:
+    • Expected kind ‘[*]’, but ‘a’ has kind ‘*’
+    • In the first argument of ‘A’, namely ‘a’
+      In the first argument of ‘Show’, namely ‘A a’
+      In the stand-alone deriving instance for ‘Show a => Show (A a)’
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index b426f0e..d48d108 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -142,3 +142,4 @@ test('T11516', normal, compile_fail, [''])
 test('T11362', normal, compile, ['-dunique-increment=-1'])
   # -dunique-increment=-1 doesn't work inside the file
 test('T11399', normal, compile_fail, [''])
+test('T11611', normal, compile_fail, [''])



More information about the ghc-commits mailing list