no-title-yet
Attempts to familiarize myself with some terminology, without getting a PHD in type theory.
Functor
, Applicative
, Monad
, are interfaces, which may be implemented by types with kind (* -> *)
. We may want to say type constructor here, but one might be corrected on IRC that type constructors are a category of names Int
, Char
, Maybe
, Either
, StateT
, (->)
, IO
, etc. When we combine them, for example (Either Int)
, we don’t call this a type constructor, but rather an application, that is, Either
has been applied to Int
. We now have a type with kind Either Int
, which might be made an instance of Functor
. Indeed it does.
We also want to recall the hard to remember fact that the kind of a function is nullary. That is, if we have a type Int -> Bool
, this is a “proper type”, the kind is *
, it is a complete type. It has values. A type with a hole, like Maybe
, does not have values, and is at least unary, * -> *
.
What is the culmination of today’s readings? I wanted to be able to come up with phrases like, “Monoid
is an interface for unary kinded types.”