OCaml Weekly News
Hello
Here is the latest OCaml Weekly News, for the week of March 17 to 24, 2026.
Table of Contents
Introducing atdml (experimental)
Martin Jambon announced
ATD 4.0.0 was released today on opam.
This release introduces atdml, an experimental replacement for atdgen.
The goal is to modernize the implementation and make it easier to extend, while keeping compatibility with existing ATD workflows.
Here's a sample input file example.atd:
type location = {
row: int;
column: int;
?file: string option;
}
Atdml is invoked as follows, normally by the build system:
$ atdml example.atd
It produces a pair of mli and ml files. This is example.mli:
(* Auto-generated from "example.atd" by atdml. *)
type location = {
row: int;
column: int;
file: string option;
}
val create_location : row:int -> column:int -> ?file:string -> unit -> location
val location_of_yojson : Yojson.Safe.t -> location
val yojson_of_location : location -> Yojson.Safe.t
val location_of_json : string -> location
val json_of_location : location -> string
module Location : sig
type nonrec t = location
val create : row:int -> column:int -> ?file:string -> unit -> t
val of_yojson : Yojson.Safe.t -> t
val to_yojson : t -> Yojson.Safe.t
val of_json : string -> t
val to_json : t -> string
end
Release notes: https://github.com/ahrefs/atd/releases/tag/4.0.0
Documentation: https://atd.readthedocs.io/
Project page: https://github.com/ahrefs/atd
Experimental module imports in ATD (ATD 4.0.0)
Martin Jambon announced
ATD 4.0.0 adds experimental support for imports between ATD files.
This allows splitting schemas across multiple files in a natural way.
Currently supported in:
- atdml (OCaml)
- atdpy (Python)
- atdts (TypeScript)
Example:
from utils as u import email type email_addresses = u.email list
Details: https://github.com/ahrefs/atd/releases/tag/4.0.0
For an earlier discussion of the design, see https://discuss.ocaml.org/t/rfc-multifile-atd-definition-support-via-import-statements/17881].
Dune 3.22
Shon announced
The Dune team is pleased to announce the release of dune 3.22.0.
In addition to many fixes and small improvements, notable highlights of this release include:
- Fixes to the dune cache on Windows, thanks to @Nevor in ocaml/dune#13713.
- New tracing functionality, to inspect and diagnose the build processes thanks to @rgrinberg across many PRs. See the documentation.
- Addition of the
dune-action-tracelibrary, to instrument trace emission, thanks to @rgrinberg. - Support for generating odoc documentation in markdown via the
@doc-markdownbuild alias thanks to @davesnx ocaml/dune#12581. - Full support for OxCaml's parameterised libraries, thanks to @art-w and @maiste. To learn more, see the docs.
See the full changelog for all new features and fixes, and for attribution to the contributors who made it all possible. Thank you, contributors!
If you encounter a problem with this release, please report it in our issue tracker.
Parseff: parser combinator library for OCaml 5
David Sancho announced
Hi everyone,
I’m sharing Parseff, a parser combinator library for OCaml 5.
If you like parser combinators but don’t love writing everything in monadic style, Parseff is built for that. Parsers are plain functions (unit -> 'a) and you compose them in direct style, while Parseff handles backtracking and streaming under the hood (using effects!)
Why Parseff
- Direct-style API: write sequential OCaml code, no
>>=,let*, or applicative operator chains required. - Typed errors: raise domain errors with polymorphic variants via
Parseff.error. - Streaming input: same parser works with
Parseff.parse(string) andParseff.parse_source(stream). - Zero-copy + fused ops: span APIs and fused operations for hot parsing paths.
- Domain-safe execution: parse calls are self-contained (no global mutable state).
- Automatic backtracking with
Parseff.or_ - Minimal dependency footprint: only
refor regex
Performance
In the included benchmarks, Parseff is faster than Angstrom and MParser:
- around ~2x in fair comparisons
- up to ~4x+ with zero-copy optimized paths
Benchmark details and code are in the repo docs.
## Documentation
I’ve put a lot of effort into the docs (quick start, guides, and API pages) to keep Parseff easy to learn. A bit proud of using odoc’s Markdown backend plus mdx, I can generate and check examples on the fly, so snippets stay type-safe.
Install
opam install parseff -y
Links
- Docs: https://davesnx.github.io/parseff/
- Comparison guide: https://davesnx.github.io/parseff/guides/comparison/
- GitHub: https://github.com/davesnx/parseff
If you try it, I’d really value feedback on: API ergonomics, error handling experience or missing combinators or docs gaps!
Thanks!
Outreachy Demo Day for December 2025 Round
Continuing this thread, Patrick Ferris announced
The recording of our (nearly two hour!) meeting is now online: https://watch.ocaml.org/w/8aUqMhFvhQGq4WJLH3ukjA !
Thank you to everyone who joined :two_hump_camel:
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 to the caml-list.