[MLton-user] Re: MLton and Cygwin installation

Brian Donovan bdonovan@gmail.com
Thu, 8 Dec 2005 02:04:20 +0800


Thanks for the reply and I apologize for the flood of emails .

I've got MLton working (I think) - after I changed the value of lib on
line 8 in the mlton bash script to :

lib='C:/cygwin/usr/lib/mlton'

I was able to compile the helloworld.ml file to a 364KB file with no
extension named simply helloworld.  This seems to be expected (that
it's extensionless), but helloworld won't run from either the bash or
the Windows prompt.  Manually editing the filename to end in .exe lets
me run it and get the expected "Hello, world!".

Is there some separate step after the compile to get me to an exe?  Is
manually adding ".exe" to the filename what other Windows MLton users
do?  Would the MinGW package produce extensionless files as well?

Thank you for your help so far.

I apologize if my questions are a bit clueless.  I haven't written any
software in a non-interpreted language since an Intro to Computing for
Engineers course that was taught in Fortran 77.  :)

- Brian

On 12/8/05, Stephen Weeks <sweeks@sweeks.com> wrote:
>
> > Looking in C:\cygwin\usr\bin, I see 5 files :
> >
> > mllex
> > mlnlffigen
> > mlprof
> > mlton
> > mlyacc
> >
> > They're actually the only files in that directory and I see from
> > looking at the mlton tgz separately that they're all from that
> > archive.  Stuff like bash, awk, etc. all live in my C:\cygwin\bin\
> > directory (possibly b/c I made a choice at install time to have all of
> > the cygwin tools available to all users on this system? dunno).
>
> Maybe.  On my Cygwin installation, /bin and /usr/bin are the same, and
> so the MLton executables live in the same directory as bash, awk,
> etc.  mount reports
>
>   C:\cygwin\bin on /usr/bin type system (binmode)
>   C:\cygwin\lib on /usr/lib type system (binmode)
>   C:\cygwin on / type system (binmode)
>   c: on /cygdrive/c type system (binmode,noumount)
>
> I would expect things to work even if /bin and /usr/bin are different.
>
> > I notice that bash, awk, etc. are all exe's, though, whereas none of
> > the mlton-associated files have any extensions.
> >
> > Is that normal?
>
> Yes.
>
> > Copying all of those files and dropping them into my C:\cygwin\bin
> > directory
>
> This shouldn't be necessary.
>
> > got a result - typing "mlton" at the bash prompt now results
> > in:
> >
> > bash-3.00$ mlton
> > /usr/bin/mlton: line 9: /usr/lib/mlton/platform: No such file or directory
> > Unable to run MLton.  Check that lib is set properly.
>
> If /usr/lib/mlton/ is missing, then the original unpacking did not
> work as expected.  It would be best to clean up and re-unpack from
> within a Cygwin bash using the tar command that Matthew sent earlier.
>
>
> BTW, after we get this working, you might also want to try our MinGW
> package, which runs from the Windows command prompt, and doesn't
> require Cygwin.
>
> _______________________________________________
> MLton-user mailing list
> MLton-user@mlton.org
> http://mlton.org/mailman/listinfo/mlton-user
>