This repo contains the examples for my Haskell book:
Updated 3/2/2017 to stack lts-8.3 (ghc-8.0.2)
Contents
Cover Material, Copyright, and License
Preface
A Request from the Author
Structure of the Book
Code Examples
Functional Programming Requires a Different Mind Set
Why Haskell?
Section 1 - Tutorial
Tutorial on Pure Haskell Programming
Interactive GHCi Shell
Using Parenthesis or the Special $ Character and Operator Precedence
Lazy Evaluation
Understanding List Comprehensions
Haskell Rules for Indenting Code
Understanding let and where
Conditional Statements and Anonymous Functions
Maps
Sets
More on Functions
Comments on Dealing With Immutable Data and How to Structure Programs
Error Handling
Testing Haskell Code
Tutorial on Impure Haskell Programming
Hello World Simple Main Program
Console IO
FileIO
Error Handling in Impure Code
Network IO
A More Detailed Look at Monads
List Comprehensions Using the do Notation
Using Mutable Maps
Mutable State Using the State Monad
Database Access for Sqlite
Database Access for Postgres
Dealing With Time
Writing CommandLine Applications in Haskell
Section 2 - Cookbook
Text Processing
CSV Spreadsheet Files
JSON Data
Cleaning Natural Languge Text
Natural Language Processing Tools
Resolve Entities in Text to DBPedia URIs
Bag of Words Classification Model
Text Summarization
Web Scraping
Haskell Libraries
Linked Data and the Semantic Web
Play a simple version of the Blackjack card game
Appendix A - Haskell Tools Setup
Stack
Emacs Setup
Do you want more of an IDE-like Development Environment?
hlint
See Appendix A in my book, or simply install stack and hlint.