From 163cab7c59ae06ad0f3e24cec52f37e8b9e3ea89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Correnson?= <loic.correnson@cea.fr> Date: Thu, 19 Mar 2020 11:11:48 +0100 Subject: [PATCH] [server] additions in data documentation --- src/plugins/server/data.mli | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/plugins/server/data.mli b/src/plugins/server/data.mli index 6c56c265098..98277a45c1e 100644 --- a/src/plugins/server/data.mli +++ b/src/plugins/server/data.mli @@ -49,7 +49,12 @@ documentation and returns an OCaml value containing the resulting datatype module. - The same mechanism is used in modules [States] and [Request]. + Hence, in addition to module signature [Data.S] for values, + there is also a polymorphic type ['a Data.data] for module + values carrying a data module with type [t = 'a]. + + The same mechanism is used throughout modules [States] and [Request] + each time a JSON record or tag is needed. *) (* -------------------------------------------------------------------------- *) @@ -58,6 +63,7 @@ type json = Json.t val page : Doc.page (** Documentation page for general purpose data types *) val pretty : Format.formatter -> json -> unit +(** Datatype module signature *) module type S = sig type t @@ -75,6 +81,7 @@ sig val descr : Markdown.text end +(** Polymorphic data value *) type 'a data = (module S with type t = 'a) (* -------------------------------------------------------------------------- *) -- GitLab