COMP4075/G54RFP & COMP4095 Real-world Functional Programming 2020/21

Revised Coursework Part II and Exam now released!

Model answers for Part I of the coursework is now available!

Model answer (source code) for Part II of the coursework is now available!

Literature Lectures Lecture Links
Coursework Coursework Links COMP4095 Forum
Examination References


COMP4095 is an optional project module only for students taking COMP4075 (formerly G54RFP).


There is no main reference for the module, but we will refer to Haskell (Wikibooks) and Real-world Haskell quite a bit. These, and some other books that you may find useful depending on your background and interests are listed below. In addition, we will use research papers, tutorials on specific topics, videos, etc.

The book Haskell [Hask] covers a lot of aspects of Haskell and Haskell-related topics in fair depth. It contains a lot of material, but a number of tracks through the text (with subtracks), such as Beginner's and Advanced, that can be followed depending on background and interest are identified. It's available for free online.

If you do need to brush up on your Haskell knowledge, Programming in Haskell [Hut16], by our own Dr. Hutton is a good choice. The library should have plenty of copies, and so should the local bookshop.

Another good introduction to Haskell (which is also highly entertaining) is Miran Lipovača's Learn You a Haskell for Great Good [Lip11]. Can be bought or read online for free.

Purely Functional Data Structures [Oka98] by Chris Okasaki is a great book on data structures in a purely functional setting, and how to employ both lazy and strict evaluation to get the right complexity bounds. Moreover, as purely functional data structures are persistent, which is a very useful property in its own right, the utility of the presented material goes well beyond functional programming.

Real World Haskell [SGS09] by Bryan O'Sullivan, John Goerzen, and Don Stewart gives a good grounding for serious Haskell development. Available for free online; suggested to buy hardcopy if you like it.

Should you need more Haskell introductory material, you can also check out:

Wondering how to debug your Haskell programs? Well, there are a number of options. On possibility, while it has certain drawbacks, is the traditional, procedural debugger integrated in GHCi 6.8.1 or later. You can read more about it in Bernie Pope's article in issue 10 of the Monad.Reader [POP08].

Lectures and Q&A sessions

Work in progress.

There is typically two hours of lectures (or other structured teaching activity) per week. Lectures will for the most part be pre-recorded and released some time before the nominal date of the lecture in question. However, on occasion, there may be a live lecture on Teams, for example:

Live lectures are indicated as such in the lecture overview below. Unless indicated otherwise, live lectures take place 11:00–12:00. Lectures that are not live will either pre-recorded and made available some time before the nominal lecture date, or may be some appropriate talk or presentation available via e.g. YouTube.

Further, there will be a Q&A session every week. If there is no live lecture, the Q&A will take place 11:00–12:00, otherwise immediately after the lecture. (Questions related to a live lecture are of course welcome during the lecture.)

The Q&A ssession will take place via Teams and as appropriate the COMP4075 forum. The latter can of course be used to ask questions and discuss anything related to the module at any time, and is monitored regularly.

1 2 Oct Administrative Details and Introduction LIVE
2 2 Oct Video: Why Functional Programming Matters,Prof. John Hughes [Hug89] [HS17]
3 9 Oct Pure Functional Programming: Introduction [Hug89] [HS17]
4 9 Oct Pure Functional Programming: Exploiting Laziness [JG92]
5 16 Oct Purely Functional Data Structures [Oka98]
6 16 Oct Type Classes TBA
7 23 Oct Functional Programming Patterns: Functor, Foldable, and Friends TBA
8 30 Oct Introduction to Monads TBA
9 30 Oct Monads in Haskell TBA
10 6 Nov Concurrency TBA
11 6 Nov Monad Transformers TBA
12 16 Nov The Threepenny GUI Toolkit (Postponed: was 16 Nov) TBA
13 16 Nov The Threepenny GUI Toolkit (cont.) TBA
GL 27 Nov Francesco Cesarini: Erlang, WhatsApp's Secret Sauce TBA
14 4 Dec Property-based Testing TBA

Lecture Links

Copies of electronic slides, any major pieces of program code, other electronic material used during the lectures, and useful links can be found here.

Coursework and Examination

The coursework counts for 50 % of the total mark, and the coursework-based exam for the remaining 50 %. The coursework consists of two parts, I, II, comprising programming problems closely related to what is covered in the lectures. The exam is similar. The exact details are or will be available through the coursework links below. The coursework is to be carried out individually. You are welcome to discuss the coursework with friends, but, in the end, you must solve the problems on your own and your solutions will be assessed individually. Submission is via Moodle.

The coursework-related dates are as follows:

You can ask questions about the coursework on the G54RFP forum, or help answering questions! However, we do ask that you do not post direct solutions to coursework questions.

Finally, should you feel that your Haskell knowledge could do with a brush-up, we do recommend the various Haskell resources mentioned in the section on literature above, and trying your hand on the (unassessed) Haskell and GHC revision coursework available here [NS13].

Coursework and Examination Links

The coursework descriptions, model answers, results, etc. will be linked from here.

Please direct further coursework-related questions to the COMP4075 forum.

COMP4095 Project

COMP4095 is an optional project module open to COMP4075 students (only) who wish to explore a topic of their own choosing related to COMP4075 (interpreted broadly) in more depth through a programming project.



COMP4075/COMP4095 Web Forum

A Moodle Forum for COMP4075 has been set up. This is also to be used for anything related to COMP4095.

The forum is intended for asking questions about and discussing aspects of COMP4075, like the coursework. It is monitored by the COMP4095 team, and we'll endeavour to answer any outstanding questions reasonably quickly. However, any one is free to contribute to the discussions and help with answering questions. Indeed, in the spirit of an online forum, you are encouraged to do so!

Of course, we do ask that you do not post the exact solutions to the coursework. The point of the coursework is that you should ultimately solve the problems yourselves so that you know what you have understood and what you need to work more on or ask about.


Last updated 17 January 2021.