Haskell

Learn Haskell: pure functions, laziness, ADTs and type classes, Functor/Applicative/Monad, IO, STM concurrency, QuickCheck, parsers and web APIs.

Start course →

What you'll learn

  • Explain purity, laziness and Haskell's type system, and set up GHC, Cabal and GHCi.
  • Write functions with pattern matching, guards, recursion, folds and list comprehensions.
  • Model domains with algebraic data types, records, newtypes, type classes, Maybe and Either.
  • Use Functor, Applicative, Monad, Foldable and Traversable, and manage IO, exceptions and laziness.
  • Structure real programs with modules, Text, containers, mtl, STM and async concurrency.
  • Test with Hspec and QuickCheck, build parsers and JSON APIs, and apply advanced types and profiling wisely.

Syllabus

Getting Started with Haskell

  1. What Haskell Is and Why Learn It
  2. Installing GHC, Cabal, Stack and GHCi
  3. Expressions, Types and Functions

Lists, Pattern Matching and Recursion

  1. Lists, Ranges and Comprehensions
  2. Pattern Matching, Guards and case
  3. Recursion and Higher-Order Functions

Algebraic Data Types and Type Classes

  1. Algebraic Data Types and Records
  2. Type Classes and Instances
  3. Maybe and Either

Functor, Applicative and Monad

  1. Functor: Mapping Inside a Context
  2. Applicative: Combining Independent Effects
  3. Monads and do Notation

IO, Laziness and Structural Classes

  1. IO and Exceptions
  2. Laziness, Thunks and Strictness
  3. Semigroup, Monoid, Foldable and Traversable

Real-World Haskell

  1. Modules, Packages, Text and Containers
  2. Monad Transformers and Application Structure
  3. Concurrency: Threads, MVar, STM and async

Testing, Parsing and Web

  1. Testing with Hspec and QuickCheck
  2. Parser Combinators
  3. JSON and Web Services

Advanced Types, Performance, Idioms and Revision

  1. Type-Level Features and GHC Extensions
  2. Performance, Profiling and Tooling
  3. Idiomatic Haskell and Common Pitfalls
  4. Revision and Interview Questions