diff options
author | Ryan Kavanagh <rak@debian.org> | 2018-09-13 13:09:35 -0400 |
---|---|---|
committer | Ryan Kavanagh <rak@debian.org> | 2018-09-13 13:49:07 -0400 |
commit | 5e78c729407999bd26af4d446edf0edf7d0af94e (patch) | |
tree | 8e44695c03bd8974e4a9b0831272e845ffa940ad /skel/main.sml |
Import autograder from 15-317 f17
Diffstat (limited to 'skel/main.sml')
-rw-r--r-- | skel/main.sml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/skel/main.sml b/skel/main.sml new file mode 100644 index 0000000..95e5bb5 --- /dev/null +++ b/skel/main.sml @@ -0,0 +1,25 @@ +(* Copyright (C) 2017 Ryan Kavanagh <rkavanagh@cs.cmu.edu> *) +(* Distributed under the ISC license, see COPYING for details. *) + +structure Main :> + sig + val main : (string * string list) -> OS.Process.status + end += +struct +structure H = Helper (structure C = struct val handinPath = "handin" end) +structure C = ChecksHelper(structure H = H) + +fun main _ = + let val scores = H.runChecks C.checks + val scoreboard = C.scoreboard scores + (* Make sure the scores are on the last line. *) + val _ = print "\n\n\n" + (* This below *must must must* be the last thing printed.. *) + val _ = H.printLn (H.scoresToString (scores, scoreboard)) + in OS.Process.success end + handle _ => (H.abortWithMessage o H.stringsInBox) + [ "Experienced uncaught exception!" + , "If you believe this to be in error, please contact your" + ^ " course staff." ] +end |