Rob's suggestion of using the export should do what you want:
PolyML.export("noprint-poly",
(fn () => (PolyML.print_depth 0;
PolyML.Compiler.prompt1 := "";
PolyML.Compiler.prompt2 := "";
PolyML.rootFunction ()))
);
Then you can run to make the new ml binary:
cc -o empty-top-level-poly noprint-poly.o -lpolymain -lpolyml
or if you use a mac:
cc -o empty-top-level-poly noprint-poly.o -lpolymain -lpolyml -segprot
POLY rwx rwx
And finally you have your version of poly that doesn't output anything
by default:
./noprint-poly -q
Having said all that, I don't think this is the way to go about building
an http server with poly. Instead you probably want to write your own
dedicated protocol for handling IO on a port using sockets.
best,
lucas
On 05/10/2011 05:55, Hong Feng wrote:
> Still can not disable the very first > system prompt ... :(
>
> another question: any way to support the GNU readline library under the SML
> system for user interaction?
>
> Best,
> Hong Feng
> _______________________________________________
> polyml mailing list
> [email protected]
> http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
>
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml