Releases: ocaml-batteries-team/batteries-included
Batteries 2.5.2
Batteries 2.5.0 is a minor release whose main change is that it is
compatible with the newly released OCaml 4.03.
Note that Batteries 2.5.0 is compatible with older OCaml releases as
well, and provides back-ported versions of most standard library
functions made available in 4.03 only. For example,
BatString.uppercase_ascii
is usable under all OCaml versions.
If the documentation of a Batteries function says
@since 2.5.0
then it is available under all supported OCaml version (3.12.1 and up).
If it says
@since 2.5.0 and OCaml 4.03.0
then it is only available under OCaml 4.03.0.
Many thanks to the contributors for this release, Cedric Cellier, Pieter Goetschalckx KC Sivaramakrishnan, Gabriel Scherer, and Thibault Suzanne.
(Batteries 2.5.1 and 2.5.2 fix a silly packaging bug in Batteries 2.5.0.)
Changelog
- BatTuple: add Tuple{N}.make : 'a1 -> ... -> 'an -> 'a1 * ... * 'an
#657
(Thibault Suzanne) - BatBig_int: fix sequence operators (--), (---) to avoid polymorphic comparison
#674, #675, #676
(Pieter Goetschalckx and Cedric Cellier) - Extend all Batteries module to cover OCaml 4.03 features
#670
(Gabriel Scherer, KC Sivaramakrishnan)
v2.4.0
This release contains a handful of new functions and bugfixes -- see the detailed changelog below. Two highlights are the pop_{min,max}
in BatSet and pop_{min,max}_bindings
in BatMap contributed by François Berenger, and a nasty bug when hashing values close to min_int spotted by Martin Neuhäußer -- this long-hidden bug was due to a mistake in the backward-compatibility code for the hashing function transition between OCaml 3.12 and OCaml 4.00.
With many thanks to the contributors to this new release, including Guillaume Allais, Aleksey Z. Arens, Nils Becker, François Berenger, Sang Kil Cha, Simon Cruanes, Bob Fang, Anders Fugmann, Rudi Grinberg, Herry, Christoph Höger, Max Mouratov, Martin R. Neuhäußer, Gabriel Scherer, Quentin Stievenart, Kevin Brubeck Unhammer, Ralf Vogler, and Xavier Van de Woestyne.
New contributors are always welcome, you can have a look at the issue list to find something you would be interested into working on and discuss with the maintainers.
With our best regards,
The OCaml batteries-included team.
Detailed changelog
- BatBitSet: use Bytes instead of String
(Gabriel Scherer)
- BatHashtbl: fix hash computation bug introduced by 4.01 (issue #609)
(Gabriel Scherer, report by Martin R. Neuhäußer)
- BatText: synchronize nsplit to match BatString.nsplit
(Gabriel Scherer)
- BatLazyList: fix remove_all_such documentation
(Xavier Van de Woestyne)
- BatMap: add pop_min_binding: 'a t -> (key * 'a) * 'a t
and pop_max_binding: 'a t -> (key * 'a) * 'a t
(Francois Berenger)
- BatMap: add at_rank_exn: int -> ('key, 'a) t -> ('key * 'a)
and update: key -> key -> 'a -> 'a t -> 'a t
(Francois Berenger)
- BatEnum: add interleave: 'a t array -> 'a t
(Aleksey Z. Arens)
- BatFormat: expose asprintf for V>=4.01
(Ralf Vogler)
- BatSet: add at_rank_exn: int -> t -> elt
and update: elt -> elt -> t -> t
(Francois Berenger)
- BatUTF8: add enum: t -> BatUChar.t BatEnum.t
(Kevin Brubeck Unhammer)
- BatSet: add to_array: t -> elt array
and of_array: elt array -> t
and test for to_list
(Francois Berenger)
- BatSet: add pop_max: 'a t -> 'a * 'a t
and pop_min: 'a t -> 'a * 'a t
(Francois Berenger)
- BatSplay: hardened against read-only-data compiler optimization
(Gabriel Scherer)
- BatList: simplified interleave implementation
(Francois Berenger)
- BatOption: add
Infix.(>>=): 'a option -> ('a -> 'b option) -> 'b option
(Herry Herry)
- BatHashtbl: modify now have same semantics than replace for the key
(Anders Fugmann)
- BatHashtbl: more efficient modify_opt and modify_def
(Anders Fugmann)
- BatFormat: add pp_print_list: ?pp_sep:(formatter -> unit -> unit) ->
(formatter -> 'a -> unit) ->
(formatter -> 'a list -> unit)
and pp_print_text: formatter -> string -> unit
(Christoph Höger)
- BatEnum: add uniq_by: ('a -> 'a -> bool) -> 'a t -> 'a t
and uniqq: 'a t -> 'a t
(Max Mouratov)
- BatEnum: fix uniq to use structural comparison
(Max Mouratov)
- BatUnix: add run_and_read: string -> process_status * string
Batteries 2.3.0
The main novelty of this new version is the support for the new OCaml
version 4.02. Whenever possible, we have backported new functions from
the 4.02 compiler library: using Batteries 2.3.0 will let you use them
from any OCaml version. You can thus write code using the new 4.2.0
functions that compiles on old OCaml versions. The only exception is
the support for inspecting the callstack, which is not available on
older OCaml versions -- it depends on an OCaml runtime change.
In particular, all new functions related to the new bytes
datatype
are usable with Batteries 2.3.0, even from older OCaml
versions¹. However, the new Batteries release is not ready for use
with -safe-string (the new OCaml option to make strings immutable). We
plan to release a new minor version soon that compiles with
-safe-string, changing some of our interfaces from string
to
bytes
. You can use Batteries 2.3.0 in user programs compiled with
-safe-string themselves, but you should expect compilation under
-safe-string to break at the next Batteries release.
¹: this relies on the "bytes" compatibility package in recent
ocamlfind versions (>= 1.5.3). In particular, you should use Bytes.t
rather than bytes
as a type name to write code that compiles under
older OCaml versions.
With many thanks to the contributors to this new release, including
François Berenger, Vincent Bernardoff, Simon Cruanes, Jacques-Pascal
Deplaix, Mads Hartmann, Max Mouratov, Gabriel Radanne, Xavier Van de
Woestyne, Ralf Vogler and Christopher Zimmermann.
Detailed changelog
- improved test coverage
(Simon Cruanes and Xavier Van de Woestyne) - Enum: bugfix in
clamp
(Simon Cruanes) - Stream: add
concat_map
(Gabriel Radanne) - List: fix a stack-overflow bug in
transpose
(Gabriel Scherer) - List: add
unfold_exc : (unit -> a) -> 'a list * exn
(François Berenger) - List: add
fold_righti
andfold_lefti
(François Berenger) - Substring : fix
fold_left
, addfold_lefti
,fold_righti
(Xavier Van de Woestyne) - String : add
fold_lefti
andfold_righti
(Xavier Van de Woestyne) - Set.Make: add
of_list
(Jacques-Pascal Deplaix) - AvlTree: add
check : 'a tree -> bool
to check well-formedness
(Simon Cruanes) - Hashtbl: make
modify_opt/def
resize the table to preserve amortized costs
(Mads Hartmann, report by user 'jj-issuu') - Enum: fix combine's count in presence of infinite enums
(Gabriel Scherer, report by user 'mwnx') - Makefile: add a qtest-byte target
(Gabriel Scherer) - List: add
modify_opt_at: int -> ('a -> 'a option) -> 'a list -> 'a list
(Gabriel Scherer) - List: add
modify_at: int -> ('a -> 'a) -> 'a list -> 'a list
(Gabriel Scherer) - List: add
remove_at: int -> 'a list -> 'a list
(François Berenger) - Int: add
copysign
(Simon Cruanes) - Deque: add
rotate_forward
,rotate_backward : 'a dq -> 'a dq
(Max Mouratov) - Int: fix overflow checking in
Safe_int.mul
(Max Mouratov, Christopher Zimmermann) - add a local OPAM description, allows to use
opam pin add batteries [email protected]:ocaml-batteries-team/batteries-included.git
(Vincent Bernardoff) - Queue: add
map : ('a -> 'b) -> 'a t -> 'b t
(Christopher Zimmermann) - compatibility with 4.02:
- Printf: remove CamlinternalPr for OCaml versions >= 4.02
(Ralf Vogler) - Printf: legacy code assumed (string = fmt)
(Gabriel Scherer) - new 4.02 functions:
String.mapi (String.init was already in Batteries)
List.sort_uniq (List.sort_unique existed before)
Array.make_float (less efficient implementation provided for <4.02 versions)
a BatBytes module relying on ocamlfind's compatibility module
bytes-related functions in Buffer,Digest,Marshal,Printexc,Stream,Unix
new Printexc callstack interface (not available for <4.02 versions)
(Gabriel Scherer)
- Printf: remove CamlinternalPr for OCaml versions >= 4.02
Batteries 2.2.0
Many features have been added since v2.1.0, so it was time for the next release. More enumerators, functions for data structures (List, Set, Array, String, etc.), tests and benchmarks, and Batteries. New module, BatteriesExceptionless.
Thanks to all the users and contributors!
Change log:
- cartesian product in batSet
- Enum.concat_map alias
- UChar.is_ascii
- equality and enumeration (from, to UChar enum) in batText
- String.find_all function
- Seq.iteri, mapi, iter2, map2 (see issue #417)
- cartesian product of enums (issue #442)
- List.subset
- Array.bsearch dichotomic search (issue #433)
- Enum.print_at_most (issue #425)
- BatOption.ord instance, (issue #393)
- Fix infinite loop in BitSet
- Levenshtein distance on strings
- Seq.{of_list, equal}
- basic .merlin file for merlin users
- BatDeque.eq function to compare Deques by content
- BatteriesExceptionless
- More explicit overridding of ocamlbuild rules, use batteries.mllib
- Add Kahan summation (numerically-accurate sum of floats) to List,Array,Enum
- Add BatOption.some
- (text) improve element indexing in BatList's mli documentation
- Add BatList.filteri_map
- Compatibility with ocaml 4.01
- Add BatList.filteri
- Add Set.split_lt and split_le
- Add split_opt wherever there is split
- Add List.range
- Add the new O_CLOEXEC flag to Unix.open_flag in version 4.01
- Fix BatMutex.DebugMutex.id is always 0.
- Simplify List.partition code
- Add List.ntake and List.takedrop
- Added List.Acc.create and use it
- Add a LazyList.eager_fold_right alias to LazyList.fold_right, with sane argument order
- and many tests and documentation
- cleanup of whitespace
Batteries 2.1.0
It's been a while since 2.0, and batteries has had a bunch of improvements that should be shared with a wider audience.
More features, more bugfixes, more batteries.
Thanks to the many contributors in this release; batteries exists because of you.
E.
Changelog:
Added:
Array.{avg,favg,singleton},
Bigarray.of_enum,
Hashtbl.{modify,modify_def,modify_opt,map_inplace
filter_inplace,filter_opt_inplace},
IMap.{modify,modify_def,modify_opt}, LazyList.lazy_fold_right,
List.{singleton,unfold,min_max,modify,modify_dep
modify_opt, span, nsplit, group_consecutive},
Map.modify_opt (*3),
MultiMap.modify_opt (*3),
MultiPMap.modify_opt (*3),
Option.{default_delayed , map_default_delayed},
Set.find, Set.Incubator.op_map,
String.rev,
Substring.{equal,contains,iteri,enum}
Fixed:
Compilation with Ocaml 4.01
Speedup in LazyList.append
More organized magic for fast list snoc
Speedup in String.{replace,nreplace}
Cleanup int32.[un]pack exceptions
Fix last bit access in BatBitSet
Float.round corner case on predecessor of 0.5 fixed
Fix Enum.concat's clone implementation
Fix List.n_cartesian_product to allow empty input
Fix BatText.rfind's index calculation
Improve Pervasives.undefined to be curry-able
Array.backwards doesn't clone array anymore
Remove useless allocation in Splay.cfind
More unit tests, benchmarks
Batteries 2.0.0
v2.0.0 Un-expose File.finally
Batteries 1.5.0
v1.5.0 Bump version to 1.5.0
Batteries 1.4.3
v1.4.3 Remove documentation for removed syntax extensions, quick document la…
Batteries 1.4.2
v1.4.2 Add example to Enum.unfold, whitespace changes
Batteries 1.4.1
v1.4.1 [bugfix] Add -linkpkg to mktop executions in examples/benchmark/myoca…