I have a relatively short piece of ML looking like

   val _ = PolyML.Compiler.prompt1 := ""
   val _ = PolyML.print_depth 0
   val dir = OS.FileSys.getDir()
   val _ = OS.FileSys.chDir "somepath"

   val _ = use "somefile"
   val _ = OS.FileSys.chDir dir
   val _ = load "another file"
   val _ = print "Done\n";

(This text is also in the file foo.)

The various files that are 'use'-d are quite big, and the first one
includes further calls to use.

I have found that on my Debian Linux system (2.6.18), I can't reliably
do any of the following:

  poly <<EOF
  ..text above..
  EOF

or

  poly < foo

or

  echo "use \"foo\";" | poly

The error is not in the ML.  Each time any of these is run, I see the
final "Done".  However, a high proportion of the time (33% perhaps),
my shell (standard Debian bash) aborts the execution of the process.
For example, with the echo "use" piped to poly, I get

  ...output...
  Done
  val it = () : unit
  Aborted

If I use the here document or the redirect from a file, I also get
"Aborted" appended to the expected output.

So, this really doesn't look like poly's fault, but it beats me as to
what the problem may be.  Has anyone seen anything like this before?
And, is there another route by which I might be able to get my program
into poly that won't suffer this problem?

On MacOSX, the system uses the here document approach and I've never
seen it fail.

Michael.
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to