From a30e471a6fb6e59fcdbcfef406e577a0b46d69c1 Mon Sep 17 00:00:00 2001 From: Fardale <33528128+FardaleM@users.noreply.github.com> Date: Wed, 15 Feb 2023 02:56:15 +0100 Subject: [PATCH] fix doc (#425) --- src/core/CCArray.mli | 6 +++--- src/core/CCArrayLabels.mli | 6 +++--- src/core/CCHeap.mli | 2 +- src/core/CCInt.mli | 5 ++--- src/core/CCList.mli | 6 +++--- src/core/CCListLabels.mli | 2 +- src/core/CCOption.mli | 2 +- src/core/CCParse.mli | 4 ++-- src/core/CCSeq.mli | 2 +- src/core/CCShims_syntax.mli | 3 +-- src/core/CCString.mli | 2 +- src/core/CCStringLabels.mli | 2 +- src/data/CCBV.mli | 2 +- src/data/CCKTree.ml | 2 +- src/data/CCKTree.mli | 2 +- 15 files changed, 23 insertions(+), 25 deletions(-) diff --git a/src/core/CCArray.mli b/src/core/CCArray.mli index 9aed2950..487bf760 100644 --- a/src/core/CCArray.mli +++ b/src/core/CCArray.mli @@ -17,8 +17,8 @@ type 'a printer = Format.formatter -> 'a -> unit [@@@ifge 4.8] include module type of Array -(** @inline - {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Array.html} Documentation for the standard Array module}*) +(** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Array.html} Documentation for the standard Array module} + @inline *) [@@@elifge 4.6] @@ -313,7 +313,7 @@ val sort_generic : @since 0.14 *) (** {3 Infix Operators} - It is convenient to {!open CCArray.Infix} to access the infix operators + It is convenient to [open CCArray.Infix] to access the infix operators without cluttering the scope too much. @since 2.7 *) diff --git a/src/core/CCArrayLabels.mli b/src/core/CCArrayLabels.mli index df5e3739..85e2e3c3 100644 --- a/src/core/CCArrayLabels.mli +++ b/src/core/CCArrayLabels.mli @@ -17,8 +17,8 @@ type 'a printer = Format.formatter -> 'a -> unit [@@@ifge 4.8] include module type of ArrayLabels with module Floatarray = Array.Floatarray -(** @inline - {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Array.html} Documentation for the standard Array module}*) +(** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Array.html} Documentation for the standard Array module} + @inline *) [@@@elifge 4.6] @@ -327,7 +327,7 @@ val sort_generic : @since 0.14 *) (** {3 Infix Operators} - It is convenient to {!open CCArray.Infix} to access the infix operators + It is convenient to [open CCArray.Infix] to access the infix operators without cluttering the scope too much. @since 2.7 *) diff --git a/src/core/CCHeap.mli b/src/core/CCHeap.mli index 37d15af3..894a7ad2 100644 --- a/src/core/CCHeap.mli +++ b/src/core/CCHeap.mli @@ -176,7 +176,7 @@ module type S = sig [pp_stop] is called at the end, [pp_sep] is called between each elements. By defaults [pp_start] and [pp_stop] does nothing and [pp_sep] defaults to (fun out -> Format.fprintf out ",@ "). - Renamed from {!print} since 2.0 + Renamed from [print] since 2.0 @since 0.16 *) end diff --git a/src/core/CCInt.mli b/src/core/CCInt.mli index 537a26c9..e39ee474 100644 --- a/src/core/CCInt.mli +++ b/src/core/CCInt.mli @@ -5,9 +5,8 @@ [@@@ifge 4.08] include module type of Int -(** @inline - - {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Int.html} Documentation for the standard Int module}*) +(** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Int.html} Documentation for the standard Int module} + @inline *) [@@@endif] diff --git a/src/core/CCList.mli b/src/core/CCList.mli index 056a182d..c7a15253 100644 --- a/src/core/CCList.mli +++ b/src/core/CCList.mli @@ -13,8 +13,8 @@ type 'a random_gen = Random.State.t -> 'a [@@@ifge 4.8] include module type of List with type 'a t := 'a list -(** @inline - {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/List.html} Documentation for the standard List module}*) +(** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/List.html} Documentation for the standard List module} + @inline *) type +'a t = 'a list @@ -612,7 +612,7 @@ val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t itself as second argument. *) val iteri : (int -> 'a -> unit) -> 'a t -> unit -(** [iteri f l] is like {!iter}, but the function [f] is applied to the index of +(** [iteri f l] is like {!val-iter}, but the function [f] is applied to the index of the element as first argument (counting from 0), and the element itself as second argument. *) diff --git a/src/core/CCListLabels.mli b/src/core/CCListLabels.mli index 81ff9b83..fb6a5c10 100644 --- a/src/core/CCListLabels.mli +++ b/src/core/CCListLabels.mli @@ -910,7 +910,7 @@ val of_gen : 'a gen -> 'a t In the result, elements appear in the same order as they did in the source [gen]. *) (** {2 Infix Operators} - It is convenient to {!open CCList.Infix} to access the infix operators + It is convenient to [open CCList.Infix] to access the infix operators without cluttering the scope too much. @since 0.16 *) diff --git a/src/core/CCOption.mli b/src/core/CCOption.mli index 1e535776..781edf87 100644 --- a/src/core/CCOption.mli +++ b/src/core/CCOption.mli @@ -47,7 +47,7 @@ val none : 'a t val flat_map : ('a -> 'b t) -> 'a t -> 'b t (** [flat_map f o] is equivalent to {!map} followed by {!flatten}. - Flip version of {!>>=}. *) + Flip version of {!(>>=)}. *) val bind : 'a t -> ('a -> 'b t) -> 'b t (** [bind o f] is [f v] if [o] is [Some v], [None] otherwise. diff --git a/src/core/CCParse.mli b/src/core/CCParse.mli index fdbdc9e8..7d1da442 100644 --- a/src/core/CCParse.mli +++ b/src/core/CCParse.mli @@ -239,7 +239,7 @@ end val recurse : slice -> 'a t -> 'a t (** [recurse slice p] parses the [slice] (most likely obtained via another combinator, such as {!split_1} - or {!split_n}), using [p]. + or {!split_list}), using [p]. The slice contains a position which is used to relocate error messages to their position in the whole input, not just relative to @@ -294,7 +294,7 @@ val chars_fold_transduce : | `Fail of string ]) -> 'acc -> ('acc * string) t -(** Same as {!char_fold} but with the following differences: +(** Same as {!chars_fold} but with the following differences: - returns a string along with the accumulator, rather than the slice of all the characters accepted by [`Continue _]. diff --git a/src/core/CCSeq.mli b/src/core/CCSeq.mli index b08b5e4a..a98786f3 100644 --- a/src/core/CCSeq.mli +++ b/src/core/CCSeq.mli @@ -47,7 +47,7 @@ val cycle : 'a t -> 'a t val iterate : ('a -> 'a) -> 'a -> 'a t (** [iterate f a] corresponds to the infinite sequence containing [a], [f a], [f (f a)], - ...] + ... @since 3.10 *) val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t diff --git a/src/core/CCShims_syntax.mli b/src/core/CCShims_syntax.mli index d975819c..95530a3f 100644 --- a/src/core/CCShims_syntax.mli +++ b/src/core/CCShims_syntax.mli @@ -1,8 +1,7 @@ [@@@ifge 4.8] (** Let operators on OCaml >= 4.08.0, nothing otherwise - @since 2.8 - @inline *) + @since 2.8 *) module type LET = sig type 'a t diff --git a/src/core/CCString.mli b/src/core/CCString.mli index 56cc4d04..1174b258 100644 --- a/src/core/CCString.mli +++ b/src/core/CCString.mli @@ -388,7 +388,7 @@ module Split : sig val list_ : ?drop:drop_if_empty -> by:string -> string -> (string * int * int) list (** [list_ ~drop ~by s] splits the given string [s] along the given separator [by]. - Should only be used with very small separators, otherwise use {!Containers_string.KMP}. + Should only be used with very small separators. @return a [list] of slices [(s,index,length)] that are separated by [by]. {!String.sub} can then be used to actually extract a string from the slice. diff --git a/src/core/CCStringLabels.mli b/src/core/CCStringLabels.mli index debf5b80..d39e50be 100644 --- a/src/core/CCStringLabels.mli +++ b/src/core/CCStringLabels.mli @@ -428,7 +428,7 @@ module Split : sig string -> (string * int * int) list (** [list_ ?drop ~by s] splits the given string [s] along the given separator [by]. - Should only be used with very small separators, otherwise use {!Containers_string.KMP}. + Should only be used with very small separators. @return a [list] of slices [(s,index,length)] that are separated by [by]. {!String.sub} can then be used to actually extract a string from the slice. diff --git a/src/data/CCBV.mli b/src/data/CCBV.mli index b432a0e0..ff3bbc29 100644 --- a/src/data/CCBV.mli +++ b/src/data/CCBV.mli @@ -9,7 +9,7 @@ a new signature. The size of the bitvector used to be rounded up to the multiple of 30 or 62. - In other words some functions such as {!iter} would iterate on more + In other words some functions such as {!val-iter} would iterate on more bits than what was originally asked for. This is not the case anymore. *) diff --git a/src/data/CCKTree.ml b/src/data/CCKTree.ml index f077526a..60a84d53 100644 --- a/src/data/CCKTree.ml +++ b/src/data/CCKTree.ml @@ -2,7 +2,7 @@ (** {1 Lazy Tree Structure} This structure can be used to represent trees and directed - graphs (as infinite trees) in a lazy fashion. Like {!CCKList}, it + graphs (as infinite trees) in a lazy fashion. It is a structural type. *) type 'a iter = ('a -> unit) -> unit diff --git a/src/data/CCKTree.mli b/src/data/CCKTree.mli index b4af0360..cd620920 100644 --- a/src/data/CCKTree.mli +++ b/src/data/CCKTree.mli @@ -2,7 +2,7 @@ (** Lazy Tree Structure This structure can be used to represent trees and directed - graphs (as infinite trees) in a lazy fashion. Like {!CCKList}, it + graphs (as infinite trees) in a lazy fashion. It is a structural type. *) type 'a iter = ('a -> unit) -> unit