Dear y’all and all y’all’s,
Containers is a BSD-licensed standard library extension  that aims at being lightweight, convenient, modular, portable, and only pay for what you use; that includes compatibility with OCaml >= 4.03. This is the second major update in 7 years of existence, following semantic versioning.
Release 3.0 was the opportunity to clean up some inconsistencies (in printers, among others), to focus on the standard
Seq.t type, and to split some sub-libraries into their own packages (
containers-data respectively). The hope is that the new version is more consistent, lightweight, and pleasant to use.
I want to thank all contributors for their hard work, and in particular Fardale.
: as in, containers extends the stdlib and does not intend to replace it.
Overview of breaking changes
(this is extracted from the readme’s migration section)
- The biggest change is that some sub-libraries have been either turned into
their own packages (
containers.iter),or merged elsewhere (
This means that if use these libraries you will have to edit your
- if you use
CCSexpmodule), it now lives in
- if you used anything in
containers.data, you need to depend on the
- Another large change is the removal (at last!) of functions deprecated
in 2.8, related to the spread of
Seq.tas the standard iterator type.
CCVector.of_seqnow operate on this standard
and old-time iteration based on iter
is now named
Here you need to change you code, possibly using search and replace.
Thankfully, the typechecker should guide you.
String.Subhave been removed to simplify the
Stringmore lightweight. There is no replacement at the moment.
Please tell us if you need this to be turned into a sub-library.
Renaming of some functions into more explicit/clear names.
CCVector.remove_unordered, to be
contrasted with the new
map_sndnow transform a tuple into another tuple
by modify the first (resp. second) element.
All the collection pretty-printers now take their separator/start/stop
optional arguments as
Format.formatter -> unit -> unit
functions) rather than strings. This gives the caller better control
over the formatting of lists, arrays, queues, tables, etc.
Removal of many deprecated functions.