Description
This lab assignment will require you to read, understand, evaluate and extend
an advanced Haskell code base.
You will choose an existing Open Source library package (preferably from HackageDB)
and use it for a small project.
Part I
Deadline: Wed Feb 29
This part of the lab is just for you to choose a Haskell library and
motivate your choice. You should start the next part before the deadline of this one.
First choose a package on Hackage which:
Then your task is to write a short report (1-2 pages) explaining why you chose this package, which learning outcomes you think it relates to, and how it relates to them. (This report will be extended in Part II below.)
Part II
Deadline: Sun Mar 11
Now you will work with the library you have chosen.
Part II - Task 1 - Writing code
Write some Haskell Code for the library you have chosen.
The code could be in any one of these categories (or possibly a mix of
them):
- Advanced usage / tutorial: show some examples of what the library can be used for.
The examples must demonstrate a deep understanding of (part of) the library.
- Specification / QuickCheck testing: write a suite of QuickCheck properties and generators for (part of) the
library. Your test-suite must demonstrate that you have in-depth
understanding of both QuickCheck and (part of) the library under test. Can you find any bugs? (If so report them.)
- Modification / extension: show how (some part of) the library could be
changed to improve it in some aspect, or extend the library with new and
useful features.
The expected work load for assignment 3 (all parts together) is around 40 hours.
Try to demonstrate that you master (some of) the learning outcomes of the AFP course.
If you have questions, talk to the Teaching Assistant (Jonas) or the lecturer (Patrik).
Part II - Task 2 - Writing a report
Write a report about you have been doing in the lab. The report should
include:
- An analysis of the library (or a part of it). A concise summary
of the library interface, an explanation of some interesting techniques used
in the implementation and perhaps other interesting things you have
discovered about the library!
- An overview of the code you have been writing and a few highlights, for example
particular problems that you faced and how you solved them.
Use concepts you have learned in the course to express yourselves.
Submission
Deadline
The deadline for part 1 is Wed Feb 29 and for part 2 Sun Mar 11. The final deadline is Wed Mar 14. (Please read
the rules on what first and final deadline
mean.)
Clean Code
Before you submit your code, Clean It Up! Submitting clean code is Really
Important, and simply the polite thing to do. After you feel you are done, spend
some time on cleaning your code; make it simpler, remove unnecessary things,
etc. We will reject your solution if it is not clean. Clean code:
- Does not have long lines (< 80 characters)
- Has a consistent layout
- Has type signatures for all top-level functions
- Has good comments
- Has no junk (junk is unused code, commented code, unnecessary comments)
- Has no overly complicated function definitions
- Does not contain any repetitive code (copy-and-paste programming)
Submission
Your submission needs to include the following information:
- Your Haskell files (.hs or .lhs), containing your solution. Also include a simple Makefile which installs the hackage library + compiles your files.
Do not submit .o, .hi or .exe files!
- report.txt or report.pdf, a file containing your report.
Before you submit,
please read the note on cheating.
You are supposed to submit your solution using the Fire system.
Note: You do NOT have to use zip/gzip/tar/bzip on
your files! Just upload and each file that is part of your
solution. Don't forget to submit when you have uploaded all the files.
To the Fire System
Good luck!