11 Type system advances
This chapter covers
- Classifying program entities such as terms, types, and kinds
- Specifying code behavior with a bunch of type-level features
- Dealing with type errors
This chapter is devoted to programming at the level of types. We’ll explore a variety of Haskell features that makes it possible. As we’ve discussed earlier in this book, types help us to control software behavior and express our ideas on what the code should and shouldn’t do. Heavily typed code is highly resistant to some sorts of bugs. It also enables aggressive refactoring. If we do something wrong, the Haskell type checker would report that.
We’ll discuss features and techniques available to any Haskell programmer. While presenting them, I limit myself ...
Get Haskell in Depth now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.