From d2b6c03e3d16dd1b56739fd988c468efba34914d Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Thu, 15 Jan 2015 00:15:18 +0100 Subject: [PATCH 1/3] prepare for 0.5.5 --- CHANGELOG.md | 32 ++++++++++++++++++++++++++++++-- Makefile | 14 +++++++++++++- _oasis | 2 +- descr | 6 ++++++ opam | 21 +++++++++++++++++++++ sequence.mli | 2 +- sequenceLabels.mli | 2 +- 7 files changed, 73 insertions(+), 6 deletions(-) create mode 100644 descr create mode 100644 opam diff --git a/CHANGELOG.md b/CHANGELOG.md index 08c0e5a..a51e448 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## 0.5.5 + +- new module `SequenceLabels` +- `fold_while` fun +- implement `Set.Adapt.of_list` for `< 4.02` +- removed many warnings, fix tests +- change name of `IO` functions (keep compat) + +## 0.5.4 + +- depend on `bytes` +- compliance with `-safe-string` +- `sequence.bigarray` + +## 0.5.3 + +- bugfix: interaction between `take` and `is_empty` + +## 0.5.2 + +- bugfix in `take` +- `on_list` for mapping lists through sequences + +## 0.5.1 + +- `Sequence.IO` module, a very very simple way to read/write files +- options: `to_opt/of_opt/head/head_exn` + ## 0.5 - conversion with `klist` @@ -20,7 +48,7 @@ ## 0.4.1 - `persistent_lazy` -- use bin_annot +- use `bin_annot` ## 0.4 @@ -62,4 +90,4 @@ - `zip`, `unzip` and `zip_i` to convert between `t` and `t2` - added `scan` combinator -note: git log --no-merges previous_version..HEAD --pretty=%s +note: `git log --no-merges previous_version..HEAD --pretty=%s` diff --git a/Makefile b/Makefile index db135ee..5b9b3cc 100644 --- a/Makefile +++ b/Makefile @@ -57,11 +57,23 @@ push_stable: all git push origin git checkout master -VERSION=$(shell awk '^/Version:/ {print $$2}' _oasis) +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 +NAME_VERSION := sequence.$(VERSION) +URL := https://github.com/c-cube/sequence/archive/$(VERSION).tar.gz + +release: + git tag -a $(VERSION) -m "Version $(VERSION)." + git push origin $(VERSION) + opam publish prepare $(NAME_VERSION) $(URL) + cp descr $(NAME_VERSION) + echo "submit?" + @read + opam publish submit $(NAME_VERSION) + .PHONY: benchs tests examples update_next_tag push_doc push_stable diff --git a/_oasis b/_oasis index 2352975..0324bcd 100644 --- a/_oasis +++ b/_oasis @@ -1,6 +1,6 @@ OASISFormat: 0.4 Name: sequence -Version: dev +Version: 0.5.5 Homepage: https://github.com/c-cube/sequence Authors: Simon Cruanes License: BSD-2-clause diff --git a/descr b/descr new file mode 100644 index 0000000..25f3a49 --- /dev/null +++ b/descr @@ -0,0 +1,6 @@ +Simple and lightweight sequence abstract data type. + +Simple sequence abstract data type, intended to transfer a finite number of +elements from one data structure to another. Some transformations on sequences, +like `filter`, `map`, `take`, `drop` and `append` can be performed before the +sequence is iterated/folded on. diff --git a/opam b/opam new file mode 100644 index 0000000..98868b5 --- /dev/null +++ b/opam @@ -0,0 +1,21 @@ +opam-version: "1.2" +author: "Simon Cruanes" +maintainer: "simon.cruanes@inria.fr" +build: [ + ["./configure" "--disable-docs" + "--%{delimcc:enable}%-invert" + "--%{base-bigarray:enable}%-bigarray" + ] + [make "build"] +] +install: [make "install"] +remove: [ + ["ocamlfind" "remove" "sequence"] +] +depends: ["ocamlfind" "base-bytes"] +tags: [ "sequence" "iterator" "iter" "fold" ] +homepage: "https://github.com/c-cube/sequence/" +depopts: ["delimcc" "base-bigarray"] +doc: "http://cedeela.fr/~simon/software/sequence/Sequence.html" +bug-reports: "https://github.com/c-cube/sequence/issues" +dev-repo: "https://github.com/c-cube/sequence.git" diff --git a/sequence.mli b/sequence.mli index 7957890..92daeb6 100644 --- a/sequence.mli +++ b/sequence.mli @@ -275,7 +275,7 @@ val take_while : ('a -> bool) -> 'a t -> 'a t val fold_while : ('a -> 'b -> 'a * [`Stop | `Continue]) -> 'a -> 'b t -> 'a (** Folds over elements of the sequence, stopping early if the accumulator returns [('a, `Stop)] - @since NEXT_RELEASE *) + @since 0.5.5 *) val drop : int -> 'a t -> 'a t (** Drop the [n] first elements of the sequence. Lazy. *) diff --git a/sequenceLabels.mli b/sequenceLabels.mli index a4cab02..ca4bf90 100644 --- a/sequenceLabels.mli +++ b/sequenceLabels.mli @@ -27,7 +27,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Version of {!Sequence} with labels -@since NEXT_RELEASE *) +@since 0.5.5 *) type +'a t = ('a -> unit) -> unit (** A sequence of values of type ['a]. If you give it a function ['a -> unit] From 27b3a9543ea26b6163cab6fbbbf7cb811c69bc33 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Fri, 16 Jan 2015 11:48:12 +0100 Subject: [PATCH 2/3] use older Bigarray constructors --- bigarray/sequenceBigarray.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigarray/sequenceBigarray.ml b/bigarray/sequenceBigarray.ml index fd61b86..6f9c19f 100644 --- a/bigarray/sequenceBigarray.ml +++ b/bigarray/sequenceBigarray.ml @@ -36,7 +36,7 @@ let mmap filename = let fd = Unix.openfile filename [Unix.O_RDONLY] 0 in let len = Unix.lseek fd 0 Unix.SEEK_END in let _ = Unix.lseek fd 0 Unix.SEEK_SET in - let b = Bigarray.Array1.map_file fd Bigarray.Char Bigarray.C_layout false len in + let b = Bigarray.Array1.map_file fd Bigarray.char Bigarray.c_layout false len in try of_bigarray b yield; Unix.close fd From 3eaedd8a1a07b988792e84345fe4d63216eaff61 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Thu, 15 Jan 2015 00:28:49 +0100 Subject: [PATCH 3/3] fix makefile and doc --- Makefile | 12 ------------ sequence.mli | 1 - 2 files changed, 13 deletions(-) diff --git a/Makefile b/Makefile index 5b9b3cc..cdc0e22 100644 --- a/Makefile +++ b/Makefile @@ -64,16 +64,4 @@ update_next_tag: sed -i "s/NEXT_VERSION/$(VERSION)/g" *.ml *.mli sed -i "s/NEXT_RELEASE/$(VERSION)/g" *.ml *.mli -NAME_VERSION := sequence.$(VERSION) -URL := https://github.com/c-cube/sequence/archive/$(VERSION).tar.gz - -release: - git tag -a $(VERSION) -m "Version $(VERSION)." - git push origin $(VERSION) - opam publish prepare $(NAME_VERSION) $(URL) - cp descr $(NAME_VERSION) - echo "submit?" - @read - opam publish submit $(NAME_VERSION) - .PHONY: benchs tests examples update_next_tag push_doc push_stable diff --git a/sequence.mli b/sequence.mli index 92daeb6..7c84c6a 100644 --- a/sequence.mli +++ b/sequence.mli @@ -530,7 +530,6 @@ end include module type of Infix - (** {2 Pretty printing of sequences} *) val pp_seq : ?sep:string -> (Format.formatter -> 'a -> unit) ->