From ac1fe7d7abba32ef0c83ca1a22092bab9de5f171 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Thu, 13 Sep 2018 16:29:29 -0400 Subject: SML example import --- examples/sml/checks.sig | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 examples/sml/checks.sig (limited to 'examples/sml/checks.sig') diff --git a/examples/sml/checks.sig b/examples/sml/checks.sig new file mode 100644 index 0000000..6b0453c --- /dev/null +++ b/examples/sml/checks.sig @@ -0,0 +1,23 @@ +(* Copyright (C) 2017 Ryan Kavanagh *) +(* Distributed under the ISC license, see COPYING for details. *) + +signature CHECKS = +sig + (* checks are either: *) + (* Check (name, f): *) + (* f : checks some property, and can catastrophically abort *) + (* or raise some exception if something is not satisfied. *) + (* Useful for sanity checks like: do all desired files *) + (* exist? *) + (* Problem (name, f): *) + (* name : must be the same name as the autolab problem *) + (* that is being graded. *) + (* f : returns an integer, which is the score awarded for *) + (* problem "name". *) + datatype checks = Check of string * (unit -> unit) + | Problem of string * (unit -> real) + + val checks : checks list + + val scoreboard : (string * real) list -> int list option +end -- cgit v1.2.3