Functional programming
3 year, 6 semester Language: English
Description
In this course students will learn
- Programming in pure lazy functional language Haskell
- Core concepts of functional programming such as
- Lazy evaluation
- Algebraic data types
- Functors and monads
- Fundamentals of lambda calculus and combinatory logic
- Efficient compilation and execution of functional programs
Preconditions
Teacher
-
Трепаков Иван Сергеевич
Structure
This course is taught in spring semester (16 weeks, 2 times per week) and organized in modules:
- Functional programming in Haskell (4 weeks)
- Functional abstractions (6 weeks)
- Functional models of computation (6 weeks)
Each module will have graded homework assignments (~10 assignments in total) with 10 points per assignment.
Grading
Final grade is assigned either based on points for homework assignments
- A — 8+ points in each homework
- B — 7+ points in each homework
- C — 6+ points in each homework
Or by passing final theory test comprising
- 2 random questions from different modules
- 1 practical exercise similar to tasks from homework assignments
Students wishing to improve grade based on homework points may pass theory test instead. In that case their grade from theory test will be the final grade.
Prerequisites
Before the first seminar all students should have Haskell developer environment ready by installing GHC toolchain using official installer GHCup.
A typical GHC installation includes following components:
- GHC (Glasgow Haskell Compiler)
- GHCi — interactive REPL-like environment
- HLS (Haskell Language Server) — integration with editors
cabal
andstack
— tools for package management and development
To check that everything was installed correctly you can use following command:
$ ghc --version
The Glorious Glasgow Haskell Compilation System,
version 9.4.8
Note: any version 9.x.x or above will be fine.
Materials
Slides: nsu-syspro/haskell-slides
Seminars: nsu-syspro/haskell-seminars
(22126)
Functional programming in Haskell
Date | Slides | Classwork | Homework | Deadline |
---|---|---|---|---|
Course introduction | ||||
2025.02.06 | Introduction to Haskell | |||
2025.02.07 | Quiz 1 | Week1.hs | Recursion (Assignment) |
2025.02.14 |
2025.02.13 | Quiz 2 | Week2.hs | ||
2025.02.14 | Quiz 3 | Week2.hs | Trees (Assignment) |
2025.02.23 |
2025.02.20 | Cancelled | |||
2025.02.21 | Cancelled | |||
2025.02.27 | Quiz 4 | Week4.hs | ||
2025.02.28 | Quiz 5 | Week4.hs | Golf (Assignment) |
2025.03.09 |
2025.03.06 | Quiz 6 | Week5.hs | ||
2025.03.07 | Quiz 7 | SimpleJSON.hs |
Functional abstractions
Date | Slides | Classwork | Homework | Deadline |
---|---|---|---|---|
2025.03.13 | Semigroups and monoids | Monoids.hs | ||
2025.03.14 | Quiz 8 | Monoids.hs | ||
2025.03.20 | Cancelled | |||
2025.03.21 | Cancelled | |||
2025.03.27 | Quiz 9 | Monoids.hs | ||
2025.03.28 | Foldable.hs | Type classes (Assignment) |
2025.04.06 | |
2025.04.03 | Quiz 10 | Foldable.hs | ||
2025.04.04 | Quiz 11 | Foldable.hs | ||
2025.04.10 | Quiz 12 | Functor.hs | ||
2025.04.11 | Functor.hs | Infinite lists (Assignment) |
2025.04.19 |
Functional models of computation
Resources
For a more comprehensive list of available free and paid resources check out official Haskell Documentation page.
- Real World Haskell
- Learn You a Haskell for Great Good!
- Introduction to Haskell, course by Well-Typed (materials, YouTube)
- CIS 194: Introduction to Haskell
- Barendregt, H., Dekkers, W., & Statman, R. (2013). Lambda calculus with types (book)
- Peyton Jones, S. L. (1987) The Implementation of Functional Programming Languages (book)
- Jones, S. L. P., & Lester, D. R. (2000). Implementing Functional Languages: a tutorial (book)
- The Haskell Wikibook
- The Haskell Wiki
- Haskell 2010 Language Report