Previous week Up Next week


Here is the latest OCaml Weekly News, for the week of October 04 to 11, 2016.

  1. BAP 1.0.0
  2. Encoding "links" with the type system
  3. Blockchains in OCaml
  4. Other OCaml News

BAP 1.0.0


Continuing this thread, Anil Madhavapeddy announced:
This has now been merged into OPAM repository and so should be available without
the remote repository soon.

I just wanted to thank Ivan for going through a huge amount of testing effort
before submitting the PR, as can be seen here:

If anyone finds any issues after the merge, please do feel free to raise an
issue on

Encoding "links" with the type system


Andre Nathan continued this thread:
This is an interesting way to derive the GADT, at least for me, as I
have never did any logic programming. The resulting API is a bit easier
to use than the one from Jeremy's idea, at least for my use case.

I'm using this idea to experiment with a type-safe SQL query builder,
which so far looks like this:

  from Team.table
    |> belonging_to Team.owner   Here
    |> having_one Project.leader Here
    |> select
        |> fields [field; field] (Next Here)
        |> fields [field; field] (Next (Next Here))
        |> fields [all Project.table]              Here

This generates the following query:

    users ON = teams.owner_id
    projects ON projects.leader_id =

I'm not sure if this will ever be of use in practice, as the Next/Here
stuff might be too complicated for users, but overall I'm quite happy
with the result and what I've learned, though of course it's far from
complete (e.g. no support for WHERE clauses).
Daniel Bünzli then said:
You may be interested in looking at this

Blockchains in OCaml


Arthur Breitman announced:
Since blockchains tend to be a hot topic these days*, I am pleased to announce
that OCaml is also present in this domain with the Tezos project.

Tezos is a cryptographic ledger (in the same vein as Bitcoin or Ethereum)
written from scratch entirely in OCaml, in partnership with OCamlPro.

We are lucky to rely on some great OCaml libraries like Irmin and Lwt, and have
contributed some libraries of our own like ocplib-json-typed (for reliable
manipulation of JSON values) and ocplib-resto (for type safe HTTP/JSON RPCs).

Tezos is a self-amending ledger. While other protocols achieve consensus about
the state of their transactions, Tezos reaches a meta-consensus about its own
protocol. This allows us to gradually build governance rules into the ledger by
letting the participants choose under which condition the protocol may be

We start with a simple voting procedure to accept or reject a proposed patch to
a set of OCaml modules representing the protocol. Over time, complex rules can
evolve. For instance, we may introduce a form of constitutionalism by having the
protocol require and enforce that any proposed modification be formally verified
and guaranteed to preserve specific properties.

If you find this intriguing and enjoy working in OCaml, please reach out: we're
hiring! If you lean on the academic side and have experience with formal
verification, reach out as well! We'd be interested in proving the correctness
of some aspects of the protocol or sponsoring research in the field in general
(within our modest means).


* perhaps hotter than it ought to be but, past the hype, there remains substance

Other OCaml News

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

Five stages of accepting constructive mathematics

Forge migration to a new host, delayed

Forge migration to a new host during the weekend

Conversion operations of the lambda-calculus

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