If I write foo.ML:
````
fun main() = PolyML.shell()
````
and compile this with polyc:
````
$ polyc foo.ML -o foo
````
the resulting executable doesn’t give me the usual acknowledgements of my
declarations:
````
$ ./foo
> 3;
> 4;
> print "hello\n";
hello
> 3 + true;
poly: : error: Type error in function application.
Function: + : int * int -> int
Argument: (3, true) : int * bool
Reason:
Can't unify int (*In Basis*) with bool (*In Basis*)
(Different type constructors)
Found near 3 + true
Static Errors
````
Here I’d have expected to see lines like `val it = 3 : int`. The behaviour
after the compilation of the print call suggests that stdout is live, and that
things really are being compiled. The error message after the last interaction
is similarly reassuring.
If I call PolyML.main() inside a standard poly shell (a funny thing to do), it
does work as expected.
I also tried to write code like that behind PolyML.shell by hand, and though I
was providing a CPOutStream TextIO.print, I also failed to see any output from
the compiler.
Is there something I should be doing differently?
Michael
_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml