package otoml

  1. Overview
  2. Docs

Module Base.MakeSource

Parameters

module I : TomlInteger
module F : TomlFloat
module D : TomlDate

Signature

Sourcetype toml_integer = I.t
Sourcetype toml_float = F.t
Sourcetype toml_date = D.t
Sourcetype t =
  1. | TomlString of string
  2. | TomlInteger of toml_integer
  3. | TomlFloat of toml_float
  4. | TomlBoolean of bool
  5. | TomlOffsetDateTime of toml_date
  6. | TomlLocalDateTime of toml_date
  7. | TomlLocalDate of toml_date
  8. | TomlLocalTime of toml_date
  9. | TomlArray of t list
  10. | TomlTable of (string * t) list
  11. | TomlInlineTable of (string * t) list
  12. | TomlTableArray of t list
Sourcemodule Printer : sig ... end
Sourcemodule Parser : sig ... end

Constructors

Sourceval string : string -> t
Sourceval integer : toml_integer -> t
Sourceval float : toml_float -> t
Sourceval boolean : bool -> t
Sourceval offset_datetime : toml_date -> t
Sourceval local_datetime : toml_date -> t
Sourceval local_date : toml_date -> t
Sourceval local_time : toml_date -> t
Sourceval array : t list -> t
Sourceval table : (string * t) list -> t
Sourceval inline_table : (string * t) list -> t

Accessors

Sourceval get_value : t -> t
Sourceval get_table : t -> (string * t) list
Sourceval get_array : ?strict:bool -> (t -> 'a) -> t -> 'a list

In non-strict mode, forces a value x to a single-item array [x]

Sourceval get_string : ?strict:bool -> t -> string
Sourceval get_integer : ?strict:bool -> t -> toml_integer
Sourceval get_float : ?strict:bool -> t -> toml_float
Sourceval get_boolean : ?strict:bool -> t -> bool
Sourceval get_offset_datetime : t -> toml_date
Sourceval get_local_datetime : t -> toml_date
Sourceval get_datetime : t -> toml_date
Sourceval get_local_date : t -> toml_date
Sourceval get_date : t -> toml_date
Sourceval get_local_time : t -> toml_date

High-level interface

Sourceval list_table_keys : t -> string list
Sourceval find : t -> (t -> 'a) -> string list -> 'a
Sourceval find_opt : t -> (t -> 'a) -> string list -> 'a option
Sourceval find_or : default:'a -> t -> (t -> 'a) -> string list -> 'a
Sourceval find_result : t -> (t -> 'a) -> string list -> ('a, string) result
Sourceval update : ?use_inline_tables:bool -> t -> string list -> t option -> t
OCaml

Innovation. Community. Security.