[commit: ghc] master: Test Trac #12867 (f0f4682)

git at git.haskell.org git at git.haskell.org
Fri Nov 25 17:47:26 UTC 2016


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

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

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

commit f0f468262d8b3932de0ce79f4fd98fecf51a62a3
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Tue Nov 22 10:35:28 2016 +0000

    Test Trac #12867


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

f0f468262d8b3932de0ce79f4fd98fecf51a62a3
 testsuite/tests/indexed-types/should_fail/T12867.hs     | 10 ++++++++++
 testsuite/tests/indexed-types/should_fail/T12867.stderr | 12 ++++++++++++
 testsuite/tests/indexed-types/should_fail/all.T         |  1 +
 3 files changed, 23 insertions(+)

diff --git a/testsuite/tests/indexed-types/should_fail/T12867.hs b/testsuite/tests/indexed-types/should_fail/T12867.hs
new file mode 100644
index 0000000..e4a39ce
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/T12867.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE ConstraintKinds #-}
+{-# LANGUAGE FlexibleContexts #-}
+
+module T12866 where
+
+type Test2 a = (Eq (TestM a))
+
+class Test a where
+    type TestM :: *
diff --git a/testsuite/tests/indexed-types/should_fail/T12867.stderr b/testsuite/tests/indexed-types/should_fail/T12867.stderr
new file mode 100644
index 0000000..e712c49
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/T12867.stderr
@@ -0,0 +1,12 @@
+
+T12867.hs:7:21: error:
+    • Expecting one fewer arguments to ‘TestM’
+      Expected kind ‘k0 -> *’, but ‘TestM’ has kind ‘*’
+    • In the first argument of ‘Eq’, namely ‘TestM a’
+      In the type ‘Eq (TestM a)’
+      In the type declaration for ‘Test2’
+
+T12867.hs:9:1: error:
+    • The associated type ‘TestM’
+      mentions none of the type or kind variables of the class ‘Test a’
+    • In the class declaration for ‘Test’
diff --git a/testsuite/tests/indexed-types/should_fail/all.T b/testsuite/tests/indexed-types/should_fail/all.T
index 4b0e994..8c24344 100644
--- a/testsuite/tests/indexed-types/should_fail/all.T
+++ b/testsuite/tests/indexed-types/should_fail/all.T
@@ -139,3 +139,4 @@ test('T7788', normal, compile_fail, [''])
 test('T11450', normal, compile_fail, [''])
 test('T12041', normal, compile_fail, [''])
 test('T12522a', normal, compile_fail, [''])
+test('T12867', normal, compile_fail, [''])



More information about the ghc-commits mailing list