https://lhbg-book.link 1. 1. About this book 2. 2. Hello world 3. 3. Building an HTML printer library 4. 1. 3.1. Flexible HTML content (functions) 2. 3.2. Adding type signatures 3. 3.3. Embedded Domain Specific Languages 4. 3.4. Safer HTML construction with types 5. 3.5. Preventing incorrect use with modules 6. 3.6. Escaping characters 7. 3.7. Exposing internal functionality (Internal modules) 8. 3.8. Exercises 9. 3.9. Summary 5. 4. Custom markup language 6. 1. 4.1. Representing the markup language as a Haskell data type 2. 4.2. Parsing markup part 01 (Recursion) 3. 4.3. Displaying the parsing results (type classes) 4. 4.4. Parsing markup part 02 (Pattern matching) 7. 5. Gluing things together 8. 1. 5.1. Converting Markup to HTML 2. 5.2. Working with IO 3. 5.3. Defining a project description 4. 5.4. Fancy options parsing 9. 6. Handling errors and multiple files 10. 1. 6.1. Handling errors with Either 2. 6.2. Either with IO? 3. 6.3. Exceptions 4. 6.4. Lets code already! 5. 6.5. Summary 11. 7. Passing an environment 12. 8. Writing tests 13. 9. Generating documentation 14. 10. Recap 15. 16. Where to go next 17. Frequently asked questions * Light (default) * Rust * Coal * Navy * Ayu Learn Haskell by building a blog generator [ ] About this book Note: This book is still fairly new. If you find errors, please let me know. In this book we will implement a simple static blog generator in Haskell, converting documents written in our own custom markup language to HTML. We will: 1. Implement a tiny HTML printer library 2. Define and parse our own custom markup language 3. Read files and glue things together 4. Add command line arguments parsing 5. Write tests and documentation In each chapter of the book we will focus on a particular task we wish to achieve, and through the chapter we'll learn just enough Haskell to complete the task. Why should you read this book? There are many Haskell tutorials, guides and books out there. Why read this one? Pros There are probably more, but here are a few possible pros: * It's relatively short - most Haskell books out there are hundreds of pages long. This book (when exported to PDF) is roughly 150 pages long. * It's project oriented. Many Haskell books teach Haskell by teaching the underlying concepts and features in a neat progression. In this book we try to build a program, and learn Haskell on the way. This will be a pro to some, and a con to others. There are other tutorials like this. The most notable ones are Beginning Haskell and Haskell via Sokoban. * It touches on important topics such as design patterns, testing and documentation. * It's online, which means corrections are easy to make. * It's free. Cons There are probably more, but here are a few possible cons: * It may lack depth - many, much longer Haskell tutorials are long because they go deeper into the nuts and bolts of each feature. * It may not cover as many features or techniques as other tutorials - we try to cover features as they pop up in our implementation, but we will probably miss features that aren't as important for our tasks, while other resources may try to cover many different use cases. * It is very new and not "battle-tested". Who knows if this is a good approach to learning Haskell? Maybe you could help with that! * It doesn't have a technical editor, making the book not as good as it could've been. Other learning resources The haskell.org/documentation page lists many tutorials, books, guides and courses. You can find a few alternatives that I can recommend in this list.