OCaml Roundup: December 2025 [ocaml-roundup-december-2025]
- January 11, 2026
- Patrick Ferris
December was busy, both personally and in my OCaml-related work. If you haven't been following along have a read of my October and November roundups.
Outreachy December Round [outreachy-december-round]
- January 11, 2026
- Patrick Ferris
December marks the beginning of a new Outreachy round, and I am very excited to be working with Tambe Salome on improving the ocaml-tiff library.
In particular, we will be adding the ability to write TIFF files from raw data. I imagine an API something like:
val write :
('repr, 'kind) Tiff.Data.t ->
Tiff.File.wo ->
unit
So far Salome has been making excellent progress churning through some issues that are blocking us from starting the main project, including:
As a community, the mentors and mentees also had a community call to introduce ourselves to eachother. I am very excited about the Yocaml project and the two Raven projects.
Ppxlib
- January 11, 2026
- Patrick Ferris
If you recall, I discussed the new representation for local constructs in the AST.
Initial OCaml 5.5 Support [ppxlib-5.5-support]
- December 9, 2025
- Patrick Ferris
We recently merged 5.5 support into our main branch (thanks to Nathan for the review). It cast a light on some new features coming to OCaml including the ability to define any structure locally. Most OCaml programmers will be familiar with things like local opens (e.g. let open M in). This has now been extended to include any structure item (more or less, you cannot nest value bindings).
External types have also landed, bringing with them a new "type kind" in the AST. You can read about them in the manual.
It transpires that since then, changes have landed in the compiler that mean just about any OCaml structure item can now be declared locally. I have documented an issue on ppxlib about the problems this will cause for us:
Currently, we only migrate the previously supported structure items that could appear in a let-binding (
let openetc.). Now, however, the compiler allows anything to appear in a local let-binding except additional let-bindings (let let ...) and includes (let include). Whereas the previous change had a 1:1 mapping from a 5.4 AST node to a 5.5 AST node, now we do not and will need to think of a suitable encoding.
Migration Woes
- January 11, 2026
- Patrick Ferris
We had more migration woes in the form of incorrect (or missing) locations for long identifiers (thanks to gasche for the report). Long identifiers, or Longidents are used in OCaml to identify values like Foo.bar or Map.Make(String).t. In OCaml 5.4, each segment of the identifier was given a precise location. This means that in the migration from 5.3 to 5.4 we have to reconstruct those locations.
However, our code didn't do this, instead it simply defaulted to Location.none causing some imprecise error codes in preprocessed OCaml files. For example:
let () = NonExistingModule.run ()
Has the following error:
File "_none_", line 1: Error: Unbound module NonExistingModule
I have proposed a fix which partially brings back locations during the migration. Part of the problem, I think, is that the exact location of long identifiers containing applications (like Map.Make(String).t) is lost. This is because there could be arbitrary white-space in the original source code (e.g. Map.Make (String).t)