Chapter 4. The Devil's in the Detail
In this chapter, we pull together knowledge and techniques from previous chapters and learn to apply those techniques in large and complex projects. In particular, we will use cabal-install
and stack to help us cope with multi-file projects and even projects with multiple subprojects. We learn how, and especially how not, to throw and recover from exceptions in Haskell.
Having good test coverage is as important in a Haskell project as it is in projects written in any other language. But because Haskell's type-system is so expressive, the number of necessary test cases is greatly reduced. Also, new extensions for the type-system in GHC are constantly being experimented with. Consequently, there is a bunch of language extensions considered more or less experimental, and some extensions are just not enabled by default yet in the current standard (Haskell 2010).
This chapter concludes the first part of this book. Already from the three...