sig
type integer_error = {
type_name : string;
lower_bound : int64;
upper_bound : int64;
value : int64;
}
exception Integer_exception of Utils.integer_error
val string_of_integer_error : Utils.integer_error -> string
type u1 = private int
val u1 : int -> Utils.u1
val max_u1 : int
type s1 = private int
val s1 : int -> Utils.s1
type u2 = private int
val max_u2 : int
val u2 : int -> Utils.u2
type s2 = private int
val min_s2 : int
val max_s2 : int
val s2 : int -> Utils.s2
type u4 = private int64
val u4 : int64 -> Utils.u4
type s4 = private int32
val min_s4 : Utils.s4
val max_s4 : Utils.s4
external s4 : int32 -> Utils.s4 = "%identity"
type s8 = private int64
external s8 : int64 -> Utils.s8 = "%identity"
val u1_succ : Utils.u1 -> Utils.u1
val u2_succ : Utils.u2 -> Utils.u2
val s1_neg : Utils.s1 -> Utils.s1
val s2_neg : Utils.s2 -> Utils.s2
val s4_pred : Utils.s4 -> Utils.s4
val split_s8 : Utils.s8 -> Utils.s4 * Utils.s4
val gather_s8 : Utils.s4 -> Utils.s4 -> Utils.s8
external u2_of_u1 : Utils.u1 -> Utils.u2 = "%identity"
external s4_of_s2 : Utils.s2 -> Utils.s4 = "%int32_of_int"
module UChar :
sig
type t = UCharImpl.t
type error =
Unrepresentable_character of t
| Invalid_character_code of int
exception Exception of error
val string_of_error : error -> string
val of_char : char -> t
val to_char : t -> char
val to_char_noerr : t -> char
val of_code : int -> t
val to_code : t -> int
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val is_letter : t -> bool
val is_digit : t -> bool
val is_letter_or_digit : t -> bool
val is_space : t -> bool
external to_camomile : t -> CamomileLibrary.UChar.t = "%identity"
external of_camomile : CamomileLibrary.UChar.t -> t = "%identity"
end
module UTF8 :
sig
type t = UTF8Impl.t
type modified
type bytes = string
type error =
Unable_to_convert_to_modified_utf8 of t
| Unable_to_convert_from_modified_utf8 of modified
| Unable_to_convert_to_utf8 of string
| Unable_to_convert_from_utf8 of t
| Invalid_index of int * int
| Index_out_of_bounds of int * int
| Invalid_escaped_string of t
exception Exception of error
val string_of_error : error -> string
val make : UCharImpl.t list -> t
val modified_of_bytes : bytes -> modified
val bytes_of_modified : modified -> bytes
val to_modified : t -> modified
val of_modified : modified -> t
val to_string : t -> string
val to_string_noerr : t -> string
val of_string : string -> t
val to_bytes : t -> bytes
val of_bytes : bytes -> t
val of_char : char -> t
val of_uchar : UCharImpl.t -> t
val length : t -> int
val get : t -> int -> UCharImpl.t
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
val index_from : t -> int -> UCharImpl.t -> int
val rindex_from : t -> int -> UCharImpl.t -> int
val substring : t -> int -> int -> t
val ( ++ ) : t -> t -> t
val concat : t list -> t
val concat_sep : t -> t list -> t
val concat_sep_map : t -> ('a -> t) -> 'a list -> t
val replace : UCharImpl.t -> UCharImpl.t -> t -> t
val contains : UCharImpl.t -> t -> bool
val split : UCharImpl.t -> t -> t list
val trim : t -> t
val escape : t -> t
val unescape : t -> t
val escape_char : UCharImpl.t -> t
external to_camomile : t -> CamomileLibrary.UTF8.t = "%identity"
external of_camomile : CamomileLibrary.UTF8.t -> t = "%identity"
end
val ( ++ ) : Utils.UTF8.t -> Utils.UTF8.t -> Utils.UTF8.t
module UTF8Hashtbl :
sig
type key = UTF8.t
type 'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
val copy : 'a t -> 'a t
val add : 'a t -> key -> 'a -> unit
val remove : 'a t -> key -> unit
val find : 'a t -> key -> 'a
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val length : 'a t -> int
val stats : 'a t -> Hashtbl.statistics
end
module UTF8Map :
sig
type key = UTF8.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
module UTF8Set :
sig
type elt = UTF8.t
type t
val empty : t
val is_empty : t -> bool
val mem : elt -> t -> bool
val add : elt -> t -> t
val singleton : elt -> t
val remove : elt -> t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val compare : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val iter : (elt -> unit) -> t -> unit
val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
val for_all : (elt -> bool) -> t -> bool
val exists : (elt -> bool) -> t -> bool
val filter : (elt -> bool) -> t -> t
val partition : (elt -> bool) -> t -> t * t
val cardinal : t -> int
val elements : t -> elt list
val min_elt : t -> elt
val max_elt : t -> elt
val choose : t -> elt
val split : elt -> t -> t * bool * t
end
module UTF8Buffer :
sig
type t = UTF8BufferImpl.t
val default_size : int
val make : unit -> t
val make_of_size : int -> t
val add_char : t -> UCharImpl.t -> unit
val add_string : t -> UTF8Impl.t -> unit
val add_endline : t -> UTF8Impl.t -> unit
val contents : t -> UTF8Impl.t
end
type lexer_state_error =
UTF8LexerStateImpl.error =
End_of_lexer
| Invalid_consume of char * char
val string_of_lexer_state_error : Utils.lexer_state_error -> string
exception Lexer_state_exception of Utils.lexer_state_error
class lexer_state : Utils.UTF8.t -> UTF8LexerStateImpl.t
val lexer_switch :
(UCharImpl.t * (UCharImpl.t -> 'a)) list ->
(UCharImpl.t -> 'a) -> UTF8LexerStateImpl.t -> 'a
val fix_point : ('a -> 'a -> bool) -> ('a -> 'a) -> 'a -> 'a
val compose_list : ('a -> 'a) list -> 'a -> 'a
val try_finally : 'a -> ('a -> 'b) -> ('a -> unit) -> 'b
val map_partial : ('a -> 'b option) -> 'a list -> 'b list
val map_list_to_array : ('a -> 'b) -> 'a list -> 'b array
val map_array_to_list : ('a -> 'b) -> 'a array -> 'b list
val identity : 'a -> 'a
val switch :
('a -> 'a -> bool) -> ('a * ('a -> 'b)) list -> ('a -> 'b) -> 'a -> 'b
val list_equal : ?eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool
val list_compare : ?cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int
val list_hash : ?h:('a -> int) -> 'a list -> int
val array_equal : ?eq:('a -> 'a -> bool) -> 'a array -> 'a array -> bool
val array_compare : ?cmp:('a -> 'a -> int) -> 'a array -> 'a array -> int
val array_hash : ?h:('a -> int) -> 'a array -> int
val string_replace : char -> char -> string -> string
val string_split : string -> string -> string list
val string_of_list : ('a -> string) -> 'a list -> string
val string_of_array : ('a -> string) -> 'a array -> string
val universal_hash : 'a -> int
end