I'm not sure what your exact requirements are but a possible solution
may be to create an executable. Then compile-time output would not be
mixed with run-time output. It's straightforward: wrap everything into
a toplevel function and export that, e.g.
[pclayton@rizzo ~]$ cat hello.sml
fun main () = print "Hello World!\n";
PolyML.export ("hello", main);
Compile:
cat hello.sml | poly
Link:
POLYHOME=/opt/polyml/polyml-5.5 # your Poly/ML installation
POLYLIB=${POLYHOME}/lib
LD_RUN_PATH=${POLYLIB}:${LD_RUN_PATH} cc -ggdb -o hello -L${POLYLIB}
-lpolymain -lpolyml hello.o
Run:
./hello
Phil
On 28/03/13 20:49, Gergely Buday wrote:
Hi,
I would like to feed an sml program into poly from standard input:
$ cat hello.sml |poly
Poly/ML 5.4.1 Release
# Hello World!val it = (): unit
Is it possible to use this so that the compiler itself does not print
anything? I have found poly -q which does not print the release
message but that still prints all the rest.
- Gergely
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml