Programming in Haskell

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.

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.

Study Programmes

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

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

Laboratory exercises

Grading System

ID 127252
  Winter semester
4 ECTS
L3 English Level
L1 e-Learning
30 Lecturers
0 Exercises
15 Laboratory exercises

General

Excellent
Very Good
Good
Acceptable