[MLton-user] Using MinGW version of MLton on Vista

Wesley W. Terpstra wesley at terpstra.ca
Fri Sep 5 08:52:54 PDT 2008


On Fri, Sep 5, 2008 at 5:16 PM, John Reppy <t-johrep at microsoft.com> wrote:

>  I think that the problem is with the path in the pathmap file.  Switching
> to "c:\Users\..." got rid of the parse error.  By using `pwd –W` in my
> autoconf script, I'm able to get working pathnames.  Now I just need to
> figure out my linking errors with glut.
>
Sorry I wasn't very clear. The pathmap is read directly by MLton. It doesn't
come from the msys command-line. Therefore there is no translation applied
by msys to turn /c/foo into c:/foo as MLton expects. So, yes, you need to
use c:/foo in your mlb-path-map.

Any place in SML code where you use paths, you >must< use "c:/foo". MLton
and MLton-compiled programs have no idea about this "/c/foo" stuff. Those
paths only work when you use them on the msys/bash command-line where msys
will auto-translates them. That means any config or data files you refer to
within your source must not be using strings like "/c/bar" -- that file
doesn't exist (unless you have a directory called 'c'). Similarly, mlb
files, mlb-path-maps, and the names of invoked/piped helper program must not
use the /c/ notation. In fact, ideally, even msys command-line invocation
shouldn't use this notation, so as to avoid confusion. Just try to use
c:/foo/bar everywhere.

That said, a parse error pointing at the bottom of the mlb file is a very
unhelpful and misleading error message, and someone familiar with that part
of the code should probably improve this.

And, again be warned that MLton on Vista is 100% untested!

> BTW: I was not able to get the latest version of mlton to build from svn
> using this version of mlton.  There are illegal characters in the generated
> C files.
>
That's strange. I've been compiling it without problems. There was a recent
change committed that modified a few IntInf macro names and broke my unclean
build. However, a clean build of svn/HEAD with the r6811 msi install should
work (on XP/2003/etc).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mlton.org/pipermail/mlton-user/attachments/20080905/45e12d23/attachment.html


More information about the MLton-user mailing list