'In Haskell, Can Kinds Be Anything Other Than a Sequence of Stars?

Please forgive me if this question is dumb.

While reading about Haskell kinds, I notice a theme:

*
* -> *
* -> * -> *

I get the impression that kinds in Haskell ultimately boil down to how many asterisks there are. You might say that the kind of a type is really just the number of types you need to apply to it before it becomes *. In other words, you could count all *'s but the last one, and define a type's kind by an integer. Say 0, 1, 2, etc.

Here's my question:

Is this a correct observation about Haskell's type system? Or does it allow something other than *'s to go where you typically see *'s? For example:

* -> a -> *

I imagine someone might want to do this to constrain type variables to have an instance of a type class, for example.

Functor a, Applicative b => * -> a -> b -> *

Is that a thing?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source