Haskell/Kinds

Kinds for C++ users

 * * is any concrete type, including functions. These all have kind *:
 * * -> * is a template that takes one type argument. It is like a function from types to types: you plug a type in and the result is a type. Confusion can arise from the two uses of MyData (although you can give them different names if you wish) - the first is a type constructor, the second is a data constructor. These are equivalent to a class template and a constructor respectively in C++. Context resolves the ambiguity - where Haskell expects a type (e.g. in a type signature) MyData is a type constructor, where a value, it is a data constructor.


 * * -> * -> * is a template that takes two type arguments


 * (* -> *) -> * is a template that takes one template argument of kind (* -> *)