Test Trac #14110
authorSimon Peyton Jones <simonpj@microsoft.com>
Fri, 18 Aug 2017 13:50:57 +0000 (14:50 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Fri, 18 Aug 2017 13:51:19 +0000 (14:51 +0100)
testsuite/tests/polykinds/T14110.hs [new file with mode: 0644]
testsuite/tests/polykinds/T14110.stderr [new file with mode: 0644]
testsuite/tests/polykinds/all.T

diff --git a/testsuite/tests/polykinds/T14110.hs b/testsuite/tests/polykinds/T14110.hs
new file mode 100644 (file)
index 0000000..d2e8e71
--- /dev/null
@@ -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 (file)
index 0000000..aedfacb
--- /dev/null
@@ -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’
index 900faca..ddee253 100644 (file)
@@ -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, [''])