Chalmers | GU

Course PM

TDA452/DIT143, Functional Programming, 7.5hp, HT 2018

Examiner: Thomas Hallgren
Course responsible: Thomas Hallgren
Course Assistants/supervisors: Elisabet Lobo-Vesga, Herbert Lange, Jeff/Yu-Ting Chen, Jannis Limperg, Mazdak Farrokhzad

Course content

In this course the student will learn about functional programming through the Haskell programming language. Concrete topics encountered in the course include:

Learning outcomes

After completion of the course the student should be able to

Course structure/course implementation

Examination forms

The examination of the course has two parts:

To pass the course it is necessary to pass all assignments and the written exam. Your final grade is determined by your grade on the written exam only.

The grades awarded on the exam are 3, 4, 5 for Chalmers students, and G, VG for GU students. (G on the GU side corresponds to 3 or 4 on the Chalmers side; VG corresponds to a 5.)

Course literature

There is no course textbook. For those who like to follow a textbook I can recommend the following:

Changes from Last Year

There will be no significant changes from last year.


Lectures and self-study exercises

Monday 13.15 (HB3) Thursday 10.00 (HC3)
Self-study exercises
Week 1 Intro to Haskell.
Extra: Tuples & lists. Types.
Source code: Intro.hs
Tests in GHCi: Intro.txt, Intro.pdf.
Data types.
Source code: DataTypes.hs
Tests in GHCi: DataTypes.txt, DataTypes.pdf.
Getting started with Haskell
Week 2 Working with lists
(recursion, pattern matching)
Source code: WorkingWithLists.hs
Tests in GHCi: WorkingWithLists.txt WorkingWithLists.pdf
08:00 in HA4
Higher Order Functions.
Source code: HigherOrderFunctions.hs
Tests: see comments in source code
2012 Videos: Part 1, Part 2.
Recursion and data types
Week 3 Input/Output.
Source code: countWords.hs, InputOutput.hs, Hangman.hs.
Tests in GHCi: InputOutput.txt
Overloading and Type Classes,
QuickCheck test data generators.
Source code: Overloading.hs, TestDataGenerators.hs.
Tests in GHCi: TC_QC.txt, TC_QC.pdf
Lists and List Comprehensions
Week 4 Recursive data types.
Source code: ArithmeticQuiz.hs, SymbolicExpressions.hs.
Tests in GHCi: RecDataTypes.txt, RecDataTypes.pdf.
Source code: ParsingExamples.hs, Parsing.hs, Parsing library.
Tests in GHCi: Parsing.txt, Parsing.pdf.
IO, Test Data and Properties
Week 5 Monads. (Extra: Instances).
Source code: MonadicEvaluators.hs.
Tests in GHCi: Monadic.txt, Monadic.pdf.

Monads recap.
Lazy · Eager · Parallel.
Source code: Fib.hs, Laziness.hs.
Tests in GHCi: Laziness.txt, Laziness.pdf.
Recursive data types
Week 6 GUI programming
Source code: WebIntro.html, 3pIntro.hs, 3pFudgetsIntro.hs, ThreepennyFudgets.hs.
More info: ThreepennyFudgets.
Tests in GHCi: GUI.txt, GUI.pdf.
Abstract data types.
Type inference examples (from old exams, PreludeFunctions.hs)
Concluding reflections and examples.
Source code: Reverse.hs, Queue.hs, Set.hs.
Tests in GHCi: ADTs.txt, ADTs.pdf.
Week 7 No lectures (Project work!)

Lab assignments

LabPartSubmission deadlineFinal deadline
Lab 1 Wednesday, Week 1
Friday, Week 2
Lab 2 A Wednesday, Week 2
Friday, Week 4
BWednesday, Week 3
Lab 3 AWednesday, Week 4
Friday, Week 6
BWednesday, Week 5
Lab 4 ProposalMonday, Week 6
Thursday, Week 6
Project Wednesday, Week 7
Friday, 2018-12-28?

Data- och informationsteknik
412 96 Göteborg
Telefon: 031-772 10 00 (CTH) / 031-786 00 00 (GU)