Skip to content

Slides and other materials for functional programming lectures ITMO university

Notifications You must be signed in to change notification settings

atopuzov/FP-Course-ITMO

 
 

Repository files navigation

Haskell ITMO course at CTD

Here you can find plan and presentations on the Haskell course authored by Dmitry Kovanikov and Arseniy Seroka.

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

Course plan

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

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

Lecture 1: Why FP and Haskell (by Arseniy Seroka)

Lecture 2: Basic Syntax (by Dmitry Kovanikov)

  • 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)

Lecture 3: Datas, Classes, Instances (by Dmitry Kovanikov)

Lecture 4: Kinda monoidal types (by Dmitry Kovanikov)

Lecture 5: Monads, part 1 (by Dmitry Kovanikov)

  • Talk about boxes
  • What is Monad?
  • Monad type class
  • Monad laws
  • Maybe as example, philosophy about null-safety
  • Equational reasoning
  • Proving Monad laws for Maybe
  • Identity monad instance
  • Either monad instance
  • Monad composition
  • List monad instance
  • then : >>
  • List monad nondeterminism
  • join
  • Weird custom monads
  • Useful Monad functions

Lecture 6: Functors, Applicative Functors (by Arseniy Seroka)

Lecture 7: Monads, part 2 (by Dmitry Kovanikov)

  • Writer monad
  • Reader monad
  • Typed holes
  • Partial type signatures
  • State monad
  • Cont monad and Continuation Passing Style (CPS)

Lecture 8: RealWorld (by Arseniy Seroka)

Lecture 9: Monad Transformers (by Arseniy Seroka)

Lecture 10: Speeding up haskell (by Dmitry Kovanikov)

Lecture 11: Template Haskell and Lens (by Arseniy Seroka)

  • -XCPP
  • Template Haskell
    • Boilerplating tuple code
    • Haskell AST
    • Splices
  • -XQuasiQuotes
  • Generate instances with TH
  • Lens

Lecture 12: Parallel and Concurrent Haskell (by Dmitry Kovanikov)

  • Advantages of immutability and purity
  • Haskell parallelism with rpar and rseq
  • Threadscope
  • Strategies
  • Par monad examples
  • Difference between Parallelism and Concurrency
  • forkIO and MVar
  • Transactions: STM, TVar
  • Async

Lecture 13: Comonads (by Arseniy Seroka)

  • Comonad type class & motivation
  • Zippers
    • List zipper
    • Game of Life
  • Indexed array comonad for image processing
  • Comonadic 2D-parser
  • 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)
  • Comonad transformers

Lecture 14: Enterprise Haskell (by Arseniy Seroka)

Lecture 15: Advanced type features (by Dmitry Kovanikov)

Lecture 16: Idris (by Dmitry Kovanikov)

  • Idris tutorial
  • Idris course
  • Paradigms
    • Totality
    • Strict evalution
    • Theorem proving
    • DSL
    • Extensible effects
  • Syntax difference with Haskell
    • : for type and :: for cons
    • Function overloading
    • Named typeclasses
    • !-idiom
    • [| |]-idiom
    • Records
  • Dependent types
    • Vect data type
    • drop for Vect
    • isEmpty : Vect n a -> Bool
    • isSingleton : Bool -> Type
    • Open and closed doors
    • Total version of head function
    • _|_-eliminator
    • Dependent pair and filter for vectors
    • Type safe printf implementation
  • Simple examples of Eff
    • Tagging tree with labels (and counting leaves)

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haskell 93.2%
  • Nix 6.8%