[MLton-user] Strange type problem in OS.Process

Vesa Karvonen vesa.a.j.k at gmail.com
Sun Nov 9 03:40:20 PST 2008


On Fri, Nov 7, 2008 at 11:07 PM, Dan DuVarney
<duvarney at reactive-systems.com> wrote:
[...]
> The main thing I want to do is maintain portability of a large
> pre-existing code base between SML/NJ and MLton. Since the
> SML/NJ basis library we are using does not provide
> OS.Process.isSuccess, it looks to me like a fairly unconvoluted
> way of portably checking exit status is
>
>  (Posix.Process.fromStatus x) <> (Posix.Process.fromStatus
> OS.Process.success)

Which version of SML/NJ are you actually using?  Digging a bit in
SML/NJ's repository, it would seem that OS.Process.isSuccess was added
to SML/NJ's Basis library in late 2003:

  http://smlnj-gforge.cs.uchicago.edu/scm/viewvc.php/sml/trunk/system/Basis/Implementation/OS/os-process.sig?root=smlnj&r1=651&r2=1426

Rather than working around issues that were fixed literally 5 years
ago, I would rather recommend porting your code to the latest SML/NJ,
which does provide OS.Process.isSuccess.

-Vesa Karvonen



More information about the MLton-user mailing list