Test Trac #11611
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 26 Feb 2016 17:45:18 +0000 (17:45 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 26 Feb 2016 17:45:18 +0000 (17:45 +0000)
testsuite/tests/polykinds/T11611.hs [new file with mode: 0644]
testsuite/tests/polykinds/T11611.stderr [new file with mode: 0644]
testsuite/tests/polykinds/all.T

diff --git a/testsuite/tests/polykinds/T11611.hs b/testsuite/tests/polykinds/T11611.hs
new file mode 100644 (file)
index 0000000..e4ee977
--- /dev/null
@@ -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 (file)
index 0000000..15d4749
--- /dev/null
@@ -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)’
index b426f0e..d48d108 100644 (file)
@@ -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, [''])