[commit: ghc] ghc-8.0: Test Trac #11611 (b213a84)

git at git.haskell.org git at git.haskell.org
Mon Feb 29 13:49:42 UTC 2016


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

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/b213a8435e886729ddac82f541a5de4ce0e76905/ghc

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

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

    Test Trac #11611
    
    (cherry picked from commit ef7b1d5efb17fdca14ee1269f79b9c08d4f8636f)


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

b213a8435e886729ddac82f541a5de4ce0e76905
 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 4500cfc..3a81766 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -141,3 +141,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