[MLton-user] Re: [MLton] windows version

Vesa Karvonen vesa.a.j.k at gmail.com
Tue May 29 22:49:59 PDT 2007


Hi,

Following the mailing list policy (http://mlton.org/Contact), I have
cc'd the post to the MLton users list.

I'm afraid I don't have time to help with Cygwin or the Cygwin Bash
shell.  However, here are a few quick pointers and a little more.

There are several tutorials (http://mlton.org/StandardMLTutorials) and
books (http://mlton.org/StandardMLBooks) on programming in Standard
ML. If you haven't already, I strongly recommend that you read one or
more of those. The following page http://mlton.org/StandardMLGotchas
might also be helpful.

MLton is (just) a compiler for Standard ML. You first write a SML
program using whichever text editor you prefer (notepad even, although
I would recommend learning one with SML syntax highlighting like
Emacs+sml-mode) and then give the program to MLton and it produces an
executable for you (or more likely it will just report the syntax
errors and type errors in your program that you will then need to fix
;-).

MLton is invoked from the command line.  Suppose you have the
following SML program stored in the file hello.sml:

  val () = print "Hello, world!\n"

You would then compile it by executing a command like:

  mlton hello.sml

Assuming there were no errors, you can then run the produced executable.

In the Cygwin Bash shell you can use the man (as in MANual) command to
see documentation on commands.  For example, you can see the MLton
manual page by executing the command

  man mlton

By executing the command

  man man

you'll see the manual page of the man command itself.

I'm sure there are various tutorials on using the Bash shell and
Cygwin, but I don't know of a list of such resources offhand.

-Vesa Karvonen

On 5/30/07, Edward Molnar <goaks at frontiernet.net> wrote:
> Hello Vesa,
>
> First of thanks for taking the time to help me. Using cygwin
> is pretty new to me. I do have emacs installed and gcl_x
> installed, but that was pretty simple. I actually would like
> to install the latest version of lisp, but that is another
> subject.
>
> Ok, I do have cygwin installed and have unziped the mlton
> files into the usr directories under cygwin.
>
> I do have emacs installed in it's own directory.
>
> I have no clue on how to run ml, edit the files unless I use
> emacs and tie it all in ... This is where I need some (a lot
> of) guidance.
>
> Also, do I move the cygwin1.dll to a windows directory?
>
> If you can explain using crayons, that would be great!
>
> Thanks
>
> Ed
>
> -----Original Message-----
> From: Vesa Karvonen [mailto:vesa.a.j.k at gmail.com]
> Sent: Tuesday, May 29, 2007 2:33 AM
> To: Edward Molnar
> Cc: MLton at mlton.org
> Subject: Re: [MLton] windows version
>
> On 5/29/07, Edward Molnar <goaks at frontiernet.net> wrote:
> > Is there a window version of MLton?
>
> MLton runs on both Cygwin (http://mlton.org/RunningOnCygwin)
> and MinGW (http://mlton.org/RunningOnMinGW).  On Windows,
> I've been mostly using the MinGW version.
>
> > If so can you direct me to the link to get it, and
> instructions for
> > installation?
>
> Previous releases can found from the
> http://mlton.org/Download page. I just compiled a new
> snapshot on MinGW.  You can find it from the
> http://mlton.org/TemporaryUpload page.
>
> In either case (Cygwin or MinGW), the installation procedure
> is basically to untar the package to an appropriate
> directory depending on your Cygwin or MinGW installation.
> Either you untar the package in such a way that the contents
> of the directories from the MLton package (bin, lib, man)
> are copied to the corresponding Cygwin or MinGW directories
> or you untar the package somewhere else and setup various
> paths to point there.
>
> -Vesa Karvonen



More information about the MLton-user mailing list