Skip to content
Snippets Groups Projects
Commit 163cab7c authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[server] additions in data documentation

parent 476c8b37
No related branches found
No related tags found
No related merge requests found
...@@ -49,7 +49,12 @@ ...@@ -49,7 +49,12 @@
documentation and returns an OCaml value containing the resulting documentation and returns an OCaml value containing the resulting
datatype module. 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 ...@@ -58,6 +63,7 @@ type json = Json.t
val page : Doc.page (** Documentation page for general purpose data types *) val page : Doc.page (** Documentation page for general purpose data types *)
val pretty : Format.formatter -> json -> unit val pretty : Format.formatter -> json -> unit
(** Datatype module signature *)
module type S = module type S =
sig sig
type t type t
...@@ -75,6 +81,7 @@ sig ...@@ -75,6 +81,7 @@ sig
val descr : Markdown.text val descr : Markdown.text
end end
(** Polymorphic data value *)
type 'a data = (module S with type t = 'a) type 'a data = (module S with type t = 'a)
(* -------------------------------------------------------------------------- *) (* -------------------------------------------------------------------------- *)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment