Repository activity
40458 results across all weeks
Proposal nested record definitions
Since OCaml 4.03, inline records in variant constructors have proven to be a valuable feature. This PR extends the same mechanism to record fields:
David Sancho (@davesnx)Rawident printing: more fixes
This PR fixes the issues when printing raw identifiers that I noticed when looking at the uses of %s in Pprintast and Oprint when reviewing #15118.
Florian Angeletti (@Octachron)Re-implement weak hashsets using open-addressing with linear probing.
The Weak.Make module of the standard library provides "weak hashsets", sets of elements that are only kept alive if something else in the program keeps them alive. The typical use-case is to implement hash-consing: whenever building a new term, look for an equivalent term that would already be in the hashset and use it instead, increasing memory sharing. Has…
Gabriel Scherer (@gasche)Recursive module declarations and type constraints parsing inconsistency
I encountered another parsing inconsistency similar to #14874.
314eterRegression in printing of shadowed predef types
(It's likely this is more widespread than predef types, but I can only easily come up with examples that use predef types.)
Nick Roberts (@ncik-roberts)Reject extension on module-dependent functor type domain
The Ptyp_functor production parsed an ext_attributes for the module domain but used only the attribute list, silently dropping the extension part (the %ext in (module%ext M : S) -> t).
hhugoRemove the instrumented runtime
Following on from #15117 for 5.6, this PR removes the instrumented runtime completely. This has been entirely produced by Claude - my input was mostly to bike-shed early deprecation decisions and delete superfluous comments. I've allowed it to pontificate in two areas because I'm open to suggestions as to what to do:
David Allsopp (@dra27)Thread-local storage, take 3
This PR is the third PR to propose thread-local storage, after
Gabriel Scherer (@gasche)Unify returns result rather than raising an exception
I have noticed that almost all calls to unify are directly wrapped inside an exception handler. The cases where we don't have a direct exception handler are the exception that most of the time just expect the unification to never fail.
Samuel Vivien (@samsa1)Use of In_channel.input_all prevents compiling files >= 16 MB on 32-bit architectures
Since d08ce5b604cce1a47a3cc04980b00903fa227ca8, sources are read in one go with In_channel.input_all, which fails with >= 16 MB files on 32-bit architectures (cf. https://github.com/ocaml-community/Camomile/issues/16). I'm not sure whether this should be considered a bug or (not supported) feature.
Stéphane Glondu (@glondu)`Str.string_partial_match`: make sure captured groups are valid
In some rare cases, Str.string_partial_match could result in a captured group with beginning > end. For example, "ab" partially matched against \(\(a\)b\)+. Group 2 has beginning = 2 and end = 1. This can cause errors in Str.matched_group and in Str.replace_match. The fix implemented in this PR is just to record groups with beginning > end as not matched.
Xavier Leroy (@xavierleroy)`Unix.map_file`: protect against overflow when computing the data size
Fixes: OSEC-2026-22
Xavier Leroy (@xavierleroy)add a new warning for syntactically unerasable optional argument
This PR is a variation on #12739: it adds add a new stricter warning for optional arguments that are not followed by a unlabelled argument in the same abstraction, for instance
Florian Angeletti (@Octachron)compress the definition of path compression
I was reading a commit of @Octachron ( fe04c3e4c055cb0ebf25edf6b1e077ee2023e96c ) and felt frustrated/confused by the fact that the logic to do path compression is repeated three times in types.ml currently. I propose the following refactored version, which I suspect could be easier to evolve in the future.
Gabriel Scherer (@gasche)docs: describe compiler configuration as static
Describe -config and -config-var consistently as reporting the compiler's static configuration. The wording is synchronized across command-line help, the reference manual, and the ocamlc/ocamlopt man pages.
John Riley (@jrile018)feat(typing): add support for optional polymorphic parameters
Encode optional polymorphic parameters as Tpoly (ty option, vars).
Alistair (@johnyob)improve the Domain.DLS documentation
The current documentation of Domain.DLS is minimalistic:
Gabriel Scherer (@gasche)manual: update higher-rank polymorphism for OCaml 5.5
Update the higher-rank polymorphism tutorial for the polymorphic parameter support introduced in OCaml 5.5.
John Riley (@jrile018)meta-issue - GC pacing logic changes
This is to keep track of the work on the GC pacing logic.
Damien Doligez (@damiendoligez)ocamldep exits 0 with no output when a source file does not exist
ocamldep prints nothing and exits 0 when a source file given on the command line does not exist. An unreadable file exits 2.
Thomas Gazagnaire (@samoht)