Hello Here is the latest OCaml Weekly News, for the week of May 27 to June 03, 2025. Table of Contents ───────────────── First alpha release of OCaml 5.4.0 Combining LLVM MC, lld, precompiled C and bytecode Uniqueness for Behavioural Types · KC Sivaramakrishnan A ppx for denoting unreachable branches Sound on OCaml on Windows Opam repository archival, phase 3 Peer-Programming in Modern OCaml with ChatGPT and Gemini Old CWN First alpha release of OCaml 5.4.0 ══════════════════════════════════ Archive: octachron announced ─────────────────── Four months after the release of OCaml 5.3.0, the set of new features for the future version 5.4.0 of OCaml has been frozen. We are thus happy to announce the first alpha release for OCaml 5.4.0. This alpha version is here to help fellow hackers join us early in our bug hunting and opam ecosystem fixing fun (see below for the installation instructions) [^1]. The progresses on stabilising the ecosystem are tracked on the [opam readiness for 5.4.0 meta-issue]. The full release is expected around the end of July [^2]. If you find any bugs, please report them on [OCaml's issue tracker]. If you are interested in the ongoing list of new features and bug fixes, you can have a look at [the changelog for OCaml 5.4.0]. Happy hacking, Florian Angeletti for the OCaml team [opam readiness for 5.4.0 meta-issue] [OCaml's issue tracker] [the changelog for OCaml 5.4.0] Installation Instructions ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ The base compiler can be installed as an opam switch with the following commands on opam 2.1 and later: ┌──── │ opam update │ opam switch create 5.4.0~alpha1 └──── The source code for the alpha is also available at these addresses: • GitHub: • OCaml archives at Inria: Fine-Tuned Compiler Configuration ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ If you want to tweak the configuration of the compiler, you can switch to the option variant with: ┌──── │ opam update │ opam switch create ocaml-variants.5.4.0~alpha1+options └──── where `option_list' is a space separated list of `ocaml-option-*' packages. For instance, for a flambda and no-flat-float-array switch: ┌──── │ opam switch create 5.4.0~alpha1+flambda+nffa ocaml-variants.5.4.0~alpha1+options ocaml-option-flambda ocaml-option-no-flat-float-array └──── All available options can be listed with `opam search ocaml-option'. [^1]: The release process is described at . [^2]: See also the [prospective release calendar]. [prospective release calendar] Combining LLVM MC, lld, precompiled C and bytecode ══════════════════════════════════════════════════ Archive: Continuing this thread, jbeckford announced ─────────────────────────────────────────── The latest update `2.3.202505282324' (see top post for links) has several fixes: 1. Using `./dk -O ReleaseSmall Exe' now has a working Windows target. The generated Windows executables do not require Visual Studio at runtime. 2. A use-after-free bug has been fixed which mainly affected cross-compilation for the Linux target. 3. Using a new `./dk gc clear' command will remove all the cache space. 4. A bug has been fixed with the auto-updates where it downloaded up to 5 updates and then reverted to the original. Uniqueness for Behavioural Types · KC Sivaramakrishnan ══════════════════════════════════════════════════════ Archive: Shon announced ────────────── A ppx for denoting unreachable branches ═══════════════════════════════════════ Archive: Charles Averill announced ───────────────────────── I wanted a semantic construct to specifically denote unreachable control-flow branches, so here it is. Prints out an error with file and line number upon being erroneously reached. Sound on OCaml on Windows ═════════════════════════ Archive: Steve Sherratt announced ──────────────────────── Opam repository archival, phase 3 ═════════════════════════════════ Archive: Hannes Mehnert announced ──────────────────────── Dear everyone, the phase 3 of the opam repository archival (taking the x-maintenance-intent into account) is now ready. We ran on 30th of May the maintenance-intent filter, which resulted in 6463 candidates of which we'd like to archive 5714. The full list is below, the PRs are at and . The proposed merge date is on June 9th, so a week from now. In case you encounter (a) a breakage or (b) a package and version that you'd like to retain, please report this (best as a comment to ) The list of to-be-archived packages: /editor’s note: please see the post link for the long list of packages/ Peer-Programming in Modern OCaml with ChatGPT and Gemini ════════════════════════════════════════════════════════ Archive: Thomas Letan announced ────────────────────── It’s 2025, and it’s becoming harder to ignore that LLMs are here to stay, and are changing the way we are programming at large. Or at least, it feels like it. For a while, I’ve been kind of a /gaulois réfractaire/ myself, when it comes to adopting this technology. Over the month of May, I decided to change that, and at least /try/ to integrate them in my daily toolkit. Since I write OCaml professionally, I picked an arbitrary project in a domain I wasn’t familiar for, to see the impact of LLMs on a more niche language (no offense ahah). After the fact, [I wrote a devlog of the exercise]. In particular, I got myself familiar with EIO in the process, and I wanted to discuss the following part of my article with the OCaml community My personal conclusion is that LLMs are not ready for any real programming task involving Eio, and I am really curious to understand why. Do they keep hallucinating functions because Eio is a really generic name, and maybe they are mixing context from the Python library with the OCaml one? Or is it because the API of Eio has changed a lot over the years? I am also wondering how, as a the author of a library, I can fix a similar situation. Assuming ChatGPT starts assuming false statements about `cohttp-connpool-eio', how do I address this? I suspect being “LLMs-friendly” will be increasingly important for a software library’s success. For a while, people learnt to become search engine friendly. They turned themselves into export of Google algorithm, etc. Will we do the same thing with LLMs? Are there guidelines? How can we “fix” at our level a situation where a LLM got a software library we wrote completely wrong? I’d be curious to hear your thoughts. [I wrote a devlog of the exercise] 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]. [Alan Schmitt] [send me a message] [the archive] [RSS feed of the archives] [caml-list] [Alan Schmitt]