[ANN] containers 3.6

Howdy y’all :cowboy_hat_face:,

Containers 3.6 has just been merged on opam. Containers is a stdlib extension (not replacement) that aims at being lightweight, fast, and modular. This release comes with a renaming of CCOpt to CCOption (and associated deprecation, although it will not happen before 4.0), along with bugfixes and a revamp of the CCParse module.

The new CCParse is a small library of parser combinators that ships directly with containers, and is intended for small parsers (where scanf would be used otherwise, typically). In particular, I’ve tried to make it possible to mix “regular” forward parsers, and ad-hoc parsers based on splitting input on tokens (e.g. splitting into lines, splitting on a separator like ,, etc.). The API is here and there are some examples:

This module is still pretty experimental, so feedback is very welcome. Special thanks to @Fardale for his review.

Changelog and release are here.

17 Likes

Do you know which projects in the opam repository use the CCOpt module?

From my side, I updated the latest soupault code to use CCOption and my other projects don’t use that module, so I’m ready for CCOpt removal.

1 Like

Almost all my code uses CCOpt, for a start :grin:. People who open Containers, however, should be protected.

1 Like

FWIW I use CCOpt pretty liberally. I did a grep -R CCOpt code | wc -l and got 345 hits. At least fixing should just be a sed away.

1 Like