sig
type json = Json.t
val pretty : Stdlib.Format.formatter -> Data.json -> unit
module type S =
sig
type t
val jtype : Package.jtype
val of_json : Data.json -> Data.S.t
val to_json : Data.S.t -> 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 -> 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 Data.S with type t = 'a)
val junit : unit Data.data
val jany : Data.json Data.data
val jbool : bool Data.data
val jint : int Data.data
val jfloat : float Data.data
val jstring : string Data.data
val jalpha : string Data.data
val jindex : kind:string -> int Data.data
val jkey : kind:string -> string Data.data
val jlist : 'a Data.data -> 'a list Data.data
val jalist : 'a Data.data -> 'a list Data.data
val jarray : 'a Data.data -> 'a array Data.data
val joption : 'a Data.data -> 'a option Data.data
val derived :
package:Package.package -> id:Package.ident -> Package.jtype -> unit
val declare :
package:Package.package ->
name:string -> ?descr:Markdown.text -> Package.jtype -> 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 : (Data.Record.S.r, 'a) Data.Record.field -> t -> bool
val get : (Data.Record.S.r, 'a) Data.Record.field -> t -> 'a
val set : (Data.Record.S.r, 'a) Data.Record.field -> 'a -> t -> t
end
val signature : unit -> 'a Data.Record.signature
val field :
'r Data.Record.signature ->
name:string ->
descr:Markdown.text ->
?default:'a -> 'a Data.data -> ('r, 'a) Data.Record.field
val option :
'r Data.Record.signature ->
name:string ->
descr:Markdown.text ->
'a Data.data -> ('r, 'a option) Data.Record.field
val publish :
package:Package.package ->
name:string ->
?descr:Markdown.text ->
'a Data.Record.signature -> (module 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 Data.Enum.tag -> string
val dictionary : unit -> 'a Data.Enum.dictionary
val tag :
name:string ->
?label:Markdown.text ->
descr:Markdown.text ->
?value:'a -> 'a Data.Enum.dictionary -> 'a Data.Enum.tag
val add :
name:string ->
?label:Markdown.text ->
descr:Markdown.text -> ?value:'a -> 'a Data.Enum.dictionary -> unit
val find : 'a Data.Enum.dictionary -> 'a Data.Enum.tag -> 'a
val lookup : 'a Data.Enum.dictionary -> 'a -> 'a Data.Enum.tag
val find_tag : 'a Data.Enum.dictionary -> string -> 'a Data.Enum.tag
val prefix :
name:string ->
?var:string ->
?label:Markdown.text ->
descr:Markdown.text -> 'a Data.Enum.dictionary -> 'a Data.Enum.prefix
val instance : 'a Data.Enum.prefix -> string -> 'a Data.Enum.tag
val extends :
name:string ->
?label:Markdown.text ->
descr:Markdown.text ->
?value:'a -> 'a Data.Enum.prefix -> 'a Data.Enum.tag
val tags : 'a Data.Enum.dictionary -> Data.Tag.t list
val set_lookup :
'a Data.Enum.dictionary -> ('a -> 'a Data.Enum.tag) -> unit
val publish :
package:Package.package ->
name:string ->
descr:Markdown.text ->
'a Data.Enum.dictionary -> (module 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 Data.Map.t
val add : Data.Map.key -> 'a -> 'a Data.Map.t -> 'a Data.Map.t
val find : Data.Map.key -> 'a 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 : 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:Data.json ->
('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> 'a
val failure_from_type_error : string -> Data.json -> 'a
end