Fast Track to Haskell

2–5 days

A course targetting developers with knowledge in any programming language, but with no or just limited knowledge of Haskell. The course covers all the basics of the Haskell language, the Haskell type system, and the core libraries. The course does not merely show language features, but emphasizes the philosophy of Haskell and functional programming as well. It shows how programmers can use the type system to work for them and let it guide them in writing their programs, and it demonstrates how to systematically structure code (both with and without side-effects) in a language like Haskell.

Haskell being the prime example of a well-designed purely functional programming language, this course is also excellent for people who are generally interested in functional programming, but want to apply concepts of functional programming in other languages such as for example Scala or F#.

This course is designed such that it covers all the prerequisites of the other courses, and can therefore be combined with other courses.

Topics

An Overview of Haskell

  • A brief overview of all important Haskell concepts

Type-directed Programming

  • Pattern matching and function definitions
  • Basic datatypes: lists, Bool, tuples, Maybe
  • Defining new datatypes
  • Haskell syntax

Polymorphism and higher-order functions

  • Parametric polymorphism
  • Overloading and type classes
  • Basic type classes: Eq, Ord, Show, Read
  • Numeric types and classes
  • Higher-order functions: filter, map, …
  • Composing functions
  • Abstracting from design patterns: foldr, foldl, …
  • The Functor class
  • Haskell module system
  • Finite maps and sets

Input/Output

  • How to model side effects in Haskell
  • The IO type
  • Composing IO actions
  • How to separate IO code from “pure” code
  • do notation
  • IO-based libraries (random numbers, file IO, …)
  • Derived high-level IO functions

Testing (if time permits)

  • QuickCheck, a library for testing in Haskell
  • Properties as Haskell functions
  • Random test-case generation
  • How to debug code using QuickCheck
  • How QuickCheck works internally
  • Advanced ways to define properties
  • How to tweak test-case generation
  • The HPC (Haskell Program Coverage) tool

Applicative functors and Monads

  • Abstracting from common patterns
  • How Maybe-based code can be simplified
  • How explicit state passing can be modelled
  • The Applicative and Monad classes
  • More examples
  • IO as a monad
  • Library functions on applicatives and monads

Duration

The minimal duration of this course is two full days. The course can easily be extended to up to five days, by giving more time for additional exercises and examples, covering some of topics in more detail, and adding some additional topics.

If delivered remotely, it is typically advisable to spread out the course sessions over a few more days, to provide the opportunity for participants to work on exercises and get feedback on their work in between sessions.

Cost

The base price of this course is GBP 3000 (one lecturer, two days, on-site). The base price excludes VAT and any other applicable taxes as well as travel costs which depend on the location of the course venue.

Prices for extending the course or adding additional lecturers (for larger on-site groups) on request.

We offer on-site consulting in combination with on-site courses at a reduced daily rate.

If you are interested in this course, or for more information, please email us with as many details as possible.