sig
module Table :
sig
module Key :
sig
type t
exception Bad_key of string
val compare : t -> t -> int
val of_string : string -> t
val to_string : t -> string
end
type key = Key.t
type +'a t
val empty : 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val singleton : key -> 'a -> 'a t
val remove : key -> 'a t -> 'a t
val merge :
(key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool
val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
val cardinal : 'a t -> int
val bindings : 'a t -> (key * 'a) list
val min_binding : 'a t -> key * 'a
val max_binding : 'a t -> key * 'a
val choose : 'a t -> key * 'a
val split : key -> 'a t -> 'a t * 'a option * 'a t
val find : key -> 'a t -> 'a
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
end
val key : string -> Toml.Table.Key.t
module Value :
sig
type value
type array
type table = Toml.Value.value Toml.Table.t
module To :
sig
exception Bad_type of string
val bool : Toml.Value.value -> bool
val int : Toml.Value.value -> int
val float : Toml.Value.value -> float
val string : Toml.Value.value -> string
val date : Toml.Value.value -> Unix.tm
val array : Toml.Value.value -> Toml.Value.array
val table : Toml.Value.value -> Toml.Value.table
module Array :
sig
val bool : Toml.Value.array -> bool list
val int : Toml.Value.array -> int list
val float : Toml.Value.array -> float list
val string : Toml.Value.array -> string list
val date : Toml.Value.array -> Unix.tm list
val array : Toml.Value.array -> Toml.Value.array list
val table : Toml.Value.array -> Toml.Value.table list
end
end
module Of :
sig
val bool : bool -> Toml.Value.value
val int : int -> Toml.Value.value
val float : float -> Toml.Value.value
val string : string -> Toml.Value.value
val date : Unix.tm -> Toml.Value.value
val array : Toml.Value.array -> Toml.Value.value
val table : Toml.Value.table -> Toml.Value.value
module Array :
sig
val bool : bool list -> Toml.Value.array
val int : int list -> Toml.Value.array
val float : float list -> Toml.Value.array
val string : string list -> Toml.Value.array
val date : Unix.tm list -> Toml.Value.array
val array : Toml.Value.array list -> Toml.Value.array
val table : Toml.Value.table list -> Toml.Value.array
end
end
end
val to_bool : Toml.Value.value -> bool
val to_int : Toml.Value.value -> int
val to_float : Toml.Value.value -> float
val to_string : Toml.Value.value -> string
val to_date : Toml.Value.value -> Unix.tm
val to_table : Toml.Value.value -> Toml.Value.value Toml.Table.t
val to_bool_array : Toml.Value.value -> bool list
val to_int_array : Toml.Value.value -> int list
val to_float_array : Toml.Value.value -> float list
val to_string_array : Toml.Value.value -> string list
val to_date_array : Toml.Value.value -> Unix.tm list
val to_array_array : Toml.Value.value -> Toml.Value.array list
val to_table_array : Toml.Value.value -> Toml.Value.table list
val get_bool : Toml.Table.Key.t -> Toml.Value.value Toml.Table.t -> bool
val get_int : Toml.Table.Key.t -> Toml.Value.value Toml.Table.t -> int
val get_float : Toml.Table.Key.t -> Toml.Value.value Toml.Table.t -> float
val get_string :
Toml.Table.Key.t -> Toml.Value.value Toml.Table.t -> string
val get_date : Toml.Table.Key.t -> Toml.Value.value Toml.Table.t -> Unix.tm
val get_table :
Toml.Table.Key.t ->
Toml.Value.value Toml.Table.t -> Toml.Value.value Toml.Table.t
val get_bool_array :
Toml.Table.Key.t -> Toml.Value.value Toml.Table.t -> bool list
val get_int_array :
Toml.Table.Key.t -> Toml.Value.value Toml.Table.t -> int list
val get_float_array :
Toml.Table.Key.t -> Toml.Value.value Toml.Table.t -> float list
val get_string_array :
Toml.Table.Key.t -> Toml.Value.value Toml.Table.t -> string list
val get_date_array :
Toml.Table.Key.t -> Toml.Value.value Toml.Table.t -> Unix.tm list
val get_array_array :
Toml.Table.Key.t ->
Toml.Value.value Toml.Table.t -> Toml.Value.array list
val get_table_array :
Toml.Table.Key.t ->
Toml.Value.value Toml.Table.t -> Toml.Value.value Toml.Table.t list
val of_bool : bool -> Toml.Value.value
val of_int : int -> Toml.Value.value
val of_float : float -> Toml.Value.value
val of_string : string -> Toml.Value.value
val of_date : Unix.tm -> Toml.Value.value
val of_table : Toml.Value.table -> Toml.Value.value
val of_bool_array : bool list -> Toml.Value.value
val of_int_array : int list -> Toml.Value.value
val of_float_array : float list -> Toml.Value.value
val of_string_array : string list -> Toml.Value.value
val of_date_array : Unix.tm list -> Toml.Value.value
val of_array_array : Toml.Value.array list -> Toml.Value.value
val of_table_array : Toml.Value.table list -> Toml.Value.value
module Parser :
sig
type location = {
source : string;
line : int;
column : int;
position : int;
}
exception Error of (string * Toml.Parser.location)
val parse : Lexing.lexbuf -> string -> Toml.Value.table
val from_string : string -> Toml.Value.table
val from_channel : Pervasives.in_channel -> Toml.Value.table
val from_filename : string -> Toml.Value.table
end
module Printer :
sig
val value : Format.formatter -> Toml.Value.value -> unit
val table : Format.formatter -> Toml.Value.table -> unit
val array : Format.formatter -> Toml.Value.array -> unit
end
module Compare :
sig
val value : Toml.Value.value -> Toml.Value.value -> int
val array : Toml.Value.array -> Toml.Value.array -> int
val table : Toml.Value.table -> Toml.Value.table -> int
end
end