diff --git a/src/core/CCArray.mli b/src/core/CCArray.mli index d2c767f1..cfdf448b 100644 --- a/src/core/CCArray.mli +++ b/src/core/CCArray.mli @@ -15,6 +15,7 @@ type 'a printer = Format.formatter -> 'a -> unit (** {2 Arrays} *) include module type of CCShimsArray_ +(** @inline *) val empty : 'a t (** [empty] is the empty array, physically equal to [[||]]. *) @@ -177,6 +178,12 @@ val random_choose : 'a t -> 'a random_gen (** [random_choose a rs] randomly chooses an element of [a]. @raise Not_found if the array/slice is empty. *) +(*val of_list_map : ('a -> 'b) -> 'a list -> 'b t/*) +(** [of_list_map f l] applies the function [f] to all the elements of the list [l] + and builds an array with the results returned by [f]. The result is equivalent to + [map f (Array.of_list l)]. + @since NEXT_RELEASE *) + 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]. @@ -294,7 +301,8 @@ module Infix : sig @since 0.17 *) (** Let operators on OCaml >= 4.08.0, nothing otherwise - @since 2.8 *) + @since 2.8 + @inline *) include CCShimsMkLet_.S with type 'a t_let := 'a array end diff --git a/src/core/CCArrayLabels.mli b/src/core/CCArrayLabels.mli index 2b53dbb4..c385c721 100644 --- a/src/core/CCArrayLabels.mli +++ b/src/core/CCArrayLabels.mli @@ -15,6 +15,7 @@ type 'a printer = Format.formatter -> 'a -> unit (** {2 Arrays} *) include module type of CCShimsArrayLabels_ +(** @inline *) val empty : 'a t (** [empty] is the empty array, physically equal to [||]. *) @@ -310,7 +311,8 @@ module Infix : sig @since 0.17 *) (** Let operators on OCaml >= 4.08.0, nothing otherwise - @since 2.8 *) + @since 2.8 + @inline *) include CCShimsMkLet_.S with type 'a t_let := 'a array end diff --git a/src/core/CCFun.mli b/src/core/CCFun.mli index 45fb8d39..83b98328 100644 --- a/src/core/CCFun.mli +++ b/src/core/CCFun.mli @@ -4,6 +4,7 @@ (** Basic operations on Functions *) include module type of CCShimsFun_ +(** @inline *) val compose : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c (** [compose f g x] is [g (f x)]. Composition. *) diff --git a/src/core/CCInt.mli b/src/core/CCInt.mli index 57d6aaa0..182a51df 100644 --- a/src/core/CCInt.mli +++ b/src/core/CCInt.mli @@ -4,6 +4,7 @@ (** Basic Int functions *) include module type of CCShimsInt_ +(** @inline *) type t = int diff --git a/src/core/CCList.mli b/src/core/CCList.mli index 9a3e13b8..034b8a31 100644 --- a/src/core/CCList.mli +++ b/src/core/CCList.mli @@ -926,15 +926,15 @@ module Infix : sig @since 0.17 *) (** Let operators on OCaml >= 4.08.0, nothing otherwise - @since 2.8 *) + @since 2.8 + @inline *) include CCShimsMkLet_.S with type 'a t_let := 'a list include CCShimsMkLetList_.S + (** @inline *) end -(** Let operators on OCaml >= 4.08.0, nothing otherwise - @since 2.8 *) -include CCShimsMkLet_.S with type 'a t_let := 'a list +include module type of Infix (** {2 IO} *) diff --git a/src/core/CCListLabels.mli b/src/core/CCListLabels.mli index f2b93b0c..41b1e166 100644 --- a/src/core/CCListLabels.mli +++ b/src/core/CCListLabels.mli @@ -903,15 +903,15 @@ module Infix : sig @since 0.17 *) (** Let operators on OCaml >= 4.08.0, nothing otherwise - @since 2.8 *) + @since 2.8 + @inline *) include CCShimsMkLet_.S with type 'a t_let := 'a list include CCShimsMkLetList_.S + (** @inline *) end -(** Let operators on OCaml >= 4.08.0, nothing otherwise - @since 2.8 *) -include CCShimsMkLet_.S with type 'a t_let := 'a list +include module type of Infix (** {2 IO} *) diff --git a/src/core/CCOption.mli b/src/core/CCOption.mli index 72eeb7fa..04bcaf8e 100644 --- a/src/core/CCOption.mli +++ b/src/core/CCOption.mli @@ -187,21 +187,19 @@ module Infix : sig (** [o1 <+> o2] is [o1] if [o1] is [Some _], [o2] if [o1] is [None]. *) (** Let operators on OCaml >= 4.08.0, nothing otherwise - @since 2.8 *) + @since 2.8 + @inline *) include CCShimsMkLet_.S with type 'a t_let := 'a option end - -(** Let operators on OCaml >= 4.08.0, nothing otherwise - @since 2.8 *) -include CCShimsMkLet_.S with type 'a t_let := 'a option +include module type of Infix (** {2 Conversion and IO} *) val to_list : 'a t -> 'a list (** [to_list o] returns [[x]] if [o] is [Some x] or the empty list [[]] if [o] is [None]. *) - + val of_list : 'a list -> 'a t (** [of_list l] returns [Some x] (x being the head of the list l), or [None] if [l] is the empty list. *) diff --git a/src/core/CCParse.mli b/src/core/CCParse.mli index 0e0a44e6..5fbf7624 100644 --- a/src/core/CCParse.mli +++ b/src/core/CCParse.mli @@ -644,7 +644,8 @@ module Infix : sig @since 3.6 *) (** Let operators on OCaml >= 4.08.0, nothing otherwise - @since 2.8 *) + @since 2.8 + @inline *) include CCShimsMkLet_.S with type 'a t_let := 'a t end diff --git a/src/core/CCRandom.mli b/src/core/CCRandom.mli index 920ce5fe..b8a86626 100644 --- a/src/core/CCRandom.mli +++ b/src/core/CCRandom.mli @@ -151,7 +151,8 @@ val pure : 'a -> 'a t val (<*>) : ('a -> 'b) t -> 'a t -> 'b t (** Let operators on OCaml >= 4.08.0, nothing otherwise - @since 2.8 *) + @since 2.8 + @inline *) include CCShimsMkLet_.S with type 'a t_let := 'a t (** {4 Run a generator} *) diff --git a/src/core/CCResult.mli b/src/core/CCResult.mli index 3ba440df..04213172 100644 --- a/src/core/CCResult.mli +++ b/src/core/CCResult.mli @@ -191,17 +191,13 @@ module Infix : sig over the error of [b] if both fail. *) (** Let operators on OCaml >= 4.08.0, nothing otherwise - @since 2.8 *) + @since 2.8 + @inline *) include CCShimsMkLet_.S2 with type ('a,'e) t_let2 := ('a,'e) result end include module type of Infix -(** Let operators on OCaml >= 4.08.0, nothing otherwise - @since 2.8 *) -include CCShimsMkLet_.S2 with type ('a,'e) t_let2 := ('a,'e) result - - (** {2 Collections} *) val flatten_l : ('a, 'err) t list -> ('a list, 'err) t diff --git a/src/core/CCVector.mli b/src/core/CCVector.mli index 578cc6db..c631a721 100644 --- a/src/core/CCVector.mli +++ b/src/core/CCVector.mli @@ -384,5 +384,6 @@ val pp : ?pp_start:unit printer -> ?pp_stop:unit printer -> ?pp_sep:unit printer (fun out -> Format.fprintf out ",@ "). *) (** Let operators on OCaml >= 4.08.0, nothing otherwise - @since 2.8 *) + @since 2.8 + @inline *) include CCShimsMkLet_.S2 with type ('a,'e) t_let2 := ('a,'e) t