Haskell Tutorial and Cookbook

Haskell Tutorial and Cookbook

Mark Watson
Buy on Leanpub

Table of Contents

Haskell Tutorial and Cookbook

  • Cover Material, Copyright, and License
  • Preface
    • A Request from the Author
    • Structure of the Book
    • Code Examples
    • Functional Programming Requires a Different Mind Set
    • eBooks Are Living Documents
    • Setting Up Your Development Environment
    • Why Haskell?
    • Enjoy Yourself
    • Acknowledgements
  • Section 1 - Tutorial
  • Tutorial on Pure Haskell Programming
    • Interactive GHCi Shell
    • Introduction to Haskell Types
    • Functions Are Pure
    • Using Parenthesis or the Special $ Character and Operator Precedence
    • Lazy Evaluation
    • Understanding List Comprehensions
    • Haskell Rules for Indenting Code
    • Understanding let and where
    • Conditional do Expressions and Anonymous Functions
    • Maps
    • Sets
    • More on Functions
    • Comments on Dealing With Immutable Data and How to Structure Programs
    • Error Handling
    • Testing Haskell Code
    • Pure Haskell Wrap Up
  • Tutorial on Impure Haskell Programming
    • Hello IO () Monad
    • A Note About >> and >>= Operators
    • Console IO Example with Stack Configuration
    • File IO
    • Error Handling in Impure Code
    • Network IO
    • A Haskell Game Loop that Maintains State Functionally
    • A More Detailed Look at Monads
    • Using Applicative Operators <$> and <*>: Finding Common Words in Files
    • List Comprehensions Using the do Notation
    • Dealing With Time
    • Using Debug.Trace
    • Wrap Up
  • Section 2 - Cookbook
  • Using the OpenAI Large Language Model APIs in Haskell
    • Example Client Code
    • Adding a Simple Application: Find Place Names in Input Text
  • A Web Application For Using the Google Gemini APIs
    • Web App Wrap Up and a Description of Scotty Web Framework
  • Command Line Utility To Use the Google Gemini APIs
  • Command Line Tool to Use Local Ollama LLM Server
  • Using the Brave Search API
  • Text Processing
    • CSV Spreadsheet Files
    • JSON Data
    • Cleaning Natural Language Text
  • Natural Language Processing Tools
    • Resolve Entities in Text to DBPedia URIs
    • Bag of Words Classification Model
    • Text Summarization
    • Part of Speech Tagging
    • Natural Language Processing Wrap Up
  • Linked Data and the Semantic Web
    • The SPARQL Query Language
    • A Haskell HTTP Based SPARQL Client
    • Querying Remote SPARQL Endpoints
    • Linked Data and Semantic Web Wrap Up
  • Web Scraping
    • Web Scraping Wrap Up
  • Using Relational Databases
    • Database Access for Sqlite
    • Database Access for Postgres
  • Haskell Program to Play the Blackjack Card Game
  • Section 3 - Larger Projects
  • Knowledge Graph Creator
    • Code Layout For the KGCreator Project and strategies for sharing Haskell code between projects
    • The Main Event: Detecting Entities in Text
    • Utility Code for Generating RDF
    • Utility Code for Generating Cypher Input Data for Neo4J
    • Top Level API Code for Handling Knowledge Graph Data Generation
    • Wrap Up for Automating the Creation of Knowledge Graphs
  • Hybrid Haskell and Python Natural Language Processing
    • Example Use of the Haskell NLP Client
    • Setting up the Python NLP Server
    • Understanding the Haskell NLP Client Code
    • Wrap Up for Using the Python SpaCy NLP Service
  • Hybrid Haskell and Python For Coreference Resolution
    • Installing the Python Coreference Server
    • Understanding the Haskell Coreference Client Code
    • Key Points
    • Wrap Up for Using the Python Coreference NLP Service
  • Book Wrap Up
    • Using Haskell for Modern AI Applications
  • Appendix A - Haskell Tools Setup
    • stack
    • Emacs Setup
    • Do you want more of an IDE-like Development Environment?
    • hlint
Haskell Tutorial and Cookbook/overview

Haskell Tutorial and Cookbook

course_overview

Haskell cookbook and tutorial. A practical way to get started using Haskell that also provides many useful examples for use in your own projects.

count_chapters
begin_reading
download
p_implied_book_part_name

Haskell Tutorial and Cookbook23 chapters

Begin ›
  1. Cover Material, Copyright, and License

  2. Preface

  3. Section 1 - Tutorial

  4. Tutorial on Pure Haskell Programming

  5. Tutorial on Impure Haskell Programming

  6. Section 2 - Cookbook

  7. Using the OpenAI Large Language Model APIs in Haskell

  8. A Web Application For Using the Google Gemini APIs

  9. Command Line Utility To Use the Google Gemini APIs

  10. Command Line Tool to Use Local Ollama LLM Server

  11. Using the Brave Search API

  12. Text Processing

  13. Natural Language Processing Tools

  14. Linked Data and the Semantic Web

  15. Web Scraping

  16. Using Relational Databases

  17. Haskell Program to Play the Blackjack Card Game

  18. Section 3 - Larger Projects

  19. Knowledge Graph Creator

  20. Hybrid Haskell and Python Natural Language Processing

  21. Hybrid Haskell and Python For Coreference Resolution

  22. Book Wrap Up

  23. Appendix A - Haskell Tools Setup