package otoml

  1. Overview
  2. Docs
val from_file : string -> t

Reads TOML from a file. May raise Parse_error or Stdlib.Sys_error.

val from_channel : Stdlib.in_channel -> t

Reads TOML from an input channel. May raise Parse_error or Stdlib.Sys_error.

val from_string : string -> t

Reads TOML from a string. May raise Parse_error or Stdlib.Sys_error.

val from_file_result : string -> (t, string) Stdlib.result

Like from_file, but handles both Parse_error or Stdlib.Sys_error exceptions and wraps the error message in Stdlib.result.

val from_channel_result : Stdlib.in_channel -> (t, string) Stdlib.result
val from_string_result : string -> (t, string) Stdlib.result
val format_parse_error : (int * int) option -> string -> string

Converts the value attached to a Parse_error exception to an error message string.