[commit: ghc] master: Test Trac #10503 (ba7c8e5)

git at git.haskell.org git at git.haskell.org
Thu Jun 18 14:45:24 UTC 2015


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

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

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

commit ba7c8e5919411f84bdc84caa60317b0cb6c5cdc5
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Thu Jun 18 15:45:22 2015 +0100

    Test Trac #10503


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

ba7c8e5919411f84bdc84caa60317b0cb6c5cdc5
 testsuite/tests/polykinds/T10503.hs     |  9 +++++++++
 testsuite/tests/polykinds/T10503.stderr | 16 ++++++++++++++++
 testsuite/tests/polykinds/all.T         |  1 +
 3 files changed, 26 insertions(+)

diff --git a/testsuite/tests/polykinds/T10503.hs b/testsuite/tests/polykinds/T10503.hs
new file mode 100644
index 0000000..2cc1ee7
--- /dev/null
+++ b/testsuite/tests/polykinds/T10503.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE RankNTypes, PolyKinds, DataKinds, TypeFamilies #-}
+module GHCBug where
+
+data Proxy p = Proxy
+
+data KProxy (a :: *) = KProxy
+
+h :: forall r . (Proxy ('KProxy :: KProxy k) ~ Proxy ('KProxy :: KProxy *) => r) -> r
+h = undefined
diff --git a/testsuite/tests/polykinds/T10503.stderr b/testsuite/tests/polykinds/T10503.stderr
new file mode 100644
index 0000000..e2817fe
--- /dev/null
+++ b/testsuite/tests/polykinds/T10503.stderr
@@ -0,0 +1,16 @@
+
+T10503.hs:8:6: error:
+    Couldn't match kind ‘k’ with ‘*’
+    ‘k’ is a rigid type variable bound by
+        the type signature for:
+        h :: ((Proxy 'KProxy ~ Proxy 'KProxy) => r) -> r
+        at T10503.hs:8:6
+    Expected type: Proxy 'KProxy
+      Actual type: Proxy 'KProxy
+    In the ambiguity check for the type signature for ‘h’:
+      h :: forall (k :: BOX) r.
+           ((Proxy 'KProxy ~ Proxy 'KProxy) => r) -> r
+    To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
+    In the type signature for ‘h’:
+      h :: forall r.
+           (Proxy (KProxy :: KProxy k) ~ Proxy (KProxy :: KProxy *) => r) -> r
diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T
index 76af3ec..95f0d83 100644
--- a/testsuite/tests/polykinds/all.T
+++ b/testsuite/tests/polykinds/all.T
@@ -117,3 +117,4 @@ test('T7908', normal, compile, [''])
 test('T10041', normal, compile, [''])
 test('T10451', normal, compile_fail, [''])
 test('T10516', normal, compile_fail, [''])
+test('T10503', normal, compile_fail, [''])



More information about the ghc-commits mailing list