[MLton] Why Can't I see Pid?

Brent Fulgham bfulg@pacbell.net
Wed, 14 Jul 2004 11:44:04 -0700 (PDT)

Pid is a structure in the "misc/primitives.sml"
portion of the Basis library.

Lots of other structures use it (e.g., posix/io.sml)
and use the Pid.toInt function and so forth.

I can't seem to get MLton to recognize the Pid
structure in my own program.  Is there something
special that must be done to make it visible?

val pid = MLton.Process.spawnp { file="test",
args=["1"] }
val pidInt = Pid.toInt pid

$ mlton test.sml
Error: test.sml 58.5
  Undefined structure Pid.

Example from posix/process.sml:

structure PosixProcess: POSIX_PROCESS_EXTRA =
  val pidToWord = SysWord.fromInt o Pid.toInt
   [ ... ]