[commit: ghc] master: Test Trac #12174 (03b0b8e)

git at git.haskell.org git at git.haskell.org
Mon Oct 24 16:32:21 UTC 2016


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

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

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

commit 03b0b8e43ff43365fc52a92d8ff18558f4ee8202
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Oct 24 17:31:43 2016 +0100

    Test Trac #12174


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

03b0b8e43ff43365fc52a92d8ff18558f4ee8202
 testsuite/tests/dependent/should_fail/T12174.hs     | 9 +++++++++
 testsuite/tests/dependent/should_fail/T12174.stderr | 7 +++++++
 testsuite/tests/dependent/should_fail/all.T         | 1 +
 3 files changed, 17 insertions(+)

diff --git a/testsuite/tests/dependent/should_fail/T12174.hs b/testsuite/tests/dependent/should_fail/T12174.hs
new file mode 100644
index 0000000..29064d6
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T12174.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE ExistentialQuantification #-}
+{-# LANGUAGE KindSignatures #-}
+{-# LANGUAGE TypeInType #-}
+module T12174 where
+
+data V a
+data T = forall (a :: S). MkT (V a)
+data S = forall (a :: T). MkS (V a)
diff --git a/testsuite/tests/dependent/should_fail/T12174.stderr b/testsuite/tests/dependent/should_fail/T12174.stderr
new file mode 100644
index 0000000..8680461
--- /dev/null
+++ b/testsuite/tests/dependent/should_fail/T12174.stderr
@@ -0,0 +1,7 @@
+
+T12174.hs:9:23: error:
+    • Type constructor ‘T’ cannot be used here
+        (it is defined and used in the same recursive group)
+    • In the kind ‘T’
+      In the definition of data constructor ‘MkS’
+      In the data declaration for ‘S’
diff --git a/testsuite/tests/dependent/should_fail/all.T b/testsuite/tests/dependent/should_fail/all.T
index e2777a4..f1ed340 100644
--- a/testsuite/tests/dependent/should_fail/all.T
+++ b/testsuite/tests/dependent/should_fail/all.T
@@ -14,3 +14,4 @@ test('InferDependency', normal, compile_fail, [''])
 test('KindLevelsB', normal, compile_fail, [''])
 test('T11473', normal, compile_fail, [''])
 test('T11471', normal, compile_fail, [''])
+test('T12174', normal, compile_fail, [''])



More information about the ghc-commits mailing list