[ANN] containers 3.12

I’m happy to announce the release of containers 3.12.

Containers is a lightweight and modular extension of the standard library. It enriches existing modules and adds a few that are missing.

In this release, the highlights are:

  • more functions in Set and Array
  • a new containers.pp sublibrary, with Wadler-style pretty printing combinators
  • improvements to the parser combinators (CCParse)
  • a whole bucket of bugfixes
31 Likes

@c-cube it’s exciting to see a new library in the area of pretty-printing. Would you mind saying a little about how this compares to GitHub - fpottier/pprint: A pretty-printing combinator library for OCaml ?

It’s probably pretty similar to Pprint.

I honestly did not look too much into how Pprint works, because of its
incompatible license (as mine would be BSD rather than LGPL).
So I can’t say for sure that we have the same mechanism for linear time
printing without lazyness.

For the most part, I wanted something simple (containers.pp is less
than 500 loc), permissively licensed, and with an extension node for
styling/colors/Format-like tags (the initial use case being HTML tags
and ANSI escape sequences in the output). I also wanted to really grasp
how these Wadler-style combinators work :-).

If you’re familiar with Pprint I don’t think containers.pp brings much
to the table. But if you already use containers, it comes with it and
follows semver and all that.

1 Like