id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
5769	Incorrect error message when compiling with PolyKinds and a type family	goldfire	dreixel	"When trying to compile

{{{
{-# LANGUAGE TypeFamilies,
             PolyKinds,
             ScopedTypeVariables
 #-}

convert :: a -> b
convert = undefined

type family Foo a

bar :: forall b a. b -> (Foo a)
bar f = (convert f :: (Foo a))
}}}

I get the following error message:
{{{
Sandbox.hs:12:10:
    Couldn't match type `Foo k a' with `Foo * b'
    NB: `Foo' is a type function, and may not be injective
    In the expression: (convert f :: Foo a)
    In an equation for `bar': bar f = (convert f :: Foo a)
}}}

However, this compiles just fine without {{{PolyKinds}}}."	bug	closed	high	7.6.1	Compiler (Type checker)	7.4.1-rc1	fixed	PolyKinds		Unknown/Multiple	Unknown/Multiple	GHC rejects valid program	Unknown	polykinds/T5770			#5717
