[MLton-user] Strange type problem in OS.Process
Matthew Fluet
fluet at tti-c.org
Fri Nov 7 11:18:47 PST 2008
On Fri, 7 Nov 2008, Wesley W. Terpstra wrote:
> On Fri, Nov 7, 2008 at 7:34 PM, Dan DuVarney
>> Hello world compiles and runs fine. However, MLton insists that type
>> OS.Process.status is not an equality type, which causes many programs
>> to fail to compile.
>
> http://mlton.org/basis/os-process.html lists it as 'type status', not
> an equality 'eqtype'. So I'd say this is a bug in your program, not
> MLton. Perhaps you want to use Posix.Process.fromStatus ?
Correct -- the Basis Library specifies that OS.Process.status is an
abstract, non-equality type. Prior to SVN r6425 (20080302), MLton's
implementation of the Basis Library erroneously exposed OS.Process.status
as an equality type. You can use OS.Process.isSuccess for a simple test.
More information about the MLton-user
mailing list