5.3. Type declaration

The stack type is given by the type declaration where lower case letters represent "any type", much like a template parameter in C++:

data Stack a = MakeStack [a]

So for instance, a stack of Strings would have the type:

Stack String

Furthermore, the right hand side of this declaration tells us that the concrete representation of a stack is a list of elements of any type (represented by [a]), and that a stack can be built with a constructor function MakeStack.