OCaml Weekly News

Previous Week Up Next Week

Hello

Here is the latest OCaml Weekly News, for the week of December 23 to 30, 2025.

Table of Contents

Release of pacomb 1.4

Christophe Raffalli announced

Dear camlers, I am pleased to announce the release of pacomb 1.4.

Pacomb is a library + ppx to write grammars. It support: self extensible grammars, ambiguous grammars (with merge), late rejection of rule via raising exception from action code, priority and others. Is it relatively fast because it is compiled to efficient combinators. More details are available in the git page and the documentation.

As teaser, the usual calculator example:

(* The three levels of priorities *)
type p = Atom | Prod | Sum

let%parser rec
     (* This includes each priority level in the next one *)
     expr p = Atom < Prod < Sum
            (* all other rules are selected by their priority level *)
            ; (p=Atom) (x::FLOAT)                        => x
            ; (p=Atom) '(' (e::expr Sum) ')'             => e
            ; (p=Prod) (x::expr Prod) '*' (y::expr Atom) => x*.y
            ; (p=Prod) (x::expr Prod) '/' (y::expr Atom) => x/.y
            ; (p=Sum ) (x::expr Sum ) '+' (y::expr Prod) => x+.y
            ; (p=Sum ) (x::expr Sum ) '-' (y::expr Prod) => x-.y

Here is a list of the main changes from 1.3:

  • Add a "not charset combinator" for regexp \[!...\], it is distinct from \[^...\] as it parses nothing.
  • File was not closed by Grammar.parse_file in case of parse error
  • New Grammar.set_debug_merge to allow debugging ambiguous grammars (report by Matthieu Lemerre)
  • Compatibility with latest ocaml and ppxlib
  • Travis action to check compilation
  • Various documentation fix

Possible roadmap for future version:

  • 1.5 : integrate a lexical entry for ocaml code with call back for specific {xxx| … |xxx}. This is code existing in simple_httpd’s chaml parser (equivalent to php but in cocaml), that I wish to integrate in pacomb.
  • 2.0 : rewrite the combinators with algebraic effects. The semantics will be much better than the current implementation using references.

Cheers,

Christophe

Raven Dev Meetings

Continuing this thread, Thibaut Mattio announced

We'll be skipping the dev meeting on the 29th for the holidays, so the next Raven dev meeting will be on Monday, January 5, 2026, at 10:00 AM CET (2:30 PM IST).

Link: https://meet.google.com/giw-bsdy-sjf

Frontmatter_extractor.0.1

Mikhail announced

Hi there! :waving_hand:

I am writing again about my new library, which I must create, because there is simply no alternative available.

Frontmatter_extractor is a small library that extracts the front matter section of a text file. It is commonly used in static content generators (blog engines, etc), such as those that convert Markdown files into HTML or other formats.

Example of usage

let some_text = {|
---
title: "My First Blog Post"
date: 2025-12-1
---

Hello! It's just some text...
|};;

Extract frontmatter as plain text.

# Frontmatter_extractor.of_string some_text;;

- : Frontmatter_extractor.extracted =
{Frontmatter_extractor.matter =
  Some "\ntitle: \"My First Blog Post\"\ndate: 2025-12-1\n";
 body = "\n\nHello! It's just some text...\n"}

Extract the front matter as parsed YAML values. The yaml library needs to be installed.

# Frontmatter_extractor_yaml.of_string_exn some_text;;

- : Frontmatter_extractor_yaml.extracted =
{Frontmatter_extractor_yaml.attrs =
  Some
   (`O [("title", `String "My First Blog Post"); ("date", `String "2025-12-1")]);
 body = "\n\nHello! It's just some text...\n"}

P.S.

It's not fully tested, but it's usable as a first version.

QCheck 0.90: The Great Renaming

Continuing this thread, Jan Midtgaard announced

Version 0.91 of the QCheck packages is now available:

https://github.com/c-cube/qcheck/releases/tag/v0.91

This release adds ocamlmig annotations to most of the renamed combinators, in an attempt to ease migration for users. From my experiments so far, these work pretty well and allowed me to port multicoretests with little effort. Thanks to @raphael-proust for the suggestion and @v-gb for a nice tool! :folded_hands:

Happy migration and testing! :smiley:

Other OCaml News

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.