Chapter Exercises

Hangman game logic

I debated whether or not to include code snippets of full-fledged stack projects in this document. I’ve decided against it. It’s one thing to include self-contained modules as question answers, but if I were to, for example, include the Main.hs file for the hangman project here, there’d be some implicit dependencies like dict.txt and hangman.cabal, and if the past 524 pages of this book have taught me anything, implicit dependencies are bad news.

Upon further reflection, I’ve decided to axe essentially all code snippets from my notes. Code is much better in a type-checked source file than in a markdown file where it can diverge from it’s reference. I may add the snippets back if I figure out a clever way to get hakyll to auto-include them. For now I’ll just add links to the files on Github.