[ANN] latest batteries release: v3.3.0

Dear OCaml users,

The batteries maintainers are pleased to announce the latest minor release of OCaml batteries-included: v3.3.0.
Batteries is an open-source, community-maintained, extended standard library for OCaml.
The latest version is available in opam.

Many thanks to all the contributors for this release!

The change log follows:


v3.3.0 (minor release)

  • Several fixes for OCaml-4.12
    #994, #992,
    (kit-ty-kate)

  • Support for ocaml-multicore in the Gc module
    #991
    (kit-ty-kate, review by Gabriel Scherer)

  • Significant work preparing switch to dune
    #1025, #1024, #1023, #1022, #1021, #1020, #1019, #1017
    (Gabriel Scherer, review by Francois Berenger)

  • Remove -rectypes from BatFingerTree and simpler implementation
    #1012
    (Gabriel Scherer)

  • new BatEither module; available in all OCaml versions supported by batteries
    #1027
    The implementation comes from the stdlib and is due to Gabriel Scherer.
    (Francois Berenger, review by Gabriel Scherer)

  • BatList.partition_map: ('a β†’ ('b, 'c) BatEither.t) β†’ 'a list β†’
    'b list * 'c list
    #1028
    (Francois Berenger, review by Gabriel Scherer)

  • BatSet: added several missing methods for compatibility with stdlib.
    The implementation of filter, map and filter_map was adapted from
    stdlib, authors of the original implementation are Xavier Leroy,
    Albin Coquereau and Gabriel Scherer
    #1006, #1008
    (Jakob Krainz, review by Gabriel Scherer)

  • BatSeq: compatibility with stdlib.Seq
    #1005, #1007
    (Jakob Krainz, review by Gabriel Scherer)

  • BatMap, BatSplay: find_first, find_first_opt, find_last, find_last_opt,
    to_rev_seq
    For compatibility with the stdlib.
    The implementation in BatMap was adapted from stdlib;
    authors of the original implementation are Albin Coquereau
    and Gabriel de Perthuis.
    #1000, #1031
    (Jakob Krainz, review by Gabriel Scherer)

  • BatArray.remove_at: int β†’ 'a array β†’ 'a array
    #996
    For compatibility with BatList
    (Francois Berenger, review by Cedric Cellier)

  • BatDynArray: several new functions
    BatDynArray now exposes almost the same functionalities as BatArray
    #872
    (andrepd, review by Florent Monnier and Francois Berenger)

  • BatDynArray: uniformization of exceptions and more documentation
    #988
    (Florent Monnier, review by Francois Berenger)

  • BatDynArray: user input checks in left, right, tail
    #987
    (Florent Monnier, review by Francois Berenger)

  • Fix stack overflow on Int32/64.pow with negative exponent (issue #989)
    #990
    (Cedric Cellier, review by Francois Berenger)

  • BatList.unfold_exn is an alias for unfold_exc.
    BatRefList.find_exn is an alias for find_exc.
    #978
    (Cedric Cellier, review by Francois Berenger)


Happy hacking,
The batteries team.

4 Likes

Anyone know how to compile for use in the browser?

I don’t know if some modules in batteries require some special treatment.
In general, with dune it is enough to specify it in the dune file: JavaScript compilation β€” dune documentation

Then you can load the js script from the html. For example, the javascript in this page is obtained with this dune file

5 Likes