Melbourne Mercury Compiler

Implementation of programming language Mercury

The official (and the only) implementation of Mercury. It provides a compiler which converts Mercury code to C one. The compiler is written in Mercury itself, and was bootstrapped using NU-Prolog and SICStus Prolog.


Hello, World!:

Example for versions Mercury 10.04
 :- module hello.
 :- interface.
 :- import_module io.
 :- pred main(io::di, io::uo) is det.

 :- implementation.
 main(!IO) :-
 	io.write_string("Hello, World!\n", !IO).