Am 02.04.2013 14:02, schrieb David Matthews: > On 02/04/2013 12:50, Makarius wrote: >> On Tue, 2 Apr 2013, David Matthews wrote: >> >>> Do you has something else in mind apart from PolyML.export? Perhaps >>> some form of separate compilation of modules? I'm not familiar with >>> OCaml. >> >> Actual separate compilation is a different thing. I don't think there >> is a real need for that in Poly/ML. The compiler is fast enough to >> compile huge applications from scratch. >> >> Personally I don't have any requirements beyond what Poly/ML does >> already. What "the man in the street" wants to see, though, is something >> that looks and feels like "polymlc ..." just like "cc ...", although >> that might sound a bit silly. > > Well it wouldn't be hard to provide a slight variation of the top-level > that when it reached end-of-file it looked in the name-space for a > variable called "main", checked that it had the correct function type > and then called PolyML.export on it. If this would appeal to some > current sceptics about Poly/ML then I'm happy to do it.
This would definitly be a great help for people new to Poly/ML. When I
had to produce a standalone executable from an ML-file it took me quite
some time before figuring out how it works.
> Actually it's probably not much more than
> polyml --use myprogram.ML --use export.ML
> Where export.ML is
> PolyML.export("polyml.o", main);
> OS.Process.exit OS.Process.success: unit;
Make the name of the resulting obj file a parameter and it's fine, I
think. Could look like (shell script):
polyml --use myprogram.ML <<EOF
PolyML.export("${output}", main);
EOF
Perhaps one can also pour in the gcc-compile phase already, so it's one
step from ML-file to executable.
- René
--
René Neumann
Institut für Informatik (I7)
Technische Universität München
Boltzmannstr. 3
85748 Garching b. München
Tel: +49-89-289-17232
Office: MI 03.11.055
smime.p7s
Description: S/MIME Kryptografische Unterschrift
_______________________________________________ polyml mailing list [email protected] http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
