Previous week Up Next week


Here is the latest OCaml Weekly News, for the week of August 23 to 30, 2016.

  1. OCaml 4.04.0+beta1
  2. Asetmap 0.8.0
  3. CSML: bindings between OCaml and .NET (now fully open-source!)
  4. Emacs + OCaml = Ecaml
  5. Other OCaml News

OCaml 4.04.0+beta1


Continuing this thread, Louis Gesbert said:
I confirm what has been said before: opam follows the Debian convention of
having `1.0~foo` < `1.0` < `1.0+foo` ; and you would generally write the
constraint as `< 4.04` to exclude `4.04.0~beta` from the range, although for
finer constraints you can need a suffix `~`, e.g. `< 4.04.1~` to avoid including
`4.04.1~beta`. But constraints shouldn't depend on patch versions right ?

On the other hand, constraints such as `>= 4.04.0` don't include betas if named
`4.04.0~beta`, while it would include `4.04.0+beta`


For the curious about handling compiler versions in opam 2.0, here follows a
glimpse on how that will be done. For the not-that-curious, let it just be said
that beta versions (`x.xx.x+beta`) are handled just like other "variants" (e.g.
`x.xx.x+fp`) and as such won't get picked up by default, so this won't really be
a problem for now.

OCaml implementations are split into three different, mutually conflicting

- Stable OCaml release are packaged as `ocaml-base-compiler.version`
- Any other OCaml version (with a `+foo` suffix) is packaged as
- The system compiler, if installed, is available through a dummy package called

Then there is a wrapper package that is named `ocaml` proper, and that has the
corresponding OCaml base version (i.e. `4.03.0` for all packages with versions
`4.03.0+foo`); this is the one all normal packages are expected to depend on, so
that they don't need to consider every variant. In addition, this package polls
the compiler installation to define a few variables such as

This scheme allows to have the package work with `4.03.0+flambda` with a
dependency to `ocaml = 4.03.0` rather than needing`>= 4.03.0 & < 4.03.1~` ; but
it also means that any beta or +prXX version will be treated as the main version
(as was the case with the `available:` field and `ocaml-version` variable). Note
that the ordering of versions of `ocaml-variants` is mostly irrelevant; but the
beta could indeed get packaged as `ocaml-base-compiler.version~beta` if we want
to give it the same level of advertisement as compiler releases.

The rewrite is already available and a mirror is present at , to which the "master" version of opam gets
automatically redirected.

Note that this scheme could be simplified once we handle a `provides:` field.
But since this brings a whole lot of complications of its own, one thing at a

An alpha of opam 2.0 featuring all this, and much more, will be announced
shortly for anyone keen on helping to test it :)

Asetmap 0.8.0


Daniel Bünzli announced:
Some code I cut and pasted too often is now distributed in asetmap under the ISC

asetmap provides slightly tweaked OCaml standard library Set and Map
functors. asetmap tries to maximize compatibility with the standard
library. It essentially gets rid of `Not_found` exceptions and provide
pretty-printers for the data types.



CSML: bindings between OCaml and .NET (now fully open-source!)


Alain Frisch announced:
Back in 2008, LexiFi released a first public version of CSML, a bi-directional
and high-level binding generator between OCaml and .NET. At that time, only the
runtime support was open sourced and the generator itself was released only in
binary form.  Following user request, it is my pleasure to announce that we have
switched to an open-source model for the tool.  CSML is now fully licensed under
the terms of the MIT license and hosted at:

CSML hides all low-level details of the binding process and makes it easy to:

  - package OCaml value-added components under a .NET API;

  - use .NET components from an OCaml application (e.g. UI, MS Office interop,
Win32 system programming, etc).

Emacs + OCaml = Ecaml


Jeremie Dimino announced:
Good news everyone! ​You no longer need to rewrite Emacs from scratch to ​be able
to hack it in OCaml.

You can now use Ecaml, a library for writing Emacs plugin in OCaml:

It is using the new Emacs 25 support for loading dynamic modules.​ We
successfully used it to run ​Async code as well as expectation tests inside

Y​ou can install ​Ecaml​ using our development opam repository:

opam ​repo add janestreet
opam ​install ecaml

Other OCaml News

From the ocamlcore planet blog:
Here are links from many OCaml blogs aggregated at OCaml Planet,

Full Time: Software Developer (Functional Programming) at Jane Street in New York, NY; London, UK; Hong Kong

Perfectly balanced binary search trees

Full-Stack Developer (Haskell/PureScript) at CollegeVine (Full-time)

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