15-312 Foundations of Programming Languages
Lecture 13: Recursive Types
After the discussion of universal types (for parametric polymorphism)
and existential types (for data abstraction), we now discuss recursive
types in order to model recursive data structures such as lists or
trees. We show how ML's
datatype construct can be thought
of as a composition of recursive types and existential types, to provide
some amount of abstraction.
Recursive types have some other interesting properties. For example,
in the absence of recursive expressions, all expressions in MinML
terminate unless we add recursive types.