Programming in Haskell

Data is displayed for academic year: 2023./2024.

Laboratory exercises

Course Description

This is an introductory course to Haskell, an advanced purely-functional programming language. Functional programming languages allow for the development of robust, concise programs in a short amount of time. The key advantages are higher-order functions as an abstraction mechanism and an advanced type system for safety and reusability. The course teaches basic functional programming in Haskell and the basic functional programming concepts. The course starts with language constructs and data types, moves to higher-order functions and algebraic data types, and concludes with IO data streams and monads. Students gain practical experience by solving numerous programming tasks given during the lectures and as take-home assignments. The goal of the course is not only to teach a new programming language, but also to teach a new programming paradigm and a radically different and mathematically sophisticated approach to programming.

Study Programmes

University undergraduate
Skills (3. semester) (5. semester)
Skills (3. semester) (5. semester)
[FER2-HR] Computer Engineering - module
Skills (5. semester)
[FER2-HR] Computer Science - module
Skills (5. semester)
[FER2-HR] Computing - study
Skills (3. semester)
[FER2-HR] Control Engineering and Automation - module
Skills (5. semester)
[FER2-HR] Electrical Engineering and Information Technology - study
Skills (3. semester)
[FER2-HR] Electrical Power Engineering - module
Skills (5. semester)
[FER2-HR] Electronic and Computer Engineering - module
Skills (5. semester)
[FER2-HR] Electronics - module
Skills (5. semester)
[FER2-HR] Information Processing - module
Skills (5. semester)
[FER2-HR] Software Engineering and Information Systems - module
Skills (5. semester)
[FER2-HR] Telecommunication and Informatics - module
Skills (5. semester)
[FER2-HR] Wireless Technologies - module
Skills (5. semester)
University graduate
[FER3-HR] Computing - study
Skills (1. semester) (3. semester)
[FER3-HR] Electrical Engineering and Information Technology - study
Skills (1. semester) (3. semester)
[FER3-HR] Information and Communication Technology - study
Skills (1. semester) (3. semester)
[FER2-HR] Computer Engineering - profile
Skills (1. semester) (3. semester)
[FER2-HR] Computer Science - profile
Skills (1. semester) (3. semester)
[FER2-HR] Control Engineering and Automation - profile
Skills (1. semester) (3. semester)
[FER2-HR] Electrical Engineering Systems and Technologies - profile
Skills (1. semester) (3. semester)
[FER2-HR] Electrical Power Engineering - profile
Skills (1. semester) (3. semester)
[FER2-HR] Electronic and Computer Engineering - profile
Skills (1. semester) (3. semester)
[FER2-HR] Electronics - profile
Skills (1. semester) (3. semester)
[FER2-HR] Information Processing - profile
Skills (1. semester) (3. semester)
[FER2-HR] Software Engineering and Information Systems - profile
Skills (1. semester) (3. semester)
[FER2-HR] Telecommunication and Informatics - profile
Skills (1. semester) (3. semester)
[FER2-HR] Wireless Technologies - profile
Skills (1. semester) (3. semester)

General Competencies

Students will learn the basic concepts of functional programming in Haskell, know and understand the basics of syntax and semantics of Haskell, they will be able to recognize and apply functional idioms and functional design patterns, use Haskell to solve simple practical problems, find and use available programming libraries to solve complex problems, compare alternative Haskell programs to determine which are better according to selected criteria, and they will learn the basics of software development in Haskell.

Learning Outcomes

  1. define the basic concepts of functional programming in Haskell
  2. Explain the syntax and semantics of a Haskell program
  3. Use Haskell to solve simple practical problems
  4. Apply functional idioms and functional design patterns
  5. Use available programming libraries to solve complex problems
  6. Compare alternative Haskell programs to determine which are better according to selected criteria
  7. Design Haskell programs

Forms of Teaching

Lectures

Three hours lecture per week for 15 weeks.

Laboratory Work

Each two-hour lecture is intertwined with one-hour practical session.

Programming Exercises

Students will receive homework programming assignments, which they must demonstrate to the instructor or lab assistent.

Grading Method

Continuous Assessment Exam
Type Threshold Percent of Grade Threshold Percent of Grade
Laboratory Exercises 50 % 70 % 0 % 0 %
Seminar/Project 50 % 30 % 0 % 0 %
Mid Term Exam: Written 50 % 0 % 0 %
Comment:

The midterm does not contribute to the total score, but students need to solve at least 50% of the midterm correctly to be able to proceed to the second half of the course.

Week by Week Schedule

  1. Introduction to functional programming. GHC compiler and other on-line resources.
  2. Basic language constructs. Tuples and lists.
  3. Types and type classes.
  4. Syntax of functions.
  5. Recursive functions. Corecursive functions.
  6. Higher-order functions 1.
  7. Higher-order functions 2.
  8. Custom data types 1.
  9. Custom data types 2. Modules.
  10. Custom data types 3. Standard library.
  11. Input-output operations 1.
  12. Input-output operations 2. Random number generator.
  13. Monads and monadic programming 1.
  14. Monads and monadic programming 2.
  15. Strictness. Code documentation. Packages.

Literature

Miran Lipovača (2011.), Learn You a Haskell for Great Good!: A Beginner's Guide, No Starch Press
Graham Hutton (2007.), Progamming in Haskell, Cambridge University Press
Bryan O'Sullivan, Don Stewart, John Goerzen (2008.), Real World Haskell, O'Reilly Media
Simon Thompson (1999.), Haskell: The Craft of Functional Programming, Addison Wesley
Paul Hudak (2000.), The Haskell School of Expression: Learning Functional Programming through Multimedia, Cambridge University Press

For students

General

ID 127252
  Winter semester
4 ECTS
L3 English Level
L1 e-Learning
30 Lectures
0 Seminar
0 Exercises
15 Laboratory exercises
0 Project laboratory

Grading System

Excellent
Very Good
Good
Sufficient