Ticket #7282 (closed bug: fixed)
polykinds error: Found `k' but expected `k'
Description
{-# OPTIONS -XTypeFamilies -XDataKinds -XPolyKinds #-}
class Foo (xs :: [k]) where
type Bar xs :: *
instance Foo '[] where
type Bar '[] = Int
fails with:
I:\a.hs:7:5:
Type indexes must match class instance head
Found `k' but expected `k'
In the type instance declaration for `Bar'
In the instance declaration for `Foo '[]'
If I change the kind of xs from [k] to [*], the program is accepted.
Change History
Note: See
TracTickets for help on using
tickets.
