Previous week Up Next week


Here is the latest OCaml Weekly News, for the week of October 18 to November 01, 2016.

Sorry for the hiatus, I was away for a week with no internet access.

  1. Docker is hiring in Paris
  2. ocamlbuild 0.9.3
  3. Functor signature "inheritance"
  4. Lwt 2.6.0 – monadic concurrency library
  5. omake-0.10.1
  6. batteries 2.5.3 -- compatible with OCaml 4.04
  7. Mandelbrot fractal
  8. Other OCaml News

Docker is hiring in Paris


Thomas Gazagnaire announced:
Docker is the world's leading software containerization platform, and lets
developers package up their applications into a standardized unit for software
development. The code behind Docker is open-source, and consists of code written
in Go and Python (for the server side), and Go, Swift, C#, C and OCaml (for the
desktop side). Docker for Mac and Windows [1] ship some heavy use of OCaml in
the networking, storage and virtualization subsystems, primarily from the
MirageOS project. Much of this OCaml code is open-source under an ISC/MIT
license and available via OPAM and directly on GitHub [2,3]

Docker is currently hiring for our Paris office [4], primarily for a Core
Software Engineer to work on the UI components of Docker for Mac and Windows
(which has seen very rapid uptake among the Docker community). We are searching
for developers who have a good knowledge of Swift, Objective-C and C#, and a
desire to interface with low-level components written in OCaml and C (the
hypervisor, networking and storage components). We particularly encourage
applications from under-represented groups in technology -- please feel free to
contact me and/or Anil Madhapeddy directly if you have any queries.


ocamlbuild 0.9.3


Gabriel Scherer announced:
## ocamlbuild 0.9.3

ocamlbuild 0.9.3 is a minor release that introduces several features
contributed or requested by users.

- #39: new ".o -> .clib" rule to build libraries out of single C stubs
  (Gabriel Scherer, request by whitequark)

- #78: Integrate the in-progress OCamlbuild manual, previously located at
  into the ocamlbuild repository, in the manual/ subdirectory.
  The most current version of the manual can thus be accessed at
  (Gabriel Scherer)

- #93: added "noassert" and "unsafe" flag for corresponding ocaml{c,opt} options
  (François Pottier)

- #94: added "cc", "cclib", and "ccopt" flags which correspond to the
  respective ocaml{c,opt} options
  (Rudi Grinberg)

- PR#7295: add infer_interface support for various type-checking-time flags:
    color, keep_docs, no_alias_deps, nolabels, nopervasives, open,
    strict_formats, strict_sequence, warn, warn_error
  (Gabriel Scherer, report by Knuth Posern)

## Development and stuff

I haven't been able to devote a lot of personal time to ocamlbuild
hacking in the last year, which means that there has been no new
ambitious features in sight (not that there are any very specific
plans on that front) and that some bugs that have been reported are
still open for kind external contributors to propose a fix for (feel
free to have a look at the bugtracker at ). On the other hand,
quick-to-fix issues and clean external patches get merged rather

They have been several interesting ocamlbuild-related active projects
lately, which you may be interested in, in no particular order:

- Namespaces, from Anton Bachin, is an Ocamlbuild plugin that turns
directories in your source tree into scoped OCaml modules.
  ("Namespaces" is a very overladed word, this work is about turning
filesystem directory structure into logical module path structure; if
you are looking for other kinds of namespace work within the OCaml
community, you may enjoy some old defunct proposal at )

- Sylvain Le Gall recently added omake support to OASIS. If the only
reason you put up with ocamlbuild is because you are an OASIS user,
you may want to have a look at omake, a project that used to be
sleeping but is now maintained by Gerd Stolpmann

- Solvuu-build, from Ashish Agarwal, is a build system, currently
implemented on top of ocamlbuild, that innovates on two separate
front. First, it allows you to describe your build-system logic
entirely within a single ocaml file (ocamlbuild's information tends to
be more spread out with _tags,, foo.mllib files etc.).
Second, it is not only a build system as it also does project
scaffolding by generating a .merlin file, and a foo.install file for
OPAM. I would be very happy to have the "pure OCaml-level API" part at
least merged into ocamlbuild proper, giving an alternative way for
users to specify their build, but that requires some non-trivial
changes to the ocamlbuild codebase that nobody volunteered to
implement yet.

- The (over-)consonantly named ocb-stubblr plugin from David Kaloper
brings more advanced logic to build C stubs, for example using
pkg-config. (It claims to be only 10 lines of code, but it's actually
more than 200). It is not the first ruleset to provide in this space (
one may remember ocamlbuild-ctools from ), but to my knowledge it is
the first to be distributed as a reusable ocamlbuild plugin library
(plugin library support was only introduced in OCaml 4.01 in 2013).

There is a fair amount of experimentation around ocamlbuild plugins,
but so far relatively few of their authors have tried to contribute
reusable bits and pieces upstream. Contributions, from plugin authors
or interested bystanders, are warmly welcome.

Functor signature "inheritance"


Shayne Fletcher asked:
If one wants to include a functor signature in another...

module type EQ = sig
type t
val eq : t * t -> bool

module type EQ_PROD = functor (X : EQ) (Y : EQ) ->
type t = X.t * Y.t
val eq : t * t -> bool

module type ORD = sig
include EQ
val lt : t * t -> bool

module type LT_PROD = functor (X : EQ) (Y : EQ) ->
include EQ_PROD (*What do I say here?*)

​... How does one do that? Is there a syntax for this sort of thing?​
Nicolas Ojeda Bar suggested:
One approach is to name the *output* signature of the functors:

module type EQ_PROD_S = sig
module X : EQ
module Y : EQ
type t = X.t * Y.t
val eq: t * t -> bool

module type EQ_PROD = functor (X : EQ) (Y : EQ) ->
EQ_PROD_S with module X := X and module Y := Y

module type ORD_PROD_S = sig
include EQ_PROD_S
val lt : t * t -> bool

module type LT_PROD = functor (X : EQ) (Y : EQ) ->
LT_PROD_S with module X := X and module Y := Y

Shayne Fletcher then asked:
​Sorry to be a bother. Got another one for you Nicolas​!

How do I achieve the intent of this:

module type EQ = sig
type t
val eq : t * t -> bool

module type NUM = sig
type t
val from_int : int -> t
val ( + ) : t -> t -> t

module type MUL_S = sig
module N : NUM
module E : EQ with type t := N.t

type t = N.t
val mul : t -> t -> t

module type MUL = functor (E : EQ) (N : NUM) -> MUL_S with module N := N and module E := E

The idea is that the modules satisfying EQ and NUM must agree in their type t
and MUL brings them together and adds a 'mul' function.
Nicolas Ojeda Bar then replied:
You can add a constrain to your functor arguments :

module type MUL = functor (E : EQ) (N : NUM with type t = E.t) ->
MUL_S with module N := N and module E := E
Shayne Fletcher finally said:
​Thanks again for all your help, rixed, Gabriel, Nicolas! I wrote up all that I
learned in this exercise, here

Lwt 2.6.0 – monadic concurrency library


Anton Bachin announced:
I am pleased to announce the 2.6.0 release of Lwt.

This release fixes several serious longstanding bugs (see changelog
[1]). The primary work, however, is towards making Lwt easier to
contribute to and maintain. To this end:

- Lwt is now automatically tested on OS X, Cygwin, and Windows, in
 addition to Linux, with more platforms planned,
- there are documentation improvements,
- more test cases are being written,
- there is an initial plan/roadmap page, to be updated with your input
- a Gitter chat has been added [3],
- the issue backlog has been drained somewhat.

The next minor release, 2.7.0, will drop support for OCaml 4.01, and
begin a process of deprecating and very gradually removing obsolete
functions and modules, such as the Camlp4 syntax. This will yield a
smaller Lwt that is easier to understand. [ocaml.deprecated] attributes
will also make it safer to make desirable API changes.

A major near-term goal is to write more thorough documentation for Lwt,
and make Lwt easier to get started with. Please comment on omissions,
misleading parts, etc. (see contact [4]).

After addressing that, ordinary work will focus on quality of the
internals and API, especially with regard to performance.

Comments, issues, and contributions on any subject are welcome :)

Regards from new maintainer,




Gerd Stolpmann announced:
it is my pleasure to announce the another release of omake which is the
first one for six years. It mainly includes performance improvements
for large projects, and a number of bug fixes:

- omake got faster for large projects (this part of the work was
  funded by Lexifi)
- there is a new bootstrap system that unifies Unix and Windows
- it now also works with the MinGW port
- private variables in foreach loops work now as expected
- fixed "rm -rf" so that it never follows symlinks
  (2nd attempt of a fix)
- The "equal" function works also for arrays. This fixes
  a couple of unit tests using this feature.

The new homepage is now
See there for all the other links.

The old homepage is no longer updated (I don't have 
access, and don't know how to take it down).

batteries 2.5.3 -- compatible with OCaml 4.04


Gabriel Scherer announced:
Batteries Included is a community-maintained standard library
extension, with a focus on stability and compatibility. Bug reports,
pull requests and other contributions are warmly welcome, see the
project page at

The library's API documentation at:

Batteries 2.5.3 is now available. This minor release brings
compatibility with OCaml 4.04+beta2, and should be compatible with the
upcoming 4.04 release.

Mandelbrot fractal


Daniel de Rauglaudre announced:
I just updated the program MLbrot to display the Mandelbrot set, I
made some years ago. Written in OCaml.

Together with the sources, there is an executable compiled for Linux
Ubuntu. May work on your computer without having to be recompiled from
the sources. Not sure because I don't know anything about OSes.
Version is 1.02. Enjoy!

Other OCaml News

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

ICFP Roundup: Talk Summaries and OCaml Workshop

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