Unit 6. Organizing code and building projects
Congratulations! You’ve made it through the most challenging topics in the book. Starting with this unit, the rest of this book focuses on practical uses of the topics we’ve covered so far. After you’re finished, you should be comfortable building a wide range of common programming projects in Haskell.
In this unit, you’ll look at a topic that will be familiar if you’re an experienced programmer: organizing code and building projects. Haskell still has some fun tricks up its sleeve, but nothing that’s as strange as you’ve experienced on your journey to get here.
You’ll start this unit learning about Haskell’s module system. Surprisingly, there’s nothing strange or unique about the purpose of Haskell’s modules. Just as in any other programming language, they serve to group functions into a single namespace and help organize reusable code. After that, you’ll learn about Haskell’s build system: stack. Again, stack is a typical, though solid, build system used to help automate the building of projects. The one interesting, but not particularly challenging, topic we’ll cover is Haskell’s QuickCheck testing library. QuickCheck automatically generates test cases for your code based on a set of properties that you define.