
3.3 Delivery tools: the Deliver structure
MLWORKS.Deliver
MLWorks.Deliver
val deliver: deliverer
deliver file function executable? -> ()
unit -> unit.
true, file will be a standalone executable; if false, file will be an image file.
deliver function returns unit.
true, file can be executed standalone. If false, file can be executed by passing it to the MLWorks runtime.
deliver is called on a function, MLWorks performs a garbage collection to remove as much irrelevant code as possible. After garbage collection, MLWorks writes the delivered function to file.
fun hello() = print "Hello, world.\n";
deliver ("hello", hello, true);
> hello Hello, world. >
deliver ("hello.img", hello, false);
dos> bin\mlimage-console hello.img Hello, world. dos>
unix> bin/mlimage hello.img Hello, world. unix>

Generated with Harlequin WebMaker