Training | Haskell Fundamentals

This training course is an overview of the basic concepts of Haskell for beginners.

haskell

Overview

Haskell is a powerful functional programming language for building solid systems and ambitious projects. This course has been designed to cover the fundamentals of the language and provide beginners with enough knowledge of its features to be successful in developing projects in Haskell.

Prerequisites

  • One year of experience with any Object-Oriented or Functional Programming language.

What you'll learn

As an introduction to programming in Haskell, we'll review the basics of:

Simple Constructs

  • Simple definitions
  • Definitions using pattern matching and guards
  • Local bindings with let and where
  • Pattern matching over lists, recursion
  • Higher-order functions: maps and folds
  • Anonymous functions and partial application

Algebraic data types and type classes

  • Record types, and record syntax
  • Enumerations
  • General shape of algebraic data types
  • Differences from OOP modeling
  • Polymorphic types: lists, trees
  • First-order type classes: Eq, Ord, Show
  • Automatic derivation

Input/output

  • Concept of purity and tagging with IO
  • do blocks: pure vs. impure values
  • Basic console and file input/output
  • Working with callbacks (example using network-simple)
  • Small introduction to streaming

Functional error handling

  • Maybe and Either as polymorphic types
  • Combinators to work on the happy path
  • Dealing with errors in IO: exceptions

Higher-kinded type classes: Functor and Monad

  • Looking at commonalities in maps -> Functor
  • Notion of type constructors and higher-kinded classes
  • Simulating stateful computations in Haskell
  • Looking at commonalities in bind -> Monad
  • Monadic utilities

Higher-kinded type classes: Applicative and Traversable

  • Applicative as generalizing map to n-ary functions
  • Applicative style programming
  • Generalizing map to mapM to traverse

Laziness

  • Execution model with thunks
  • Cyclic and infinite structures
  • Forcing execution to avoid leaks
  • IO, exceptions and laziness

Async, STM, streaming, resources

  • Spawning new computations with async
  • Concurrent execution, racing
  • Concurrent access with Software Transactional Memory
  • Managing single resources
  • Managing pools of resources

Combining Effects

  • Logging effects
  • Monadic classes and stacks
  • An algorithm with environment, state and logging
  • Integrating with IO effect

Skills

  • Collections
  • Statements
  • Functions
  • Type Classes

This Haskell Fundamentals includes:

  • Maximum Class Size of 15
  • Access to Academy EduTools Platform
  • Access to Course Materials
  • Certificate of Completion
  • Access to a Private Channel with Trainers in the Academy Slack
  • A Q&A session one week post-course
  • A pre-and-post meeting with our trainers