Ticket #7328 (closed bug: fixed)
Seemingly inappropriate "expecting one more argument" error in polykinded class
Description
Triggered by the following code:
{-# LANGUAGE PolyKinds, GADTs #-}
data Proxy a
class Foo a where
foo :: a ~ f i => Proxy (Foo f)
GHC writes:
test.hs:6:34:
Expecting one more argument to `f'
In the type `a ~ f i => Proxy (Foo f)'
In the class declaration for `Foo'
It seems to me that given Foo :: forall k. k -> Constraint, Proxy :: forall k. k -> *, a :: k, f :: k1 -> k, that Foo in Proxy (Foo f) should be instantiated at k1 -> k, and Proxy at Constraint, and that this should work.
Change History
Note: See
TracTickets for help on using
tickets.
