A List of Mercury Resources

Here’re pointers to Mercury related resources, in no particular order. It’s been updated last time on 2022-11-29. If you have comments or resources to include, I’d like to hear from you. My email address is post at volker-wysk dot de. Or write to the mercury-users mailing list.

Documentation

The list of documentation on the mercurylang.org site

The Mercuy team collects all Mercury documentation in a central place. Here it is.

Examples in the Mercury source distributions

The samples directory in the Mercury source code distribution contains examples for diverse parts of the language.

Limitations

A page about Mercury limitations.

“The current implementation does not yet completely implement the Mercury language. The main limitations of the current implementation are the following.”

An explanation of Mercury grades by Paul Bone

https://plasmalang.org/docs/dev_mercury_grades.html

Adventures in Mercury blog series

This is a series of (long) blog posts, which range from March to December 2011. Paul Bone writes: “There’s also the blog series, not mine, but more”here’s how to” style writing for Mercury is always good.” The “labels” on the right are a sort of a table of contents.

http://adventuresinmercury.blogspot.com/

Developer Documentation

This are documents meant for developers of the Mercury compiler.

Mercury at Wikipedia

https://en.wikipedia.org/wiki/Mercury_(programming_language)

Libraries and Tools

The Mercury Standard Libraries

The standard libraries should be first place to look for libraries. They are documented in the Mercury Library Reference Manual (see Documentation, above).

Extra libraries in the Mercury source code

The “extra libraries” are distributed with the Mercury source code. They are in the extras subdirectory. It consist of 35 libraries (as of 2022-11-24), that are being held up-to-date with respect of the latest Mercury compiler. See the README files for documentation.

Ondrej Bojar’s Mercury Anarchy Archive (Manarchive)

Ondrej has put together some Mercury libraries and called that the Mercury Anarchy Archive. The web site has last been updated in 2007, but it’s still up: https://manarchive.sourceforge.net/

However, the subversion download no longer works. So I’m hosting it here (with Ondrej’s consent): manarchive-code-r84.zip.

It consists of the following packages:

Julian Fondren’s libraries and tools

Julian Fondren has written some Mercury code which he shares. It’s on his Github page. As of 2022-11-24, this consists of the following projects.

Package management with mmc-get and the “Packages” website

mmc-get and the (badly named) “Packages” website have been an approach to set up a Mercury packages database and distribution system. It consist of libraries, tools and other programs such as games. This system seems to be abandoned now. I’ve tried to compile the mmc-get program, but this failed. However, the following are the libraries which are registered there, excluding the ones which are mentioned elsewhere in this collection.

A human-readable form of the full mmc-get database is here. It’s long, so it is on a separate page.

getr-mercury

This is a “benchmarking wrapper around getrusage”. See https://github.com/jrfondren/getr-mercury.

mmc-doc

This is a little program that downloads and displays documentation from mercurylang.org. See https://github.com/jrfondren/mmc-doc.

A Command Line Parser by Volker Wysk

Colipa is a command line parser library. The design goals are:

It is hosted on Gitlab: https://gitlab.com/volkerwysk/colipa.

Julien Fischer’s Mercury libraries

Julien Fischer has 9 Mercury libraries and library bindings on his Github page, as of 2022-11-24. There are libraries for the JSON and CSV formats, bindings of Java things, a library of additional integer types, miscellaneous utilities and more.

Sean Charles’s Mercury code

Sean Charles has 47 projects (as of 2022-11-24) on his Github page, a couple of which are Mercury related.

Sebastian Godelet’s code

Sebastian Godelet has a huge lot of Github projects. Amongst them is a Unicode character database parser and library.

Paul Bone’s Mercury libraries

They haven’t tested these in a while, but this are libraries that Mission Critical opensourced:

An audio player library by M. McDonough

An “OGG decoder library with no foreign code (used in the audio player demo)”: https://github.com/FlyingJester/fjogg

AlaskanEmily’s libraries

AlaskanEmily of Transnat Games, has released the following code:

Other code

About code that isn’t libraries or tools.

Package management with mmc-get and the “Packages” website

The mmc-get database contains, apart from libraries and tools, also some other code. See above.

Distribution

Docker images

Docker is a cross-platform method of sandboxing, packaging and distributing software. See here for an introduction.

Fabrice Nicol is compiling and distributing the Mercury Compiler on a daily basis and is distibuting it as Docker images. This means you don’t need to compile the compiler yourself, when you want the latest and greatest version, and you have set up Docker on your system.

Each Docker image contains both, the latest ROTD version and the latest Git version. He provides three versions of his Docker images, named gentoo4mercruy, ubuntu4mercury and alpine4mercury, which correspond to the Linux distribution with the respective name.

The three versions of Docker images should work under any GNU/Linux 64-bit platform with an appropriate Docker installation.

The name of the GitHub repository refers to the GNU/Linux platform of the Docker guest (respectively, Gentoo, Ubuntu or Alpine), not the host.

The Gentoo distribution is aimed at users who want to build dependencies from source code. The Alpine distribution is aimed at those who would like to test builds against the musl C library or need a more compact image.