This textbook explains the basic principles of categorical type theory and the techniques used to derive categorical semantics for specific type theories. It introduces the reader to ordered set theory, lattices and domains, and this material provides plenty of examples for an introduction to category theory, which covers categories, functors, natural transformations, the Yoneda lemma, cartesian closed categories, limits, adjunctions and indexed categories. Four kinds of formal system are considered in detail, namely algebraic, functional, polymorphic functional, and higher order polymorphic functional type theory. For each of these the categorical semantics are derived and results about the type systems are proved categorically. Issues of soundness and completeness are also considered. Aimed at advanced undergraduates and beginning graduates, this book will be of interest to theoretical computer scientists, logicians and mathematicians specializing in category theory.
This is a good overview of category theory, and also contains an in-depth review of lattices (which are useful for understanding continuous functions, Scott domains, etc). A good portion of the book is devoted to working various proofs and examining results related to categories (there is a chapter on the Yoneda lemma, for example). I would not recommend this book as an introductory text to either type theory or category theory, and most of the later examples are very in-depth and non-trivial.