[commit: ghc] master: Test Trac #14110 (61c4246)

git at git.haskell.org git at git.haskell.org
Fri Aug 18 13:51:38 UTC 2017


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

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

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

commit 61c42464d2f128403e2cd082b5c74f0dd7890452
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Fri Aug 18 14:50:57 2017 +0100

    Test Trac #14110


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

61c42464d2f128403e2cd082b5c74f0dd7890452
 testsuite/tests/polykinds/T14110.hs     | 9 +++++++++
 testsuite/tests/polykinds/T14110.stderr | 5 +++++
 testsuite/tests/polykinds/all.T         | 1 +
 3 files changed, 15 insertions(+)

diff --git a/testsuite/tests/polykinds/T14110.hs b/testsuite/tests/polykinds/T14110.hs
new file mode 100644
index 0000000..d2e8e71
--- /dev/null
+++ b/testsuite/tests/polykinds/T14110.hs
@@ -0,0 +1,9 @@
+{-# Language TypeFamilies, ScopedTypeVariables, PolyKinds, DataKinds #-}
+
+import Data.Kind
+
+class R (c :: k -> Constraint) where
+  type R_ (c :: k -> Constraint) :: k -> Type
+
+instance R Eq where
+  type R_ Eq a = a -> a -> Bool
diff --git a/testsuite/tests/polykinds/T14110.stderr b/testsuite/tests/polykinds/T14110.stderr
new file mode 100644
index 0000000..aedfacb
--- /dev/null
+++ b/testsuite/tests/polykinds/T14110.stderr
@@ -0,0 +1,5 @@
+
+T14110.hs:9:8: error:
+    • Number of parameters must match family declaration; expected 1
+    • In the type instance declaration for ‘R_’
+      In the instance declaration for ‘R Eq’
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index 900faca..ddee253 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -163,3 +163,4 @@ test('T13393', normal, compile_fail, [''])
 test('T13555', normal, compile_fail, [''])
 test('T13659', normal, compile_fail, [''])
 test('T13625', normal, compile_fail, [''])
+test('T14110', normal, compile_fail, [''])



More information about the ghc-commits mailing list