prepare for 2.7

remove mdx
This commit is contained in:
Simon Cruanes 2019-11-11 22:35:24 -06:00
parent 2241a25d9e
commit 7cefde490b
24 changed files with 74 additions and 56 deletions

View file

@ -1,5 +1,26 @@
# Changelog
## 2.7
- deprecate CCKList in favor of the standard Seq
- CCIO: add `_gen` suffixes to some functions
- ccsexp: provide ability to annotate parsed S-exprs with their position
- ccsexp: functorize the parser/printer
- ccsexp: support `#;` for commenting a sexp
- fix: remove dep from vec to list
- add `to_string` to many modules (#270)
- add `CCDeque.{remove_*;update_*}`,` CCDeque.{*_opt}`
- add `CCDeque.{filter,filter_map}`
- add `CCDeque.filter_in_place`
- add `CCBool.{to,of}_int`
- add `Result.flatten_l` to turn a list of results into a result of list
- refactor: remove stdlib's code, simple reimplementation of `Stdlib.Fun`
- add `CCArray.Infix`
- Document behaviour of `Fun.finally` when finaliser raises
- travis: test on OCaml 4.09, too.
- more docs for IO
## 2.6.1
bugfix release:

View file

@ -1,4 +1,4 @@
# OCaml-containers 📦
# OCaml-containers 📦 [![Build Status](https://travis-ci.org/c-cube/ocaml-containers.svg?branch=master)](https://travis-ci.org/c-cube/ocaml-containers)
A modular, clean and powerful extension of the OCaml standard library.
@ -12,8 +12,6 @@ map/fold_right/append, and additional functions on lists).
Alternatively, `open Containers` will bring enhanced versions of the standard
modules into scope.
[![Build Status](https://travis-ci.org/c-cube/ocaml-containers.svg?branch=master)](https://travis-ci.org/c-cube/ocaml-containers)
## Quick Summary
Containers is:

View file

@ -1,6 +1,6 @@
opam-version: "2.0"
name: "containers"
version: "2.6.1"
version: "2.7"
author: "Simon Cruanes"
maintainer: "simon.cruanes.2007@m4x.org"
synopsis: "A modular, clean and powerful extension of the OCaml standard library"
@ -19,7 +19,6 @@ depends: [
"iter" { with-test }
"gen" { with-test }
"uutf" { with-test }
"mdx" { with-test }
"odoc" { with-doc }
"ocaml" { >= "4.02.0" }
]

View file

@ -1,8 +1,8 @@
(alias
(name runtest)
(deps containers.md)
(action (progn
(run mdx test %{deps})
(diff? %{deps} %{deps}.corrected))))
;(alias
; (name runtest)
; (deps containers.md)
; (action (progn
; (run mdx test %{deps})
; (diff? %{deps} %{deps}.corrected))))
;

12
dune
View file

@ -1,8 +1,8 @@
(alias
(name runtest)
(deps README.md)
(action (progn
(run mdx test %{deps})
(diff? %{deps} %{deps}.corrected))))
;(alias
; (name runtest)
; (deps README.md)
; (action (progn
; (run mdx test %{deps})
; (diff? %{deps} %{deps}.corrected))))

View file

@ -17,7 +17,7 @@
(modes native)
(modules run_qtest)
; disable some warnings in qtests
(flags :standard -warn-error -a -w -33-35-27-39 -nolabels)
(flags :standard -warn-error -a -w -3-33-35-27-39 -nolabels)
(libraries iter gen qcheck containers containers.unix
containers.data containers.thread containers.iter
containers.sexp uutf)

View file

@ -247,7 +247,7 @@ val random_choose : 'a t -> 'a random_gen
val to_string : ?sep:string -> ('a -> string) -> 'a array -> string
(** [to_string ~sep item_to_string a] print [a] to a string using [sep] as a separator
between elements of [a].
@since NEXT_RELEASE *)
@since 2.7 *)
val to_seq : 'a t -> 'a sequence
(** [to_seq a] returns a [sequence] of the elements of an array [a].

View file

@ -248,7 +248,7 @@ val random_choose : 'a t -> 'a random_gen
val to_string : ?sep:string -> ('a -> string) -> 'a array -> string
(** [to_string ~sep item_to_string a] print [a] to a string using [sep] as a separator
between elements of [a].
@since NEXT_RELEASE *)
@since 2.7 *)
val to_seq : 'a t -> 'a sequence
(** [to_seq a] returns a [sequence] of the elements of an array [a].

View file

@ -11,11 +11,11 @@ val equal : t -> t -> bool
val to_int : t -> int
(** [to_int true = 1], [to_int false = 0].
@since NEXT_RELEASE *)
@since 2.7 *)
val of_int : int -> t
(** [of_int i] is the same as [i <> 0]
@since NEXT_RELEASE *)
@since 2.7 *)
val negate : t -> t
(** Negation on booleans (functional version of [not]).

View file

@ -42,7 +42,7 @@ val to_int : t -> int
val to_string : t -> string
(** [to_string c] return a string containing [c]
@since NEXT_RELEASE *)
@since 2.7 *)
val pp_buf : Buffer.t -> t -> unit
(** Renamed from [pp] since 2.0. *)

View file

@ -204,7 +204,7 @@ module type S = sig
val to_string : ?sep:string -> (elt -> string) -> t -> string
(** Print the heap in a string
@since NEXT_RELEASE *)
@since 2.7 *)
val pp : ?sep:string -> elt printer -> t printer
(** @since 0.16

View file

@ -144,7 +144,7 @@ module type S = sig
val to_string : ?sep:string -> (elt -> string) -> t -> string
(** Print the heap in a string
@since NEXT_RELEASE *)
@since 2.7 *)
val pp : ?sep:string -> elt printer -> t printer
(** Printer.

View file

@ -689,7 +689,7 @@ val to_string : ?start:string -> ?stop:string -> ?sep:string ->
('a -> string) -> 'a t -> string
(** [to_string ~start ~stop ~sep item_to_string l] print [l] to a string using
[sep] as a separator between elements of [l].
@since NEXT_RELEASE *)
@since 2.7 *)
val to_seq : 'a t -> 'a sequence
(** Return a [sequence] of the elements of the list. *)

View file

@ -687,7 +687,7 @@ val to_string : ?start:string -> ?stop:string -> ?sep:string ->
('a -> string) -> 'a t -> string
(** [to_string ~start ~stop ~sep item_to_string l] print [l] to a string using
[sep] as a separator between elements of [l].
@since NEXT_RELEASE *)
@since 2.7 *)
val to_seq : 'a t -> 'a sequence
(** Return a [sequence] of the elements of the list. *)

View file

@ -69,7 +69,7 @@ val compare : ('a -> 'a -> int) -> ('b -> 'b -> int) -> ('a * 'b) -> ('a * 'b) -
val to_string : ?sep:string -> ('a -> string) -> ('b -> string) -> ('a * 'b) -> string
(** Print tuple in a string
@since NEXT_RELEASE *)
@since 2.7 *)
type 'a printer = Format.formatter -> 'a -> unit

View file

@ -189,7 +189,7 @@ end
val flatten_l : ('a, 'err) t list -> ('a list, 'err) t
(** Same as [map_l id]: returns [Ok [x1;…;xn]] if [l=[Ok x1; …; Ok xn]],
or the first error otherwise.
@since NEXT_RELEASE
@since 2.7
*)
val map_l : ('a -> ('b, 'err) t) -> 'a list -> ('b list, 'err) t

View file

@ -70,7 +70,7 @@ module type S = sig
?start:string -> ?stop:string -> ?sep:string ->
(elt -> string) -> t -> string
(** Print the set in a string
@since NEXT_RELEASE *)
@since 2.7 *)
val pp :
?start:string -> ?stop:string -> ?sep:string ->

View file

@ -69,7 +69,7 @@ module type S = sig
?start:string -> ?stop:string -> ?sep:string ->
(elt -> string) -> t -> string
(** Print the set in a string
@since NEXT_RELEASE *)
@since 2.7 *)
val pp :
?start:string -> ?stop:string -> ?sep:string ->

View file

@ -291,7 +291,7 @@ val to_string :
?start:string -> ?stop:string -> ?sep:string ->
('a -> string) -> ('a,_) t -> string
(** Print the vector in a string
@since NEXT_RELEASE *)
@since 2.7 *)
val pp : ?start:string -> ?stop:string -> ?sep:string ->
'a printer -> ('a,_) t printer

View file

@ -47,7 +47,7 @@ val peek_front : 'a t -> 'a
val peek_front_opt : 'a t -> 'a option
(** First value.
@since NEXT_RELEASE *)
@since 2.7 *)
val peek_back : 'a t -> 'a
(** Last value.
@ -55,15 +55,15 @@ val peek_back : 'a t -> 'a
val peek_back_opt : 'a t -> 'a option
(** Last value.
@since NEXT_RELEASE *)
@since 2.7 *)
val remove_back : 'a t -> unit
(** Remove last value. If the deque is empty do nothing
@since NEXT_RELEASE *)
@since 2.7 *)
val remove_front : 'a t -> unit
(** Remove first value. If the deque is empty do nothing
@since NEXT_RELEASE *)
@since 2.7 *)
val take_back : 'a t -> 'a
(** Take last value.
@ -71,7 +71,7 @@ val take_back : 'a t -> 'a
val take_back_opt : 'a t -> 'a option
(** Take last value.
@since NEXT_RELEASE *)
@since 2.7 *)
val take_front : 'a t -> 'a
(** Take first value.
@ -79,18 +79,18 @@ val take_front : 'a t -> 'a
val take_front_opt : 'a t -> 'a option
(** Take first value.
@since NEXT_RELEASE *)
@since 2.7 *)
val update_back : 'a t -> ('a -> 'a option) -> unit
(** Update last value. If the deque is empty do nothing.
If the function returns [None], remove last element;
if it returns [Some x], replace last element with [x].
@since NEXT_RELEASE *)
@since 2.7 *)
val update_front : 'a t -> ('a -> 'a option) -> unit
(** Update first value. If the deque is empty do nothing.
Similar to {!update_back} but for the first value.
@since NEXT_RELEASE *)
@since 2.7 *)
val append_front : into:'a t -> 'a t -> unit
(** [append_front ~into q] adds all elements of [q] at the front
@ -160,15 +160,15 @@ val to_rev_list : 'a t -> 'a list
val filter : ('a -> bool) -> 'a t -> 'a t
(** Filter into a new copy.
@since NEXT_RELEASE *)
@since 2.7 *)
val filter_map : ('a -> 'b option) -> 'a t -> 'b t
(** Filter map into a new copy
@since NEXT_RELEASE *)
@since 2.7 *)
val filter_in_place : 'a t -> ('a -> bool) -> unit
(** Keep only elements that satisfy the predicate.
@since NEXT_RELEASE *)
@since 2.7 *)
(** {2 print} *)

View file

@ -4,7 +4,7 @@
(** {1 Continuation List}
@deprecated since NEXT_RELEASE, you should use the standard {b Seq} instead.
@deprecated since 2.7, you should use the standard {b Seq} instead.
See {{: https://github.com/c-cube/oseq/} oseq} for similar combinators.
*)

View file

@ -320,12 +320,12 @@ include (Make(struct
CCResult.to_opt (parse_string "\"\123\bcoucou\"") <> None
*)
(*$= & ~printer:(function Ok x -> to_string x | Error e -> "error " ^ e)
(parse_string "(a b)") (Ok (`List [`Atom "a"; `Atom "b"]))
(parse_string "(a\n ;coucou\n b)") (Ok (`List [`Atom "a"; `Atom "b"]))
(parse_string "(a #; (foo bar\n (1 2 3)) b)") (Ok (`List [`Atom "a"; `Atom "b"]))
(parse_string "#; (a b) (c d)") (Ok (`List [`Atom "c"; `Atom "d"]))
(parse_string "#; (a b) 1") (Ok (`Atom "1"))
(*$= & ~printer:(function Result.Ok x -> to_string x | Result.Error e -> "error " ^ e)
(parse_string "(a b)") (Result.Ok (`List [`Atom "a"; `Atom "b"]))
(parse_string "(a\n ;coucou\n b)") (Result.Ok (`List [`Atom "a"; `Atom "b"]))
(parse_string "(a #; (foo bar\n (1 2 3)) b)") (Result.Ok (`List [`Atom "a"; `Atom "b"]))
(parse_string "#; (a b) (c d)") (Result.Ok (`List [`Atom "c"; `Atom "d"]))
(parse_string "#; (a b) 1") (Result.Ok (`Atom "1"))
*)

View file

@ -9,12 +9,12 @@ type 'a gen = unit -> 'a option
(** {2 Abstract representation of S-expressions}
@since NEXT_RELEASE *)
@since 2.7 *)
module type SEXP = CCSexp_intf.SEXP
(** {2 Operations over S-expressions}
@since NEXT_RELEASE *)
@since 2.7 *)
module type S = CCSexp_intf.S
(** {2 Functorized operations}
@ -22,7 +22,7 @@ module type S = CCSexp_intf.S
This builds a parser and printer for S-expressions represented as
in the [Sexp] argument.
@since NEXT_RELEASE *)
@since 2.7 *)
module Make(Sexp : SEXP) : S with type t = Sexp.t
(** {2 Basics} *)

View file

@ -5,7 +5,7 @@ type 'a gen = unit -> 'a option
(** {2 Abstract representation of S-expressions}
@since NEXT_RELEASE *)
@since 2.7 *)
module type SEXP = sig
type t
type loc
@ -25,7 +25,7 @@ end
(** {2 Operations over S-expressions}
@since NEXT_RELEASE *)
@since 2.7 *)
module type S = sig
type t
type sexp = t