This two-day Haskell course gives you the chance to deepen your understanding and master some of Haskell's more advanced concepts.
In this course, you will learn all about Haskell's evaluation mechanism and how to debug performance problems. You will learn what techniques and data structures to use for the most idiomatic and best performing code. We will discuss abstractions offered for both concurrency and high-level, deterministic parallel programming, enabled by Haskell's explicit side effects. There will be an in-depth look at Haskell's type system, helping you to understand how types can guide the user on how to correctly use complex code, and how to design your own libraries that can be used safely by others.
In this course, you will learn all about:
- Haskell's evaluation mechanism and how to debug performance problems.
- Techniques and what data structures to use for getting the most idiomatic and best performing code.
- Abstractions offered for both concurrency and high-level, deterministic parallel programming, enabled by Haskell's explicit side effects.
- Haskell's type system, helping you to understand how types can guide the user on how to correctly use complex code, and how to design your own libraries that can be used safely by others.
The course will cover the following topics:
Functional data structures
- The difference between immutable (persistent) and mutable data structures.
- Typical functional data structures and their performance.
- Memory layout of Haskell data structures.
Reasoning about evaluation
- How lazy evaluation really works.
- The advantages and pitfalls of lazy evaluation.
- Profiling Haskell programs.
- Space leaks and how to fix them.
- General advice on how to write Haskell code that performs well.
Concurrency and parallelism
- Lightweight threads and communication between
threads.
- Software Transactional Memory for composable, lock-free concurrent
programs.
- Deterministic pure parallelism using the Par monad. Using Threadscope for debugging the performance of parallel code.
Programming patterns
- Abstracting from recurring patterns.
- Monads versus applicative functors.
- Traversals of data structures.
- How to write systematic compositional code on large user-defined datatypes.
- Stacking effects: how to combine monads.
- Monad transformers.
Type-level programming
- Haskell's kind system: the types of types.
- Higher-rank polymorphism.
- Generalized algebraic datatypes and existential types.
- How to use the powerful type system to capture complex invariants of your code and thereby eliminate sources of errors.