This project currently contains RunLab.hs, an automated student submission checking system.
ghc -package ghc RunLab.hs
Then, run with
./RunLab filename.hs where
filename.hs is the filename of the student submission. This will run the checks found in
checks/filename.hs against the submission, printing a report.
Writing check suites
A checks file must do a few things:
It must be in the module
It must export some definitions named
test_name :: ? -> IO ()where
nameis the name of a definition expected to be present in the student submission. The argument type of each
test_should match the complete type of the corresponding submission definition.
When the system runs the checks, it executes a
do block like this:
do Checks.test_name1 name1 Checks.test_name2 name2 ...
So each test should take the (submitted) function to be tested and run some tests against it. (You can safely import, e.g., QuickCheck in a check suite file.)