From d09fe93c10efcf1a91675bc781de1d1a48b5eb96 Mon Sep 17 00:00:00 2001 From: Fardale Date: Tue, 30 Jun 2020 17:16:33 +0200 Subject: [PATCH] doc(core): add link to the doc of std module --- src/core/CCChar.mli | 1 + src/core/CCFormat.mli | 1 + src/core/CCInt32.mli | 1 + src/core/CCInt64.mli | 1 + src/core/CCList.mli | 1 + src/core/CCListLabels.mli | 1 + src/core/CCNativeint.mli | 1 + src/core/CCRandom.mli | 1 + src/core/CCString.mli | 1 + src/core/CCStringLabels.mli | 1 + src/core/mkshims.ml | 19 ++++++++++++++++--- 11 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/core/CCChar.mli b/src/core/CCChar.mli index b6135c76..59652600 100644 --- a/src/core/CCChar.mli +++ b/src/core/CCChar.mli @@ -5,6 +5,7 @@ @since 0.14 *) include module type of struct include Char end +(** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Char.html} Documentation for the standard Char module}*) val compare : t -> t -> int (** The comparison function for characters, with the same specification as diff --git a/src/core/CCFormat.mli b/src/core/CCFormat.mli index ca1e5b8b..fba5f482 100644 --- a/src/core/CCFormat.mli +++ b/src/core/CCFormat.mli @@ -11,6 +11,7 @@ type 'a iter = ('a -> unit) -> unit see https://discuss.ocaml.org/t/extend-existing-module/1389/4 *) include module type of struct include Format end +(** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Format.html} Documentation for the standard Format module}*) type t = Format.formatter type 'a printer = t -> 'a -> unit diff --git a/src/core/CCInt32.mli b/src/core/CCInt32.mli index 6cf7e6c0..54e5f166 100644 --- a/src/core/CCInt32.mli +++ b/src/core/CCInt32.mli @@ -16,6 +16,7 @@ @since 2.1 *) include module type of struct include Int32 end +(** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Int32.html} Documentation for the standard Int32 module}*) val min : t -> t -> t (** [min x y] returns the minimum of the two integers [x] and [y]. diff --git a/src/core/CCInt64.mli b/src/core/CCInt64.mli index a7c4307c..70ab7154 100644 --- a/src/core/CCInt64.mli +++ b/src/core/CCInt64.mli @@ -16,6 +16,7 @@ @since 0.13 *) include module type of struct include Int64 end +(** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Int64.html} Documentation for the standard Int64 module}*) val min : t -> t -> t (** [min x y] returns the minimum of the two integers [x] and [y]. diff --git a/src/core/CCList.mli b/src/core/CCList.mli index 0869ad91..d9bddf29 100644 --- a/src/core/CCList.mli +++ b/src/core/CCList.mli @@ -13,6 +13,7 @@ type 'a printer = Format.formatter -> 'a -> unit type 'a random_gen = Random.State.t -> 'a include module type of List +(** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/List.html} Documentation for the standard List module}*) type 'a t = 'a list diff --git a/src/core/CCListLabels.mli b/src/core/CCListLabels.mli index 9e1837ad..49595fb6 100644 --- a/src/core/CCListLabels.mli +++ b/src/core/CCListLabels.mli @@ -13,6 +13,7 @@ type 'a printer = Format.formatter -> 'a -> unit type 'a random_gen = Random.State.t -> 'a include module type of ListLabels +(** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/ListLabels.html} Documentation for the standard ListLabels module}*) type 'a t = 'a list diff --git a/src/core/CCNativeint.mli b/src/core/CCNativeint.mli index 7929a680..1eb11462 100644 --- a/src/core/CCNativeint.mli +++ b/src/core/CCNativeint.mli @@ -17,6 +17,7 @@ @since 2.1 *) include module type of struct include Nativeint end +(** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Nativeint.html} Documentation for the standard Nativeint module}*) val min : t -> t -> t (** [min x y] returns the minimum of the two integers [x] and [y]. diff --git a/src/core/CCRandom.mli b/src/core/CCRandom.mli index 1c8ffed5..cec88c3d 100644 --- a/src/core/CCRandom.mli +++ b/src/core/CCRandom.mli @@ -4,6 +4,7 @@ (** {1 Random Generators} *) include module type of struct include Random end +(** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Random.html} Documentation for the standard Random module}*) type state = Random.State.t diff --git a/src/core/CCString.mli b/src/core/CCString.mli index e69cf383..a3c212ac 100644 --- a/src/core/CCString.mli +++ b/src/core/CCString.mli @@ -13,6 +13,7 @@ type 'a gen = unit -> 'a option type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist] include module type of struct include String end +(** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/String.html} Documentation for the standard String module}*) val length : t -> int (** Return the length (number of characters) of the given string. *) diff --git a/src/core/CCStringLabels.mli b/src/core/CCStringLabels.mli index 68c5cef9..1c38a49e 100644 --- a/src/core/CCStringLabels.mli +++ b/src/core/CCStringLabels.mli @@ -11,6 +11,7 @@ type 'a gen = unit -> 'a option type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist] include module type of struct include StringLabels end +(** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/StringLabels.html} Documentation for the standard StringLabels module}*) val length : t -> int (** Return the length (number of characters) of the given string. *) diff --git a/src/core/mkshims.ml b/src/core/mkshims.ml index f0b615bd..faaa0fc8 100644 --- a/src/core/mkshims.ml +++ b/src/core/mkshims.ml @@ -76,27 +76,37 @@ let shims_list_post_408 = "include List" let shims_array_pre_406 = " include Array + (** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Array.html} Documentation for the standard Array module}*) module Floatarray = struct type t = float array end type 'a t = 'a array " let shims_array_label_pre_406 = " include ArrayLabels + (** {{: http://caml.inria.fr/pub/docs/manual-ocaml/libref/ArrayLabels.html} Documentation for the standard ArrayLabels module}*) module Floatarray = CCShimsArray_.Floatarray type 'a t = 'a array " let shims_array_label_406_408 = " include (ArrayLabels : module type of ArrayLabels with module Floatarray = Array.Floatarray) + (** {{: http://caml.inria.fr/pub/docs/manual-ocaml/libref/ArrayLabels.html} Documentation for the standard ArrayLabels module}*) type 'a t = 'a array " let shims_array_406_408 = " include Array + (** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Array.html} Documentation for the standard Array module}*) type 'a t = 'a array " -let shims_array_post_408 = "include Array" -let shims_array_label_post_408 = "include (ArrayLabels : module type of ArrayLabels with module Floatarray = Array.Floatarray)" +let shims_array_post_408 = " + include Array + (** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Array.html} Documentation for the standard Array module}*) +" +let shims_array_label_post_408 = " + include (ArrayLabels : module type of ArrayLabels with module Floatarray = Array.Floatarray) + (** {{: http://caml.inria.fr/pub/docs/manual-ocaml/libref/ArrayLabels.html} Documentation for the standard ArrayLabels module}*) +" let shims_let_op_pre_408 = " @@ -151,7 +161,10 @@ let shims_let_op_post_408 = " let shims_int_pre_408 = "" -let shims_int_post_408 = "include Int" +let shims_int_post_408 = " + include Int + (** {{: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Int.html} Documentation for the standard Int module}*) +" let () = C.main ~name:"mkshims" (fun c ->