From 6b62fce0aca7d434d68684a5c30223d548084448 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Tue, 22 Sep 2015 22:29:58 +0200 Subject: [PATCH] small details --- src/core/CCIO.ml | 2 +- src/core/CCIO.mli | 4 ++-- src/core/CCList.mli | 15 +++++++++------ src/core/containers.ml | 3 +++ 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/core/CCIO.ml b/src/core/CCIO.ml index 86190256..87113cb7 100644 --- a/src/core/CCIO.ml +++ b/src/core/CCIO.ml @@ -337,6 +337,6 @@ module File = struct let show_walk_item (i,f) = (match i with | `File -> "file:" - | `Dir -> "dir: " + | `Dir -> "dir:" ) ^ f end diff --git a/src/core/CCIO.mli b/src/core/CCIO.mli index 79a8ce64..e1c0d6e8 100644 --- a/src/core/CCIO.mli +++ b/src/core/CCIO.mli @@ -94,7 +94,7 @@ val read_all_bytes : ?size:int -> in_channel -> Bytes.t @param size the internal buffer size @since 0.12 *) -(** {6 Output} *) +(** {2 Output} *) val with_out : ?mode:int -> ?flags:open_flag list -> string -> (out_channel -> 'a) -> 'a @@ -133,7 +133,7 @@ val tee : ('a -> unit) list -> 'a gen -> 'a gen (** [tee funs gen] behaves like [gen], but each element is given to every function [f] in [funs] at the time the element is produced. *) -(** {6 File and file names} +(** {2 File and file names} How to list recursively files in a directory: {[ diff --git a/src/core/CCList.mli b/src/core/CCList.mli index 27d2757e..8bc93f7e 100644 --- a/src/core/CCList.mli +++ b/src/core/CCList.mli @@ -227,27 +227,30 @@ end module Set : sig val add : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a t - (** [add x set] adds [x] to [set] if it was not already present + (** [add x set] adds [x] to [set] if it was not already present. Linear time. @since 0.11 *) val remove : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> 'a t - (** [remove x set] removes one occurrence of [x] from [set] + (** [remove x set] removes one occurrence of [x] from [set]. Linear time. @since 0.11 *) val mem : ?eq:('a -> 'a -> bool) -> 'a -> 'a t -> bool - (** membership to the list *) + (** membership to the list. Linear time *) val subset : ?eq:('a -> 'a -> bool) -> 'a t -> 'a t -> bool (** test for inclusion *) val uniq : ?eq:('a -> 'a -> bool) -> 'a t -> 'a t - (** list uniq: remove duplicates w.r.t the equality predicate *) + (** list uniq: remove duplicates w.r.t the equality predicate. + Complexity is quadratic in the length of the list, but the order + of elements is preserved. If you wish for a faster de-duplication + but do not care about the order, use {!sort_uniq}*) val union : ?eq:('a -> 'a -> bool) -> 'a t -> 'a t -> 'a t - (** list union *) + (** list union. Complexity is product of length of inputs. *) val inter : ?eq:('a -> 'a -> bool) -> 'a t -> 'a t -> 'a t - (** list intersection *) + (** list intersection. Complexity is product of length of inputs., *) end (** {2 Other Constructors} *) diff --git a/src/core/containers.ml b/src/core/containers.ml index d1c862c3..299c1b9c 100644 --- a/src/core/containers.ml +++ b/src/core/containers.ml @@ -90,3 +90,6 @@ module String = struct include CCString end module Vector = CCVector + +module Int64 = CCInt64 +(** @since NEXT_RELEASE *)