This highly intensive, highly practical 2-day Haskell course will provide you with the basic skills required to become productive
with Haskell. Join this course to learn Haskell's excellent capabilities for abstraction and how you can use Haskell to quickly develop correct programs that are close to a given specification.
At the center of the Haskell language is its type system: types that do not get in the way because they can be inferred; types that can be polymorphic and overloaded in various ways; types that explicitly tag functions with side-effects. Learn how these features make Haskell unique, even among functional languages, and learn all about functional language concepts, by understanding Haskell's uncompromising approach.
We will also cover how to use Haskell's excellent optimizing compiler, lots of tools and libraries for practical use, and an amazingly helpful community.
While we will touch on the theoretical foundations of the language, the focus of this Haskell course is most definitely practice: you will gain a true understanding on how to best harness and utilise Haskell's power! Upon completion of this Haskell course, you will be able to design robust functional programs in a principled and systematic way - the kind of things that are difficult to pick up from reading a book.
Day 1 - Haskell Quick Tour
We start with a Quick Tour that provides an overview of all important Haskell language concepts, illustrates them using some very simple examples, and gives a feel for the syntax of the language.
The rest of Day 1 will be used for a more in-depth look at the most important aspects of the language, focusing on:
Day 2 - Developing real-world applications in Haskell
- type-directed program development; i.e. how to start from the type signature and systematically come up with a structurally recursive function definition; how to use pattern matching;
- the most important Haskell datatypes, including base types, lists, option and union types (Maybe and Either);
- how to define your own datatypes;
- polymorphism and overloading; how type inference works, and what we can learn from looking at a type signature; the most important type classes and how to work with them;
- higher-order functions such as maps, lists and folds; how to use anonymous functions, currying and partial applications, and how this is connected with list comprehensions;
- an overview of the most fundamental libraries; where and how to find predefined functions and how to read Haskell API documentation.
The goal of Day 2 is to expand the view from the basics of the language towards developing real-world applications in Haskell. We will look at:
- Purity, explicit effects and IO; how Haskell separates effectful operations from functions that are free of side effects, and what this is useful for; how to build interactive programs; how to structure the code in the presence of effects;
- Tools and program structure; how to best use the available tools such as the compiler and the interpreter; how to use tools to check and improve the quality of your code; how the module and package systems work; how and where to find new packages and libraries; some further helpful tools for the Haskell developer.
- Testing; the QuickCheck library as an example of a domain-specific language that is embedded into Haskell and that uses type classes and incorporates a specific effect (randomness); an overview of other testing and debugging methods.
- Patterns for effects; introducing the Functor and Monad type classes by observing that many types have container-like properties, and that many types support a notion of sequencing; how to maintain state in a disciplined way; what can be gained by having an abstract Monad interface.