Ocaml Containers Versions Save

A lightweight, modular standard library extension, string library, and interfaces to various libraries (unix, threads, etc.) BSD license.

v3.13.1

4 months ago

CHANGES:

  • list: TRMC was in 4.14, we can use it earlier
  • fix insidious bug in CCList.flat_map linked to unspecified evaluation order
  • perf: use concat_map for CCList.flat_map on >= 5.1 (this also re-fixes the same bug in CCList.flat_map anyway)

v3.13

5 months ago

CHANGES:

  • breaking: delete containers-thread (which was deprecated)

  • breaking: pp: modify Ext.t so it takes surrounding value

  • CCMultiMap: Rename functions find_left and find_right in the bidirectional multimap to find_left_iter and find_right_iter respectively to reflect their usage, and add new functions to replace the old find_left and find_right that return a list of values rather than an iterator, to make the signatures of CCMultiMap.S and CCMultiMap.BIDIR cohere. Additionally, change the return type of S.find_iter from t -> key -> (value -> unit) -> unit to t -> key -> value iter.

  • CCList: add unfold

  • CCBool: Add functions if_then and if_then_else

  • CCList: remove some functions that are subsumed by the stdlib

  • CCList: use TRMC for many functions on 5.1

  • feat CCFunvec: add fold_rev

  • add Containers_pp.newline_or_spaces

  • cleanup: remove stubs for code always present on 4.08, rely on newer functions in 5.1

  • remove last refs to CCShims

  • perf: accelerate List.append and List.flat_map on 5.1

  • more warnings, more tests, cleanup dead code

  • change COC to ocaml-coc

v3.12

11 months ago
  • add containers.pp sublibrary, with Wadler-style pretty printing combinators

  • add CCArray.{max,argmax,min,argmin} and their _exn counterparts

  • add CCParse.take_until_success

  • add Option.flat_map_l

  • add CCSet.{find_first_map,find_last_map}

  • CCHash: native FNV hash for int64/int32

  • fix bugs in CCParse related to recurse and Slice

  • fix: fix Set.find_last_map on OCaml 4.03

  • fix: make sure Vector.to_{seq,gen} captures the length initially

v3.11

1 year ago
  • official OCaml 5 support

  • add CCFun.(let@) (if OCaml >= 4.08)

  • add CCHet.Tbl.{clear,reset}

  • fix(CCVector): concurrent modification safety in resize_with

  • fix(CCVector): always obtain a copy of array before using unsafe_{set,get}

  • CI: add ocaml 5.0.x

v3.10

1 year ago
  • CCArray: add mapi_inplace

  • add sublibrary containers.scc for strongly connected components

  • CCSeq: add concat_map

  • CCSeq: add some missing function from 4.14

  • add CCInt64.{hash,hash_to_int64}

  • Ref: add protect function

  • fix: include Seq in CCSeq for ocaml >= 4.07

v3.9

1 year ago
  • feat: add Containers_cbor module

  • feat(CCInt32): add popcount function

  • feat(CCInt64): add popcount operation

  • CCBV:

    • more extensive test suite
    • use bytes underneath, not an array of integers
  • add containers_testlib, removing qtest and ounit.

  • fix: handle uppercase in string/hex

v3.8

1 year ago
  • add Containers_bencode for lightweight (de)ser

  • perf(CCHash): improve a bit commutative hashing of arrays/lists

  • perf(CCHash): only hash prefix of string/bytes

  • feat(CCList): Add Assoc.{keys,values,map_values}

  • feat(CCArray): add CCArray.map_inplace

  • add CCString.{to_hex,of_hex}

  • fix(Atomic): prevent race conditions under flambda, for now

v3.7

2 years ago
  • add Format.styling

  • make Format compatible with OCaml 5.0, using Stag for colors

  • new preprocessor, compatible with merlin, using [@@@ifge 4.12]-style pragmas

  • feat: add Byte_buf, a byte buffer.

  • add CCSeq.{zip_i,of_string}

  • add CCResult.opt_map to simplify result function application over optionals (#397)

  • add shims for Atomic and Unit

  • expose CCParse.pos to get current pos; improve perf

  • add CCVector.resize_with and CCVector.resize_with_init, tests and doc (#389)

  • add CCVector.insert

  • update dune to 1.10, condition some rules to unix

  • perf: reduce allocations in CCSeq.to_array

  • fix asymptotic behavior of resize functions in CCVector

  • fix: rely on either compatibility library

v3.6

2 years ago
  • rename CCOpt to CCOption and deprecate CCOpt
  • add iterator functions to CCIO
  • CCOrd: add poly, deprecate compare
  • add CCIO.File.walk_iter
  • CCParse: heavy refactoring, many new functions, and broken compatibility for most programs
    • backtracking by default (not more try_)
    • changed the location system
    • add slice and the ability to recurse on them, split input into slices, while preserving locations
    • expose Position module, add or_, both, lookahead, U.bool
    • example Sexpr parser, and a test
    • example and test of an IRC log parser

v3.5

2 years ago

A nice release, quite featureful! :slightly_smiling_face:

  • add CCHash.map and CCHash.bytes

  • CCIO: add many Seq.t based functions

  • CCUtf8string: add {make,empty,of_uchar}

  • add CCFormat.{const_string,opaque}

  • add CCOpt.{some,none}

  • CCFormat: expose ANSI_codes module

  • CCBV: add equal, refactor for performance and readability

  • CCList: add {sorted_diff_uniq,sorted_mem,sorted_diff,sorted_remove}

  • fix(bv): index error in union

  • test: add some property tests on Csexp/Canonical_sexp

  • bv: add more tests, including regression for #370