Skip to content
Snippets Groups Projects
Commit ba7c8e59 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #10503

parent 72b21c39
No related merge requests found
{-# 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
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
......@@ -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, [''])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment