From f1b3ff64c934c28c48672cd3ad6a80526c994eb8 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Fri, 19 Dec 2014 17:23:03 +0100 Subject: [PATCH] prepare for 0.7 --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ Makefile | 4 ++-- _oasis | 4 ++-- doc/intro.txt | 26 ++++++++++++++++++++------ opam | 5 ++++- src/bigarray/CCBigstring.mli | 6 +++--- src/core/CCFloat.mli | 4 ++-- src/core/CCString.mli | 4 ++-- src/io/CCIO.mli | 2 +- src/sexp/CCSexp.mli | 2 +- src/sexp/CCSexpM.mli | 2 +- 11 files changed, 68 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f931d873..22355ab8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,35 @@ # Changelog +## 0.7 + +### breaking + +- remove `cgi`/ +- removed useless Lwt-related module +- remove `CCGen` and `CCsequence` (use the separate libraries) +- split the library into smaller pieces (with `containers.io`, `containers.iter`, + `containers.sexp`, `containers.data`) + +#### other changes + +- cleanup: move sub-libraries to their own subdir each; mv everything into `src/` +- `sexp`: + * `CCSexp` now splitted into `CCSexp` (manipulating expressions) and `CCSexpStream` + * add `CCSexpM` for a simpler, monadic parser of S-expressions (deprecating `CCSexpStream`) +- `core`: + * `CCString.fold` + * `CCstring.suffix` + * more efficient `CCString.init` + * fix errors in documentation of `CCString` (slightly over-reaching sed) + * add `CCFloat.{fsign, sign_exn}` (thanks @bernardofpc) +- new `containers.bigarray`, with `CCBigstring` +- `CCHashtbl.map_list` +- `io`: + * `CCIO.read_all` now with ?size parameter + * use `Bytes.extend` (praise modernity!) + * bugfix in `CCIO.read_all` and `CCIO.read_chunks` +- use `-no-alias-deps` + ## 0.6.1 - use subtree `gen/` for `CCGen` (symlink) rather than a copy. diff --git a/Makefile b/Makefile index a42a7005..dcd252c4 100644 --- a/Makefile +++ b/Makefile @@ -126,8 +126,8 @@ VERSION=$(shell awk '/^Version:/ {print $$2}' _oasis) update_next_tag: @echo "update version to $(VERSION)..." - sed -i "s/NEXT_VERSION/$(VERSION)/g" **/*.ml **/*.mli - sed -i "s/NEXT_RELEASE/$(VERSION)/g" **/*.ml **/*.mli + zsh -c 'sed -i "s/NEXT_VERSION/$(VERSION)/g" **/*.ml **/*.mli' + zsh -c 'sed -i "s/NEXT_RELEASE/$(VERSION)/g" **/*.ml **/*.mli' udpate_sequence: git subtree pull --prefix sequence sequence stable --squash diff --git a/_oasis b/_oasis index 106138fc..84f75837 100644 --- a/_oasis +++ b/_oasis @@ -1,6 +1,6 @@ OASISFormat: 0.4 Name: containers -Version: 0.6.1 +Version: 0.7 Homepage: https://github.com/c-cube/ocaml-containers Authors: Simon Cruanes License: BSD-2-clause @@ -147,7 +147,7 @@ Document containers "-docflags '-colorize-code -short-functors -charset utf-8'" XOCamlbuildLibraries: containers, containers.misc, containers.iter, containers.data, - containers.string, containers.pervasives, + containers.string, containers.pervasives, containers.bigarray, containers.advanced, containers.io, containers.sexp, containers.lwt diff --git a/doc/intro.txt b/doc/intro.txt index b9137c99..afde017d 100644 --- a/doc/intro.txt +++ b/doc/intro.txt @@ -43,10 +43,21 @@ CCVector {4 Pervasives (aliases to Core Modules)} +Contains aliases to most modules from {i containers core}, and mixins +such as: + +{[ module List = struct + include List + include CCList + end +]} + {!modules: CCPervasives} {4 Containers.data} +Various data structures. + {!modules: CCBV CCCache @@ -61,13 +72,16 @@ CCTrie {4 Containers.io} +Helpers to perform simple IO (mostly on files) and iterate on channels. + {!modules: CCIO} {4 Containers.sexp} -A small S-expression library. +A small S-expression library. The interface is relatively unstable, but +the main type ([CCSexp.t]) isn't. -{!modules: CCSexp} +{!modules: CCSexp CCSexpStream CCSexpM} {4 Containers.iter} @@ -75,20 +89,20 @@ Iterators: {!modules: CCKList CCKTree} -{4 S-expressions} - -{!modules: CCSexp} - {4 String} {!modules: Levenshtein KMP} {4 Bigarrays} +Use bigarrays to hold large strings and map files directly into memory. + {!modules: CCBigstring} {4 Advanced} +This module is qualified with [Containers_advanced]. + {!modules: CCLinq CCCat CCBatch} {4 Misc} diff --git a/opam b/opam index 5f41d166..e20b12c0 100644 --- a/opam +++ b/opam @@ -17,7 +17,10 @@ remove: [ ["ocamlfind" "remove" "containers"] ] post-messages: [ - "in containers, modules start with 'CC' (stands for 'core containers')" + "containers is now split into finer-grained sub-libraries, including + `containers.io`, `containers.iter`, `containers.sexp`, `containers.data`. + CCGen and CCSequence have been removed, consider using the libraries + `gen` and `sequence` on opam." ] depends: [ "ocamlfind" {build} diff --git a/src/bigarray/CCBigstring.mli b/src/bigarray/CCBigstring.mli index 952de8a1..6f0582e1 100644 --- a/src/bigarray/CCBigstring.mli +++ b/src/bigarray/CCBigstring.mli @@ -26,7 +26,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. (** {1 Interface to 1-dimension Bigarrays of bytes (char)} -@since NEXT_RELEASE *) +@since 0.7 *) type t = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t @@ -118,10 +118,10 @@ val with_map_file : have mapped this file (requires the filedescr to be open in write mode). @param mode the mode for the file, if it's created @param flags opening flags (default rdonly) - @see {!Bigarray.Array1.map_file} for more details *) + see {!Bigarray.Array1.map_file} for more details *) val map_file_descr : ?pos:int64 -> ?shared:bool -> Unix.file_descr -> int -> t (** [map_file_descr descr len] is a lower-level access to an underlying file descriptor. @param shared if true, modifications are shared between processes that have mapped this file (requires the filedescr to be open in write mode). - @see {!Bigarray.Array1.map_file} for more details *) + see {!Bigarray.Array1.map_file} for more details *) diff --git a/src/core/CCFloat.mli b/src/core/CCFloat.mli index 32a3317f..bf1cd0f3 100644 --- a/src/core/CCFloat.mli +++ b/src/core/CCFloat.mli @@ -83,14 +83,14 @@ val sign : t -> int val fsign : t -> float (** [fsign x] is one of [-1., -0., +0., +1.], or [nan] if [x] is NaN. - @since NEXT_RELEASE *) + @since 0.7 *) exception TrapNaN of string val sign_exn : t -> int (** [sign_exn x] will return the sign of [x] as [1, 0] or [-1], or raise an exception [TrapNaN] if [x] is a NaN. Note that infinities have defined signs in OCaml. - @since NEXT_RELEASE *) + @since 0.7 *) val to_int : t -> int val of_int : int -> t diff --git a/src/core/CCString.mli b/src/core/CCString.mli index 6a0e4e63..807bb938 100644 --- a/src/core/CCString.mli +++ b/src/core/CCString.mli @@ -45,7 +45,7 @@ module type S = sig val fold : ('a -> char -> 'a) -> 'a -> t -> 'a (** Fold on chars by increasing index. - @since NEXT_RELEASE *) + @since 0.7 *) (** {2 Conversions} *) @@ -105,7 +105,7 @@ val prefix : pre:string -> string -> bool val suffix : suf:string -> string -> bool (** [suffix ~suf s] returns [true] iff [suf] is a suffix of [s] - @since NEXT_RELEASE *) + @since 0.7 *) (*$T suffix ~suf:"cd" "abcd" diff --git a/src/io/CCIO.mli b/src/io/CCIO.mli index 4ff88511..272e4ac0 100644 --- a/src/io/CCIO.mli +++ b/src/io/CCIO.mli @@ -86,7 +86,7 @@ val read_lines_l : in_channel -> string list val read_all : ?size:int -> in_channel -> string (** Read the whole channel into a buffer, then converted into a string. - @param size the internal buffer size @since NEXT_RELEASE *) + @param size the internal buffer size @since 0.7 *) (** {6 Output} *) diff --git a/src/sexp/CCSexp.mli b/src/sexp/CCSexp.mli index 9021b25c..17acdf7b 100644 --- a/src/sexp/CCSexp.mli +++ b/src/sexp/CCSexp.mli @@ -27,7 +27,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. @since 0.4 -@since NEXT_RELEASE +@since 0.7 Moved the streaming parser to CCSexpStream *) diff --git a/src/sexp/CCSexpM.mli b/src/sexp/CCSexpM.mli index 239792c1..5507fc20 100644 --- a/src/sexp/CCSexpM.mli +++ b/src/sexp/CCSexpM.mli @@ -25,7 +25,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. (** {1 Simple and efficient S-expression parsing/printing} -@since NEXT_RELEASE *) +@since 0.7 *) type 'a or_error = [ `Ok of 'a | `Error of string ] type 'a sequence = ('a -> unit) -> unit