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

Wesley W. Terpstra wesley at terpstra.ca
Fri Nov 7 11:20:40 PST 2008


A couple more quick bits to add:

> val cmd = "/bin/ls"

/bin/ls will fail on MinGW. I am guessing you want
c:/path/to/msys/bin/ls. What you see as /bin doesn't exist for windows
programs (like the output of MLton). '/' is remapped by bash when you
execute things from the MinGW shell. Your string constant above
doesn't get run by bash, but by cmd.exe.

>      if status = OS.Process.failure then

If this is really all you want to do, "if OS.Process.isSuccess status
..." is your best bet. If you really do want to compare status values
in your larger program, then Posix.Process.fromStatus will get you
there.



More information about the MLton-user mailing list