[commit: ghc] master: Test case for #10141 (dc587fe)

git at git.haskell.org git at git.haskell.org
Fri Apr 24 21:02:24 UTC 2015


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

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

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

commit dc587fe7f27e2bc762d8a6cae3687ca2ebbbdb9b
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Thu Apr 23 17:02:32 2015 -0400

    Test case for #10141


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

dc587fe7f27e2bc762d8a6cae3687ca2ebbbdb9b
 testsuite/tests/indexed-types/should_fail/T10141.hs     | 8 ++++++++
 testsuite/tests/indexed-types/should_fail/T10141.stderr | 6 ++++++
 testsuite/tests/indexed-types/should_fail/all.T         | 1 +
 3 files changed, 15 insertions(+)

diff --git a/testsuite/tests/indexed-types/should_fail/T10141.hs b/testsuite/tests/indexed-types/should_fail/T10141.hs
new file mode 100644
index 0000000..a2b3931
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/T10141.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE TypeFamilies, PolyKinds #-}
+
+module T10141 where
+
+type family G (a :: k) where
+   G Int  = Bool
+   G Bool = Int
+   G a    = a
diff --git a/testsuite/tests/indexed-types/should_fail/T10141.stderr b/testsuite/tests/indexed-types/should_fail/T10141.stderr
new file mode 100644
index 0000000..2cb2652
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/T10141.stderr
@@ -0,0 +1,6 @@
+
+T10141.hs:6:6: error:
+    The first argument of ‘G’ should have kind ‘k’,
+      but ‘Int’ has kind ‘*’
+    In the type ‘Int’
+    In the type family declaration for ‘G’
diff --git a/testsuite/tests/indexed-types/should_fail/all.T b/testsuite/tests/indexed-types/should_fail/all.T
index 2954458..6615c02 100644
--- a/testsuite/tests/indexed-types/should_fail/all.T
+++ b/testsuite/tests/indexed-types/should_fail/all.T
@@ -136,3 +136,4 @@ test('T6088', normal, compile_fail, [''])
 test('T7788', normal, compile_fail, [''])
 test('T8550', normal, compile_fail, [''])
 test('T9554', normal, compile_fail, [''])
+test('T10141', normal, compile_fail, [''])



More information about the ghc-commits mailing list