What this book covers
Chapter 1, Functional Patterns – the Building Blocks, explores the three pillars of Haskell, that is, first-class functions, lazy evaluation, and the Haskell type system, through the lens of patterns and idioms. We will cover some Gang of Four OOP design patterns along the way.
Chapter 2, Patterns for I/O, explores three ways of streaming I/O, that is, imperative, lazy, and iteratee based. While you're at it, learn about the problem with lazy I/O, together with a solution.
Chapter 3, Patterns for Composition, traces the hierarchy formed by functor, applicative, arrow, and monad, with a focus on how these types compose. Synthesize functor, applicative, arrow, and monad in a single conceptual framework.
Chapter 4, Patterns of Folding and Traversing, demonstrates how fold and map are generalized by Foldable and Traversable, which in turn are unified in a broader context by functional lenses.
Chapter 5, Patterns of Type Abstraction, retraces the evolution of the Haskell type system, one key language extension at a time. We'll explore RankNtypes, existensial types, phantom types, GADTs, the type-case pattern, dynamic types, heterogeneous lists, multiparameter typeclasses, and functional dependencies.
Chapter 6, Patterns of Generic Programming, delves into patterns of generic programming, with a focus on datatype generic programming. We will taste three flavors of generic programming: sum of products generic programming, origami programming, and scrap your boilerplate.
Chapter 7, Patterns of Kind Abstraction, delves into the Haskell kind system and related language extensions: associated types, type families, kind polymorphism, and type promotion. We'll get a sense of type-level programming and then conclude by going to the edge of Haskell: diving into dependently-typed programming.