Master Haskell Programming with Free Books

Haskell Books

Haskell is a standardized, general-purpose, polymorphically statically typed, lazy, purely functional language, very different from many programming languages. Recent innovations include static polymorphic typing, higher-order functions, user-definable algebraic data types, a module system, and more. It has built-in concurrency and parallelism, debuggers, profilers, rich libraries and an active community, with approximately 5,400 third-party open source libraries and tools.

This is a mature programming language with the first version defined in 1990. It has a strong, static type system based on Hindley–Milner type inference. The main implementation of Haskell is the Glasgow Haskell Compiler (GHC), an open source native code compiler.

Haskell offers many advantages to programmers. It helps rapid application development with shorter, clearer code, and higher reliability. It’s suitable for a variety of applications, and often used in academia and industry.

The focus of this article is to select the finest open source Haskell books which help programmers master this language, and develop an in-depth understanding of the benefits that this programming language offers. All of the books are available to download without payment.

We publish a series covering the best open source programming books for other popular languages. Read them here.

Real World Haskell is an easy-to-use, fast-moving tutorial that introduces the reader to functional programming with Haskell.

The reader learns how to use Haskell in a variety of practical ways, from short scripts to large and demanding applications. Real World Haskell takes you through the basics of functional programming at a brisk pace, and then helps you increase your understanding of Haskell in real-world issues like I/O, performance, dealing with data, concurrency, and more as you move through each chapter.

Chapters cover:

Getting started

Types and functions – provides an overview of Haskell’s type system, and much of its syntax. It covers some common basic types, function application, useful composite data types: lists and tuples, functions over lists and tuples, function types and purity, Haskell source files and writing simple functions, understanding evaluation by example, and polymorphism in Haskell

Functional programming – a simple command line framework, a built-in function lines to split a text string on line boundaries, infix functions, working with lists, how to think about loops, anonymous (lambda) functions, partial function application and currying, as-patterns, and code reuse through composition

Writing a library: working with JSON data – develop a small, but complete, Haskell library

Using typeclasses – learn about the need for typeclasses and how to use them. The authors talk about defining their own typeclasses and then cover some of the important typeclasses that are defined in the Haskell library. Finally, the reader is showed how to have the Haskell compiler automatically derive instances ocf certain typeclasses for their types

Input and output – simple, standard-looking I/O, then discusses some of the more powerful options as well as provide more detail on how I/O fits into the pure, lazy, functional Haskell world

I/O case study: a library for searching the filesystem – develop a library that gives us many of find’s capabilities, without leaving Haskell. The authors explore several different approaches to writing this library, each with different strengths

Code case study: parsing a binary data format

Testing and quality assurance – how to use QuickCheck to establish invariants in code and then re-examine the pretty printer developed in previous chapters, testing it with QuickCheck. The authors also see how to guide the testing process with GHC’s code coverage tool: HPC

Barcode recognition – make use of the image parsing library developed in the code cast study to build a barcode recognition application

Data structures – looks at association lists, maps, and different data structures, with some extended examples

Monads – provide a powerful way to build computations with effects. This chapter illustrates how monads are useful tools to help solve practical problems

Learn You a Haskell for Great Good! is an illustrated guide to this complex functional language. Packed with the author’s original artwork, pop culture references, and most importantly, useful example code, this book teaches functional fundamentals in a way you thought impossible.

Chapters cover:

Introduction

Starting Out – includes an introduction to lists, texas ranges, and tuples

Types and Typeclasses – understanding the type system

Syntax in Functions – explores some of Haskell’s constructs including pattern matching and let bindings

Recursion – takes a closer look at recursive functions, why they are important to Haskell and how we can work out very concise and elegant solutions to problems by thinking recursively

Functionally Solving Problems – takes a look at a few interesting problems and how to think functionally

Functors, Applicative Functors and Monoids – takes a closer look at functors, along with slightly stronger and more useful versions of functors called applicative functors. The reader also explores monoids

A Fistful of Monads – learn about monads, which are beefed up applicative functors, much like applicative functors are beefed up functors

For a Few Monads More – learn about a few other monads. See how they can make programs clearer by letting us treat all sorts of values as monadic ones

Zippers – see how we can take some data structure and focus on a part of it in a way that makes changing its elements easy and walking around it efficient

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

Developing Web Applications with Haskell and Yesod is a guide which introduces web application development with Haskell and Yesod, a potent language/web framework combination that supports high-performing applications that are modular, type-safe, and concise. The reader works with several samples to explore the way Yesod handles widgets, forms, persistence, and RESTful content. The reader also receives an introduction to various Haskell tools to supplement basic knowledge of the language.

After completing the book, the reader will have created a production-quality web application with Yesod’s ready-to-use scaffolding. Real-world examples, including a blog, a wiki, a JSON web service, and a Sphinx search server will have been examined.

Chapters cover:

Introduction – examines how Yesod aims to make web development easier by playing to the strengths of Haskell

Haskell – fills in some of the features of Haskell that are not covered in most introductory texts

Basics – gets the reader started with a simple Yesod application, and cover some of the basic concepts and terminology

About The Author

Steve Emms is the main author of OSSBlog.org. This site aims to promote open source software and hardware. Steve has written thousands of articles about open source software. He is also the creator of LinuxLinks.com.