:kind! accepts unsaturated type aliases
Here's a ghci session:
> :set -XTypeFamilies -XPolyKinds > type family Id (a :: k) > type instance Id a = a > type Foo x = Maybe > :kind! Id Foo Id Foo :: * = Id Foo
I think the final
:kind! query should throw an error instead, complaining that
Foo hasn't been given enough arguments. (But even if you disagree, and think it should be allowed,
* is clearly not the right kind!)
Using a normal type alias in place of the type family for
Id also allows the query incorrectly, though it does at least report a sensible kind.
Although I think it shouldn't matter, I have checked with
-ignore-dot-ghci to make sure I haven't accidentally turned LiberalTypeSynonyms on.