Informatics 1: Functional Programming - Notes on CamlBack

CamlBack generates feedback automatically on attempts at solving functional programming exercises. The name comes from the fact that it was originally built for a different functional programming language called OCaml.

After launching it, you need to choose language Haskell and the problem set you want to attempt, and then login as guest. To try a problem in a problem set, click on it. Click "Check Function" at the bottom to submit a solution, or "Reset" to start again.

When you submit a solution to an exercise, CamlBack will check it against a sample solution and either tells you that your solution is correct - which just means that it has passed a small collection of tests, less than would be tested by QuickCheck - or tell you about a test case that fails. In addition, it gives you a hint about why that test failed, by comparing the execution of your submission with the execution of the sample solution.

If the submission doesn't parse or typecheck, you get Haskell's usual response.

  1. As more students use CamlBack for a given exercise, its feedback will improve. That's because it collects correct submissions so that there is more to compare later submissions against.
  2. CamlBack currently specialises in giving feedback for recursively defined functions. Its feedback for other kinds of functions is likely to be less helpful, but it will still tell you about failed tests. This aspect of CamlBack might improve in future.
  3. CamlBack doesn't handle lazy evaluation very well, which includes infinite lists like [1..].
  4. You can use the Export button at the top to save your solutions in a file. This allows you to transfer your work to a "normal" Haskell session. There is no Import feature.
  5. The file created by Export will have duplicate definitions in cases where you have copied the solution to one problem for use in solving another problem. Haskell will complain when the file is loaded, with an error like: Multiple declarations of `myFunction'. You will have to edit the file to remove or comment out the duplicate definition.

Acknowledgement: CamlBack is the work of Hesam Samimi (SAP Labs), Sumit Gulwani (Microsoft Research), Stoytcho Stoytchev (Amazon) and Todd Millstein (UCLA).

Home : Teaching : Courses : Inf1 : Fp 

Informatics Forum, 10 Crichton Street, Edinburgh, EH8 9AB, Scotland, UK
Tel: +44 131 651 5661, Fax: +44 131 651 1426, E-mail:
Please contact our webadmin with any comments or corrections. Logging and Cookies
Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh