Below is the API for the OCaml standard library. It's directly copied over from the OCaml Manual, formatted to the Reason syntax and styled accordingly. The API docs are work-in-progress; we'll be polishing these gradually!
If you're targeting JavaScript, the API docs for BuckleScript includes all of below, plus JS-specific APIs.
sig type t = { loc_start : Lexing.position; loc_end : Lexing.position; loc_ghost : bool; } val none : Location.t val in_file : string -> Location.t val init : Lexing.lexbuf -> string -> unit val curr : Lexing.lexbuf -> Location.t val symbol_rloc : unit -> Location.t val symbol_gloc : unit -> Location.t val rhs_loc : int -> Location.t val input_name : string Pervasives.ref val input_lexbuf : Lexing.lexbuf option Pervasives.ref val get_pos_info : Lexing.position -> string * int * int val print_loc : Format.formatter -> Location.t -> unit val print_error : Format.formatter -> Location.t -> unit val print_error_cur_file : Format.formatter -> unit val print_warning : Location.t -> Format.formatter -> Warnings.t -> unit val formatter_for_warnings : Format.formatter Pervasives.ref val prerr_warning : Location.t -> Warnings.t -> unit val echo_eof : unit -> unit val reset : unit -> unit val warning_printer : (Location.t -> Format.formatter -> Warnings.t -> unit) Pervasives.ref val default_warning_printer : Location.t -> Format.formatter -> Warnings.t -> unit val highlight_locations : Format.formatter -> Location.t list -> bool type 'a loc = { txt : 'a; loc : Location.t; } val mknoloc : 'a -> 'a Location.loc val mkloc : 'a -> Location.t -> 'a Location.loc val print : Format.formatter -> Location.t -> unit val print_filename : Format.formatter -> string -> unit val absolute_path : string -> string val show_filename : string -> string val absname : bool Pervasives.ref type error = { loc : Location.t; msg : string; sub : Location.error list; if_highlight : string; } exception Error of Location.error val error : ?loc:Location.t -> ?sub:Location.error list -> ?if_highlight:string -> string -> Location.error val errorf : ?loc:Location.t -> ?sub:Location.error list -> ?if_highlight:string -> ('a, unit, string, Location.error) Pervasives.format4 -> 'a val raise_errorf : ?loc:Location.t -> ?sub:Location.error list -> ?if_highlight:string -> ('a, unit, string, 'b) Pervasives.format4 -> 'a val error_of_printer : Location.t -> (Format.formatter -> 'a -> unit) -> 'a -> Location.error val error_of_printer_file : (Format.formatter -> 'a -> unit) -> 'a -> Location.error val error_of_exn : exn -> Location.error option val register_error_of_exn : (exn -> Location.error option) -> unit val report_error : Format.formatter -> Location.error -> unit val error_reporter : (Format.formatter -> Location.error -> unit) Pervasives.ref val default_error_reporter : Format.formatter -> Location.error -> unit val report_exception : Format.formatter -> exn -> unit end