package otoml

  1. Overview
  2. Docs

Module Make.ParserSource

Sourceval from_file : string -> t

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

Sourceval from_channel : in_channel -> t

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

Sourceval from_string : string -> t

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

Sourceval from_file_result : string -> (t, string) result

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

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

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

OCaml

Innovation. Community. Security.