sig
type json = Json.t
val pretty : Stdlib.Format.formatter -> Server.Data.json -> unit
module type S =
sig
type t
val jtype : Server.Package.jtype
val of_json : Server.Data.json -> Server.Data.S.t
val to_json : Server.Data.S.t -> Server.Data.json
end
module Junit :
sig
type t = unit
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jany :
sig
type t = json
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jbool :
sig
type t = bool
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jint :
sig
type t = int
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jfloat :
sig
type t = float
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jstring :
sig
type t = string
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jalpha :
sig
type t = string
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jtext :
sig
type t = json
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jmarkdown :
sig
type t = Markdown.text
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
val jpretty :
?indent:int ->
?margin:int ->
(Stdlib.Format.formatter -> 'a -> unit) -> 'a -> Server.Data.Jtext.t
module Joption :
functor (A : S) ->
sig
type t = A.t option
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jpair :
functor (A : S) (B : S) ->
sig
type t = A.t * B.t
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jtriple :
functor (A : S) (B : S) (C : S) ->
sig
type t = A.t * B.t * C.t
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jlist :
functor (A : S) ->
sig
type t = A.t list
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jalist :
functor (A : S) ->
sig
type t = A.t list
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Jarray :
functor (A : S) ->
sig
type t = A.t array
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
type 'a data = (module Server.Data.S with type t = 'a)
val junit : unit Server.Data.data
val jany : Server.Data.json Server.Data.data
val jbool : bool Server.Data.data
val jint : int Server.Data.data
val jfloat : float Server.Data.data
val jstring : string Server.Data.data
val jalpha : string Server.Data.data
val jindex : kind:string -> int Server.Data.data
val jkey : kind:string -> string Server.Data.data
val jlist : 'a Server.Data.data -> 'a list Server.Data.data
val jalist : 'a Server.Data.data -> 'a list Server.Data.data
val jarray : 'a Server.Data.data -> 'a array Server.Data.data
val joption : 'a Server.Data.data -> 'a option Server.Data.data
val derived :
package:Server.Package.package ->
id:Server.Package.ident -> Server.Package.jtype -> unit
val declare :
package:Server.Package.package ->
name:string ->
?descr:Markdown.text -> Server.Package.jtype -> Server.Package.jtype
module Record :
sig
type 'a record
type 'a signature
type ('a, 'b) field
module type S =
sig
type r
type t = r record
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
val default : t
val has :
(Server.Data.Record.S.r, 'a) Server.Data.Record.field ->
t -> bool
val get :
(Server.Data.Record.S.r, 'a) Server.Data.Record.field -> t -> 'a
val set :
(Server.Data.Record.S.r, 'a) Server.Data.Record.field ->
'a -> t -> t
end
val signature : unit -> 'a Server.Data.Record.signature
val field :
'r Server.Data.Record.signature ->
name:string ->
descr:Markdown.text ->
?default:'a ->
'a Server.Data.data -> ('r, 'a) Server.Data.Record.field
val option :
'r Server.Data.Record.signature ->
name:string ->
descr:Markdown.text ->
'a Server.Data.data -> ('r, 'a option) Server.Data.Record.field
val publish :
package:Server.Package.package ->
name:string ->
?descr:Markdown.text ->
'a Server.Data.Record.signature ->
(module Server.Data.Record.S with type r = 'a)
end
module Tag :
sig
type t = Package.tagInfo
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
end
module Enum :
sig
type 'a dictionary
type 'a tag
type 'a prefix
val tag_name : 'a Server.Data.Enum.tag -> string
val dictionary : unit -> 'a Server.Data.Enum.dictionary
val tag :
name:string ->
?label:Markdown.text ->
descr:Markdown.text ->
?value:'a ->
'a Server.Data.Enum.dictionary -> 'a Server.Data.Enum.tag
val add :
name:string ->
?label:Markdown.text ->
descr:Markdown.text ->
?value:'a -> 'a Server.Data.Enum.dictionary -> unit
val find :
'a Server.Data.Enum.dictionary -> 'a Server.Data.Enum.tag -> 'a
val lookup :
'a Server.Data.Enum.dictionary -> 'a -> 'a Server.Data.Enum.tag
val find_tag :
'a Server.Data.Enum.dictionary -> string -> 'a Server.Data.Enum.tag
val prefix :
name:string ->
?var:string ->
?label:Markdown.text ->
descr:Markdown.text ->
'a Server.Data.Enum.dictionary -> 'a Server.Data.Enum.prefix
val instance :
'a Server.Data.Enum.prefix -> string -> 'a Server.Data.Enum.tag
val extends :
name:string ->
?label:Markdown.text ->
descr:Markdown.text ->
?value:'a -> 'a Server.Data.Enum.prefix -> 'a Server.Data.Enum.tag
val tags : 'a Server.Data.Enum.dictionary -> Server.Data.Tag.t list
val set_lookup :
'a Server.Data.Enum.dictionary ->
('a -> 'a Server.Data.Enum.tag) -> unit
val publish :
package:Server.Package.package ->
name:string ->
descr:Markdown.text ->
'a Server.Data.Enum.dictionary ->
(module Server.Data.S with type t = 'a)
end
module type Info = sig val name : string end
module type Map =
sig
type 'a t
type key
val empty : 'a Server.Data.Map.t
val add :
Server.Data.Map.key ->
'a -> 'a Server.Data.Map.t -> 'a Server.Data.Map.t
val find : Server.Data.Map.key -> 'a Server.Data.Map.t -> 'a
end
module type Index =
sig
type t
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
val get : t -> int
val find : int -> t
val clear : unit -> unit
end
module Static :
functor (M : Map) (I : Info) ->
sig
type t = M.key
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
val get : t -> int
val find : int -> t
val clear : unit -> unit
end
module Index :
functor (M : Map) (I : Info) ->
sig
type t = M.key
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
val get : t -> int
val find : int -> t
val clear : unit -> unit
end
module type IdentifiedType =
sig type t val id : Server.Data.IdentifiedType.t -> int end
module Identified :
functor (A : IdentifiedType) (I : Info) ->
sig
type t = A.t
val jtype : Package.jtype
val of_json : json -> t
val to_json : t -> json
val get : t -> int
val find : int -> t
val clear : unit -> unit
end
exception InputError of string
val failure :
?json:Server.Data.json ->
('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
val failure_from_type_error : string -> Server.Data.json -> 'a
end