Previous week Up Next week


Here is the latest Caml Weekly News, for the week of November 08 to 15, 2011.

  1. ocamlnat 0.1.0 release
  2. New GADT iteration
  3. Other Caml News

ocamlnat 0.1.0 release


Benedikt Meurer announced:
This post announces the 0.1.0 release of the ocamlnat project, which aims to 
provide a native code toplevel for the OCaml language, that is mostly 
compatible to the byte code toplevel, but up to 100 times faster.

Home page:
Forge page:
GitHub page:

Current features:
- Support for x86 and x86-64 processors running Unix-like systems (tested 
with Linux and Mac OS X), and experimental support for Win32.
- Mostly compatible with the byte code toplevel `ocaml`, although some 
functionality is not provided (yet), i.e. tracing does not work.
- Includes an implementation of the linear scan register allocator for 
increased performance (default is currently the old graph coloring register 
allocator for well-known stability).
- Separated from the OCaml distribution, can be installed in addition to an 
existing OCaml 3.12.1 installation.
- Experimental Findlib support, provides a mostly working Topfind interface 
similar to what Findlib provides for the byte code toplevel.

Open issues:
- Better Findlib integration; packages should install .cmxs files for loading 
into the native toplevel. Any ideas/help welcome.
- Porting to additional architectures (ARM, PowerPC).
- Windows port.

New GADT iteration


Jacques Garrigue announced:
Some of you may already be aware that GADTs are available in trunk,
since this summer. Information is available here:

As you can see in the presentation, this first iteration had some
limitations (particularly it was mostly incompatible with objects and
polymorphic variants), which led us to try a new approach.

In this new iteration it is guaranteed that an ambiguous type cannot
escape the scope of a GADT pattern-matching, which leads to
(hopefully) more intuitive type inference, and allows to combine GADTs
with objects and polymorphic variants. The syntax is unchanged.

As this approach depends crucially on the above property of ambiguous
types not escaping, it requires as much testing as possible.
This is why I would like to invite interested people to test it and
report strange behavior.
The new code is in the branch  branches/gadts-devel, or

Sample code is available in the subdirectory testsuite/tests/typing-gadts.
It includes Alain Frisch's example for safe type introspection,
extended with variants.

Please tell me if you find some unsoundness, or you cannot understand
why you get an error.
Markus W. Weißmann then said:
I've added a port "ocaml-devel" to MacPorts that builds the gadt-devel branch 
(checked out from svn, revision 11273);
so for users of MacPorts you can simply deactivate your current ocaml 
installation and install ocaml-devel to give it a try.

$> sudo port -f deactivate ocaml
$> sudo port install ocaml-devel 

The ocaml libraries from MacPorts will not accept the development snapshot 

Other Caml News

From the ocamlcore planet blog:
Thanks to Alp Mestan, we now include in the Caml Weekly News the links to the
recent posts from the ocamlcore planet blog at

Modular Semantics for Brainfuck:

Release 2.0-alpha:

First release 0.1:

Old cwn

If you happen to miss a CWN, you can send me a message and I'll mail it to you, or go take a look at the archive or the RSS feed of the archives.

If you also wish to receive it every week by mail, you may subscribe online.

Alan Schmitt