jagajaga / FP-Course-ITMO

Slides and other materials for functional programming lectures ITMO university

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Haskell ITMO course at CTD

Here you can find plan and presentations on the Haskell course authored by Dmitry Kovanikov and Arseniy Seroka with subsequent contributions by George Agapov, Ilya Peresadin, Roman Melnikov and Artem Yurchenko.

This course is always under development and always improving constantly because there's no limit for the best Haskell course.

You can always contact us via fp.ctd.itmo [at] serokell.io

Course plan

All slides: https://slides.com/fp-ctd

Templates for homework: https://github.com/ChShersh/fp-homework-templates

Introductory presentation: here

  • GHC, GHCi
  • Haskell project structure
  • Stack. Features
  • How stack works. Snapshots
  • .cabal and .yaml files
  • Basic comands
  • Introduction to Haskell
    • Basic GHCi examples
    • Function & operators definition
    • Lists and functions on lists
  • Haskell syntax
    • let (variable declaration)
    • where clause
    • if expression
    • Guards
    • case expression
    • Higher order functions
    • Lambdas (anonymous functions)
  • Polymoprhism
    • Parametric
    • Ad-hoc
  • LANGUAGE pragmas
  • Currying (aka partial application)
  • Pattern matching
  • List comprehension
  • Function application: ($)
  • Function composition: (.)
  • Lazy evaluation (erathosphene sieve, fibonacci numbers, repmin)
  • Typed holes
  • What is Monad?
  • Monad type class
  • Monad laws
  • State monad
  • Reader monad
  • Maybe as example, philosophy about null-safety
  • Either monad instance
  • Monad laws
  • Idea of parsing and parser combinators
  • Parser type
    • Basic parsers
    • Instances: Functor, Applicative, Monad, Alternative
    • Usage examples
  • Testing
  • Concurrency with Haskell lightweight threads. forkIO and MVar.
  • Synchronization between threads
  • Exceptions revisited
  • Async
  • STM (Software Transaction Memory). STM, TVar.
  • Parallelism with Sparks. Eval monad
  • Inspecting your concurrency (ThreadScope)
  • Lens
    • Implementing naive data lenses
    • Introducing real Lens'
    • lens, view, set, over definition and explanation
    • 3-step lens guide
    • microlens-family
    • Nice example with real lens (view, traversed, filtered, zoom)
    • Prism
    • Affine traversals
  • -XCPP
  • Template Haskell
  • GADTs
  • Existential type
  • Rank N types
  • DSL
  • Kinds
  • -XTypeOperators
  • -XDataKinds. Data promotion
  • Heterogeneous lists
  • Type symbols
  • Data and type families
  • Free monads
  • Comonad type class & motivation
  • Zippers
    • List zipper
    • Game of Life
  • Type algebra
    • Types as functions (sum, product, type variables)
    • Type isomorphisms
    • Zippers as deriviation: List zipper, Tree zipper
  • Comonads as OOP patterns
  • codo-notation (aka method)

Uncovered topics

Unfortunately there're some topics which are great but there is no time for them in this course :(

About

Slides and other materials for functional programming lectures ITMO university


Languages

Language:Haskell 95.2%Language:Nix 4.8%