Mercury (programming language)

This is an old revision of this page, as edited by Kenyon (talk | contribs) at 04:16, 15 May 2005 (Please help out by clicking here to fix someone else's Wiki syntax). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Mercury is a functional/logical programming language based on Prolog, but more useful for real-world programming.

Mercury is compiled rather than interpreted, as is traditional for logic languagues. It features a sophisticated, strict type and mode system. Its authors claim these features and logic programming's abstract nature speeds writing of reliable programs. Mercury's module system enables division into self-contained units, a problem for past logic programming languages.

Hello World in Mercury:

 :- module hello_world.

 :- interface.

 :- import_module io.

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

 :- implementation.

 main -->
 	io__write_string("Hello, World!\n").

(by Ralph Becket at the University of Melbourne):

Mercury is developed at the University Of Melbourne Computer Science department under the supervision of Dr. Zoltan Somogyi.

Unfortunately, the current Mercury implementation lacks user level documentation (only reference documentation exists). Thus it is almost unused outside the team of its creators.

See also