diff options
author | 2008-10-04 15:54:03 -0400 | |
---|---|---|
committer | 2008-10-04 15:54:03 -0400 | |
commit | 820db2a3a1c185ea91d8a8f14a30a52489595e3f (patch) | |
tree | 34129241fe804b98db1256b4d9ef9ba2ed1458ef /src | |
parent | 2eca16323e58b01a70ea734e2825765ebe239dc0 (diff) |
Small clean-ups in crud; Compiler.check
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler.sig | 1 | ||||
-rw-r--r-- | src/compiler.sml | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler.sig b/src/compiler.sig index 1388537f..833c647f 100644 --- a/src/compiler.sig +++ b/src/compiler.sig @@ -45,6 +45,7 @@ signature COMPILER = sig val transform : ('src, 'dst) phase -> string -> ('src, 'dst) transform val o : ('b, 'c) transform * ('a, 'b) transform -> ('a, 'c) transform + val check : ('src, 'dst) transform -> 'src -> unit val run : ('src, 'dst) transform -> 'src -> 'dst option val runPrint : ('src, 'dst) transform -> 'src -> unit val time : ('src, 'dst) transform -> 'src -> unit diff --git a/src/compiler.sml b/src/compiler.sml index 569980f4..3d2ce354 100644 --- a/src/compiler.sml +++ b/src/compiler.sml @@ -93,6 +93,9 @@ fun op o (tr2 : ('b, 'c) transform, tr1 : ('a, 'b) transform) = { end } +fun check (tr : ('src, 'dst) transform) x = (ErrorMsg.resetErrors (); + ignore (#func tr x)) + fun run (tr : ('src, 'dst) transform) x = (ErrorMsg.resetErrors (); #func tr x) |