[mercury-users] query

Ralph Becket rafe at cs.mu.OZ.AU
Mon Mar 3 22:26:24 AEDT 2003

Trinity Palakkad, Monday,  3 March 2003:
> hi
> I have encountered some problems while running programs in Mercury. I tried 
> to compile the HelloWorld program in your tutorial, but i could not run it. 
> can u please define the exact steps to compile a mercury program?

Download and install the latest stable release 0.11 of the compiler or a
more recent ROTD.

Then put the following in a file called `hello.m':

% Start of hello.m
:- module hello.
:- interface.
:- import_module io.

:- pred main(io, io).
:- mode main(di, uo) is det.

:- implementation.

main(!IO) :- io.write_string("Hello, World!\n", !IO).
% End of hello.m

Then invoke `mmc --make hello' on the command line.

You should then have an executable file called `hello' (or `hello.exe'
on a Windows installation).

mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe

More information about the users mailing list