[MLton] Why Can't I see Pid?

Matthew Fluet fluet@cs.cornell.edu
Wed, 14 Jul 2004 14:53:37 -0400 (EDT)

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

Virtually nothing in misc/primitives.sml is exported "as is".
The whole point of the Basis Library is to hide all the grungy unsafe
things behind a nice, type-safe veneer.

> I can't seem to get MLton to recognize the Pid
> structure in my own program.

Right, it is not exported by the Basis Library implementation.

> Is there something
> special that must be done to make it visible?

There is no means to do so via command line switches.

There is Posix.Process.pidToWord and Posix.Process.wordToPid.  You can
always compose with word/int conversions to get the pid as an integer.