Mercury on .NET

Summary

The Mercury compiler has a back-end that targets the Microsoft .NET platform.

Thanks to Microsoft's generous support, both financial and otherwise, we've been able to port Mercury to Microsoft's .NET system. There's a back-end for the Mercury compiler, based on the `--high-level-code' back-end, that compiles to IL, the Microsoft .NET Intermediate Language.

This back-end is enabled using the new `il' grade.

This is still work in progress.

Status

2009-09-25: Currently this back-end does not work and is not being developed.

The release-of-the-day releases of the Mercury compiler include support for generating code for .NET. They also include a port of most of the Mercury standard library and runtime to .NET.

The current release also includes some support for the .NET backend, but coverage of the Mercury standard library for .NET is much improved in the release-of-the-day releases, so if you want to use the .NET back-end, we recommend that you use a release-of-the-day release rather than the official current release.

The bad news

At this point it is still a beta-quality release; it's hard to install, there are still some parts of the standard library which are not yet implemented for this port, it's not well tested, not yet efficient, and may be subject to change in future releases.

The good news

The good news is that the new back-end does support all the standard Mercury language features:

And if you're interested in checking it out, it's available for download today.

For more information, see the README.DotNet file in the Mercury source distribution.

Articles

We have written two general purpose articles, talking about Mercury and the .NET platform.