summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-06-18 15:45:22 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2015-06-18 15:45:22 +0100
commitba7c8e5919411f84bdc84caa60317b0cb6c5cdc5 (patch)
treecc8b79066ce95e250ee45969f13572099a1582dc /testsuite/tests/polykinds
parent72b21c393831b49867a296f19a2d039e48bb8dcd (diff)
downloadhaskell-ba7c8e5919411f84bdc84caa60317b0cb6c5cdc5.tar.gz
Test Trac #10503
Diffstat (limited to 'testsuite/tests/polykinds')
-rw-r--r--testsuite/tests/polykinds/T10503.hs9
-rw-r--r--testsuite/tests/polykinds/T10503.stderr16
-rw-r--r--testsuite/tests/polykinds/all.T1
3 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T10503.hs b/testsuite/tests/polykinds/T10503.hs
new file mode 100644
index 0000000000..2cc1ee717e
--- /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 0000000000..e2817fe776
--- /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 76af3ecf00..95f0d8321a 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, [''])