`sig
type t = Sexplib.Sexp.t = Atom of string | List of Core_sexp.t list
module O :
sig
type sexp = Sexplib.Sexp.t = Atom of string | List of Core_sexp.t list
end
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
module Replace_polymorphic_compare :
sig
val ( >= ) : t -> t -> bool
val ( <= ) : t -> t -> bool
val ( = ) : t -> t -> bool
val ( > ) : t -> t -> bool
val ( < ) : t -> t -> bool
val ( <> ) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val _squelch_unused_module_warning_ : unit
end
type comparator_witness
val comparator : (t, comparator_witness) Comparator.comparator
val validate_lbound : min:t Comparable_intf.bound -> t Validate.check
val validate_ubound : max:t Comparable_intf.bound -> t Validate.check
val validate_bound :
min:t Comparable_intf.bound ->
max:t Comparable_intf.bound -> t Validate.check
module Map :
sig
module Key :
sig
type t = t
type comparator_witness = comparator_witness
val comparator : (t, comparator_witness) Comparator.comparator
end
module Tree :
sig
type 'a t = (Key.t, 'a, Key.comparator_witness) Core_map.Tree.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list -> [ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error : (Key.t * 'a) list -> 'a t Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce :
(Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array : (Key.t * 'a) array -> 'a t Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi :
'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) ->
'a Validate.check -> 'a t Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val split : 'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t ->
init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t -> 'a t -> (Key.t * 'a) Sequence.t
val t_of_sexp : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
end
type 'a t = (Key.t, 'a, Key.comparator_witness) Core_map.t
val empty : 'a t
val singleton : Key.t -> 'a -> 'a t
val of_alist :
(Key.t * 'a) list -> [ `Duplicate_key of Key.t | `Ok of 'a t ]
val of_alist_or_error : (Key.t * 'a) list -> 'a t Or_error.t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi : (Key.t * 'a) list -> 'a list t
val of_alist_fold :
(Key.t * 'a) list -> init:'b -> f:('b -> 'a -> 'b) -> 'b t
val of_alist_reduce : (Key.t * 'a) list -> f:('a -> 'a -> 'a) -> 'a t
val of_sorted_array : (Key.t * 'a) array -> 'a t Or_error.t
val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
val of_tree : 'a Tree.t -> 'a t
val invariants : 'a t -> bool
val is_empty : 'a t -> bool
val length : 'a t -> int
val add : 'a t -> key:Key.t -> data:'a -> 'a t
val add_multi : 'a list t -> key:Key.t -> data:'a -> 'a list t
val change : 'a t -> Key.t -> ('a option -> 'a option) -> 'a t
val find : 'a t -> Key.t -> 'a option
val find_exn : 'a t -> Key.t -> 'a
val remove : 'a t -> Key.t -> 'a t
val mem : 'a t -> Key.t -> bool
val iter : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val iter2 :
'a t ->
'b t ->
f:(key:Key.t ->
data:[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> unit) ->
unit
val map : 'a t -> f:('a -> 'b) -> 'b t
val mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b) -> 'b t
val fold :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val fold_right :
'a t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val filter : 'a t -> f:(key:Key.t -> data:'a -> bool) -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi : 'a t -> f:(key:Key.t -> data:'a -> 'b option) -> 'b t
val compare_direct : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val keys : 'a t -> Key.t list
val data : 'a t -> 'a list
val to_alist : 'a t -> (Key.t * 'a) list
val validate :
name:(Key.t -> string) -> 'a Validate.check -> 'a t Validate.check
val merge :
'a t ->
'b t ->
f:(key:Key.t ->
[ `Both of 'a * 'b | `Left of 'a | `Right of 'b ] -> 'c option) ->
'c t
val symmetric_diff :
'a t ->
'a t ->
data_equal:('a -> 'a -> bool) ->
(Key.t * [ `Left of 'a | `Right of 'a | `Unequal of 'a * 'a ])
Sequence.t
val min_elt : 'a t -> (Key.t * 'a) option
val min_elt_exn : 'a t -> Key.t * 'a
val max_elt : 'a t -> (Key.t * 'a) option
val max_elt_exn : 'a t -> Key.t * 'a
val for_all : 'a t -> f:('a -> bool) -> bool
val exists : 'a t -> f:('a -> bool) -> bool
val split : 'a t -> Key.t -> 'a t * (Key.t * 'a) option * 'a t
val fold_range_inclusive :
'a t ->
min:Key.t ->
max:Key.t -> init:'b -> f:(key:Key.t -> data:'a -> 'b -> 'b) -> 'b
val range_to_alist :
'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
val closest_key :
'a t ->
[ `Greater_or_equal_to
| `Greater_than
| `Less_or_equal_to
| `Less_than ] -> Key.t -> (Key.t * 'a) option
val nth : 'a t -> int -> (Key.t * 'a) option
val rank : 'a t -> Key.t -> int option
val to_tree : 'a t -> 'a Tree.t
val to_sequence :
?order:[ `Decreasing_key | `Increasing_key ] ->
?keys_greater_or_equal_to:Key.t ->
?keys_less_or_equal_to:Key.t -> 'a t -> (Key.t * 'a) Sequence.t
val t_of_sexp : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
end
module Set :
sig
module Elt :
sig
type t = t
type comparator_witness = comparator_witness
val comparator : (t, comparator_witness) Comparator.comparator
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
end
module Tree :
sig
type t = (Elt.t, Elt.comparator_witness) Core_set.Tree.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold :
t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff : t -> t -> (Elt.t, Elt.t) Either.t Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b ->
f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t -> t -> Elt.t Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness) Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map : ('a, 'b) Core_set.Tree.t -> f:('a -> Elt.t) -> t
val filter_map :
('a, 'b) Core_set.Tree.t -> f:('a -> Elt.t option) -> t
val of_tree : t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness) Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type t = (Elt.t, Elt.comparator_witness) Core_set.t
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Elt.t -> unit) -> unit
val fold : t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
val exists : t -> f:(Elt.t -> bool) -> bool
val for_all : t -> f:(Elt.t -> bool) -> bool
val count : t -> f:(Elt.t -> bool) -> int
val sum :
(module Commutative_group.S with type t = 'sum) ->
t -> f:(Elt.t -> 'sum) -> 'sum
val find : t -> f:(Elt.t -> bool) -> Elt.t option
val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
val to_list : t -> Elt.t list
val to_array : t -> Elt.t array
val invariants : t -> bool
val mem : t -> Elt.t -> bool
val add : t -> Elt.t -> t
val remove : t -> Elt.t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val symmetric_diff : t -> t -> (Elt.t, Elt.t) Either.t Sequence.t
val compare_direct : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val fold_until :
t ->
init:'b -> f:('b -> Elt.t -> [ `Continue of 'b | `Stop of 'b ]) -> 'b
val fold_right : t -> init:'b -> f:(Elt.t -> 'b -> 'b) -> 'b
val iter2 :
t ->
t ->
f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
unit) ->
unit
val filter : t -> f:(Elt.t -> bool) -> t
val partition_tf : t -> f:(Elt.t -> bool) -> t * t
val elements : t -> Elt.t list
val min_elt : t -> Elt.t option
val min_elt_exn : t -> Elt.t
val max_elt : t -> Elt.t option
val max_elt_exn : t -> Elt.t
val choose : t -> Elt.t option
val choose_exn : t -> Elt.t
val split : t -> Elt.t -> t * Elt.t option * t
val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
val find_index : t -> int -> Elt.t option
val remove_index : t -> int -> t
val to_tree : t -> Tree.t
val to_sequence :
?order:[ `Decreasing | `Increasing ] ->
?greater_or_equal_to:Elt.t ->
?less_or_equal_to:Elt.t -> t -> Elt.t Sequence.t
val to_map :
t ->
f:(Elt.t -> 'data) ->
(Elt.t, 'data, Elt.comparator_witness) Core_set_intf.Map.t
val empty : t
val singleton : Elt.t -> t
val union_list : t list -> t
val of_list : Elt.t list -> t
val of_array : Elt.t array -> t
val of_sorted_array : Elt.t array -> t Or_error.t
val of_sorted_array_unchecked : Elt.t array -> t
val stable_dedup_list : Elt.t list -> Elt.t list
val map : ('a, 'b) Core_set.t -> f:('a -> Elt.t) -> t
val filter_map : ('a, 'b) Core_set.t -> f:('a -> Elt.t option) -> t
val of_tree : Tree.t -> t
val of_map_keys :
(Elt.t, 'a, Elt.comparator_witness) Core_set_intf.Map.t -> t
val t_of_sexp : Sexplib.Sexp.t -> t
val sexp_of_t : t -> Sexplib.Sexp.t
val compare : t -> t -> int
end
type bigstring =
(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
val default_indent : int ref
val size : t -> int * int
val scan_sexp : ?buf:Buffer.t -> Lexing.lexbuf -> t
val scan_sexps : ?buf:Buffer.t -> Lexing.lexbuf -> t list
val scan_rev_sexps : ?buf:Buffer.t -> Lexing.lexbuf -> t list
val scan_sexp_opt : ?buf:Buffer.t -> Lexing.lexbuf -> t option
val scan_iter_sexps :
?buf:Buffer.t -> f:(t -> unit) -> Lexing.lexbuf -> unit
val scan_fold_sexps :
?buf:Buffer.t -> f:('a -> t -> 'a) -> init:'a -> Lexing.lexbuf -> 'a
val scan_sexps_conv :
?buf:Buffer.t -> f:(t -> 'a) -> Lexing.lexbuf -> 'a list
module Parse_pos :
sig
type t =
Sexplib.Pre_sexp.Parse_pos.t = private {
mutable text_line : int;
mutable text_char : int;
mutable global_offset : int;
mutable buf_pos : int;
}
val create :
?text_line:int ->
?text_char:int -> ?buf_pos:int -> ?global_offset:int -> unit -> t
val with_buf_pos : t -> int -> t
end
module Cont_state :
sig
type t =
Sexplib.Pre_sexp.Cont_state.t =
Parsing_whitespace
| Parsing_atom
| Parsing_list
| Parsing_sexp_comment
| Parsing_block_comment
val to_string : t -> string
end
type ('a, 't) parse_result =
('a, 't) Sexplib.Pre_sexp.parse_result =
Done of 't * Parse_pos.t
| Cont of Cont_state.t * ('a, 't) parse_fun
and ('a, 't) parse_fun = pos:int -> len:int -> 'a -> ('a, 't) parse_result
module Annotated :
sig
type pos =
Sexplib.Pre_sexp.Annotated.pos = {
line : int;
col : int;
offset : int;
}
type range =
Sexplib.Pre_sexp.Annotated.range = {
start_pos : pos;
end_pos : pos;
}
type t =
Sexplib.Pre_sexp.Annotated.t =
Atom of range * Sexplib.Type.t
| List of range * t list * Sexplib.Type.t
type 'a conv = [ `Error of exn * t | `Result of 'a ]
exception Conv_exn of string * exn
type stack =
Sexplib.Pre_sexp.Annotated.stack = {
mutable positions : pos list;
mutable stack : t list list;
}
val get_sexp : t -> Sexplib.Type.t
val get_range : t -> range
val find_sexp : t -> Sexplib.Type.t -> t option
val parse :
?parse_pos:Parse_pos.t ->
?len:int -> string -> (string, t) parse_result
val parse_bigstring :
?parse_pos:Parse_pos.t ->
?len:int -> bigstring -> (bigstring, t) parse_result
val input_sexp : ?parse_pos:Parse_pos.t -> in_channel -> t
val input_sexps :
?parse_pos:Parse_pos.t -> ?buf:string -> in_channel -> t list
val input_rev_sexps :
?parse_pos:Parse_pos.t -> ?buf:string -> in_channel -> t list
val load_sexp : ?strict:bool -> ?buf:string -> string -> t
val load_sexps : ?buf:string -> string -> t list
val load_rev_sexps : ?buf:string -> string -> t list
val of_string : string -> t
val of_bigstring : bigstring -> t
val conv : (Sexplib.Type.t -> 'a) -> t -> 'a conv
val get_conv_exn : file:string -> exc:exn -> t -> exn
end
type 't parse_state =
't Sexplib.Pre_sexp.parse_state = private {
parse_pos : Parse_pos.t;
mutable pstack : 't;
pbuf : Buffer.t;
}
type parse_error =
Sexplib.Pre_sexp.parse_error = {
location : string;
err_msg : string;
parse_state :
[ `Annot of Annotated.stack parse_state
| `Sexp of t list list parse_state ];
}
exception Parse_error of parse_error
val parse :
?parse_pos:Parse_pos.t -> ?len:int -> string -> (string, t) parse_result
val parse_bigstring :
?parse_pos:Parse_pos.t ->
?len:int -> bigstring -> (bigstring, t) parse_result
val input_sexp : ?parse_pos:Parse_pos.t -> in_channel -> t
val input_sexps :
?parse_pos:Parse_pos.t -> ?buf:string -> in_channel -> t list
val input_rev_sexps :
?parse_pos:Parse_pos.t -> ?buf:string -> in_channel -> t list
val load_sexp : ?strict:bool -> ?buf:string -> string -> t
val load_sexps : ?buf:string -> string -> t list
val load_rev_sexps : ?buf:string -> string -> t list
val load_sexp_conv :
?strict:bool -> ?buf:string -> string -> (t -> 'a) -> 'a Annotated.conv
val load_sexp_conv_exn :
?strict:bool -> ?buf:string -> string -> (t -> 'a) -> 'a
val load_sexps_conv :
?buf:string -> string -> (t -> 'a) -> 'a Annotated.conv list
val load_sexps_conv_exn : ?buf:string -> string -> (t -> 'a) -> 'a list
val output_hum : out_channel -> t -> unit
val output_hum_indent : int -> out_channel -> t -> unit
val output_mach : out_channel -> t -> unit
val output : out_channel -> t -> unit
val save_hum : ?perm:int -> string -> t -> unit
val save_mach : ?perm:int -> string -> t -> unit
val save : ?perm:int -> string -> t -> unit
val save_sexps_hum : ?perm:int -> string -> t list -> unit
val save_sexps_mach : ?perm:int -> string -> t list -> unit
val save_sexps : ?perm:int -> string -> t list -> unit
val pp_hum : Format.formatter -> t -> unit
val pp_hum_indent : int -> Format.formatter -> t -> unit
val pp_mach : Format.formatter -> t -> unit
val pp : Format.formatter -> t -> unit
module Of_string_conv_exn :
sig
type t = {
exc : exn;
sexp : Sexplib.Type.t;
sub_sexp : Sexplib.Type.t;
}
exception E of t
end
val of_string : string -> t
val of_string_conv : string -> (t -> 'a) -> 'a Annotated.conv
val of_string_conv_exn : string -> (t -> 'a) -> 'a
val of_bigstring : bigstring -> t
val of_bigstring_conv : bigstring -> (t -> 'a) -> 'a Annotated.conv
val of_bigstring_conv_exn : bigstring -> (t -> 'a) -> 'a
val to_string_hum : ?indent:int -> t -> string
val to_string_mach : t -> string
val to_string : t -> string
val to_buffer_hum : buf:Buffer.t -> ?indent:int -> t -> unit
val to_buffer_mach : buf:Buffer.t -> t -> unit
val to_buffer : buf:Buffer.t -> t -> unit
val to_buffer_gen :
buf:'buffer ->
add_char:('buffer -> char -> unit) ->
add_string:('buffer -> string -> unit) -> t -> unit
val unit : t
type found = [ `Found | `Pos of int * found ]
type search_result = [ `Found | `Not_found | `Pos of int * found ]
val search_physical : t -> contained:t -> search_result
val subst_found : t -> subst:t -> found -> t
module With_layout :
sig
type pos = Sexplib.Src_pos.Relative.t = { row : int; col : int; }
val sexp_of_pos : pos -> Sexplib.Type.t
type t =
Atom of pos * string * string option
| List of pos * t_or_comment list * pos
and t_or_comment = Sexp of t | Comment of comment
and comment =
Plain_comment of pos * string
| Sexp_comment of pos * comment list * t
val sexp_of_t : t -> Sexplib.Type.t
val sexp_of_comment : comment -> Sexplib.Type.t
val sexp_of_t_or_comment : t_or_comment -> Sexplib.Type.t
module Forget :
sig
val t : t -> Sexplib.Type.t
val t_or_comment : t_or_comment -> Sexplib.Type.t option
val t_or_comments : t_or_comment list -> Sexplib.Type.t list
end
module Render :
sig
type 'a t
val return : 'a -> 'a t
val bind : 'a t -> ('a -> 'b t) -> 'b t
val sexp : t_or_comment -> unit t
val run : (char -> unit) -> unit t -> unit
end
module Parser :
sig
type token
val sexp :
(Lexing.lexbuf -> token) -> Lexing.lexbuf -> t_or_comment
val sexp_opt :
(Lexing.lexbuf -> token) -> Lexing.lexbuf -> t_or_comment option
val sexps :
(Lexing.lexbuf -> token) -> Lexing.lexbuf -> t_or_comment list
val rev_sexps :
(Lexing.lexbuf -> token) -> Lexing.lexbuf -> t_or_comment list
val sexps_abs :
(Lexing.lexbuf -> token) ->
Lexing.lexbuf ->
Sexplib.Type_with_layout.Parsed.t_or_comment list
end
module Lexer :
sig val main : ?buf:Buffer.t -> Lexing.lexbuf -> Parser.token end
end
exception Of_sexp_error of exn * Core_sexp.t
val of_int_style : [ `No_underscores | `Underscores ] Pervasives.ref
type 'a no_raise = 'a
module Sexp_option :
sig
type 'a t = 'a option
val compare :
('a -> 'a -> int) ->
'a Core_sexp.Sexp_option.t -> 'a Core_sexp.Sexp_option.t -> int
val bin_t :
'a Bin_prot.Type_class.t ->
'a Core_sexp.Sexp_option.t Bin_prot.Type_class.t
val bin_read_t :
'a Bin_prot.Read.reader ->
'a Core_sexp.Sexp_option.t Bin_prot.Read.reader
val __bin_read_t__ :
'a Bin_prot.Read.reader ->
(int -> 'a Core_sexp.Sexp_option.t) Bin_prot.Read.reader
val bin_reader_t :
'a Bin_prot.Type_class.reader ->
'a Core_sexp.Sexp_option.t Bin_prot.Type_class.reader
val bin_size_t :
'a Bin_prot.Size.sizer ->
'a Core_sexp.Sexp_option.t Bin_prot.Size.sizer
val bin_write_t :
'a Bin_prot.Write.writer ->
'a Core_sexp.Sexp_option.t Bin_prot.Write.writer
val bin_writer_t :
'a Bin_prot.Type_class.writer ->
'a Core_sexp.Sexp_option.t Bin_prot.Type_class.writer
end
module Sexp_list :
sig
type 'a t = 'a list
val compare :
('a -> 'a -> int) ->
'a Core_sexp.Sexp_list.t -> 'a Core_sexp.Sexp_list.t -> int
val bin_t :
'a Bin_prot.Type_class.t ->
'a Core_sexp.Sexp_list.t Bin_prot.Type_class.t
val bin_read_t :
'a Bin_prot.Read.reader ->
'a Core_sexp.Sexp_list.t Bin_prot.Read.reader
val __bin_read_t__ :
'a Bin_prot.Read.reader ->
(int -> 'a Core_sexp.Sexp_list.t) Bin_prot.Read.reader
val bin_reader_t :
'a Bin_prot.Type_class.reader ->
'a Core_sexp.Sexp_list.t Bin_prot.Type_class.reader
val bin_size_t :
'a Bin_prot.Size.sizer ->
'a Core_sexp.Sexp_list.t Bin_prot.Size.sizer
val bin_write_t :
'a Bin_prot.Write.writer ->
'a Core_sexp.Sexp_list.t Bin_prot.Write.writer
val bin_writer_t :
'a Bin_prot.Type_class.writer ->
'a Core_sexp.Sexp_list.t Bin_prot.Type_class.writer
end
module Sexp_array :
sig
type 'a t = 'a array
val compare :
('a -> 'a -> int) ->
'a Core_sexp.Sexp_array.t -> 'a Core_sexp.Sexp_array.t -> int
val bin_t :
'a Bin_prot.Type_class.t ->
'a Core_sexp.Sexp_array.t Bin_prot.Type_class.t
val bin_read_t :
'a Bin_prot.Read.reader ->
'a Core_sexp.Sexp_array.t Bin_prot.Read.reader
val __bin_read_t__ :
'a Bin_prot.Read.reader ->
(int -> 'a Core_sexp.Sexp_array.t) Bin_prot.Read.reader
val bin_reader_t :
'a Bin_prot.Type_class.reader ->
'a Core_sexp.Sexp_array.t Bin_prot.Type_class.reader
val bin_size_t :
'a Bin_prot.Size.sizer ->
'a Core_sexp.Sexp_array.t Bin_prot.Size.sizer
val bin_write_t :
'a Bin_prot.Write.writer ->
'a Core_sexp.Sexp_array.t Bin_prot.Write.writer
val bin_writer_t :
'a Bin_prot.Type_class.writer ->
'a Core_sexp.Sexp_array.t Bin_prot.Type_class.writer
end
module Sexp_opaque :
sig
type 'a t = 'a
val compare :
('a -> 'a -> int) ->
'a Core_sexp.Sexp_opaque.t -> 'a Core_sexp.Sexp_opaque.t -> int
val bin_t :
'a Bin_prot.Type_class.t ->
'a Core_sexp.Sexp_opaque.t Bin_prot.Type_class.t
val bin_read_t :
'a Bin_prot.Read.reader ->
'a Core_sexp.Sexp_opaque.t Bin_prot.Read.reader
val __bin_read_t__ :
'a Bin_prot.Read.reader ->
(int -> 'a Core_sexp.Sexp_opaque.t) Bin_prot.Read.reader
val bin_reader_t :
'a Bin_prot.Type_class.reader ->
'a Core_sexp.Sexp_opaque.t Bin_prot.Type_class.reader
val bin_size_t :
'a Bin_prot.Size.sizer ->
'a Core_sexp.Sexp_opaque.t Bin_prot.Size.sizer
val bin_write_t :
'a Bin_prot.Write.writer ->
'a Core_sexp.Sexp_opaque.t Bin_prot.Write.writer
val bin_writer_t :
'a Bin_prot.Type_class.writer ->
'a Core_sexp.Sexp_opaque.t Bin_prot.Type_class.writer
end
module Sexp_maybe :
sig
type 'a t = ('a, Sexplib.Sexp.t * Error.t) Result.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a Core_sexp.Sexp_maybe.t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a Core_sexp.Sexp_maybe.t -> Sexplib.Sexp.t
val compare :
('a -> 'a -> int) ->
'a Core_sexp.Sexp_maybe.t -> 'a Core_sexp.Sexp_maybe.t -> int
val bin_t :
'a Bin_prot.Type_class.t ->
'a Core_sexp.Sexp_maybe.t Bin_prot.Type_class.t
val bin_read_t :
'a Bin_prot.Read.reader ->
'a Core_sexp.Sexp_maybe.t Bin_prot.Read.reader
val __bin_read_t__ :
'a Bin_prot.Read.reader ->
(int -> 'a Core_sexp.Sexp_maybe.t) Bin_prot.Read.reader
val bin_reader_t :
'a Bin_prot.Type_class.reader ->
'a Core_sexp.Sexp_maybe.t Bin_prot.Type_class.reader
val bin_size_t :
'a Bin_prot.Size.sizer ->
'a Core_sexp.Sexp_maybe.t Bin_prot.Size.sizer
val bin_write_t :
'a Bin_prot.Write.writer ->
'a Core_sexp.Sexp_maybe.t Bin_prot.Write.writer
val bin_writer_t :
'a Bin_prot.Type_class.writer ->
'a Core_sexp.Sexp_maybe.t Bin_prot.Type_class.writer
end
module With_text :
sig
type 'a t
val of_value : ('a -> Sexplib.Sexp.t) -> 'a -> 'a Core_sexp.With_text.t
val of_text :
(Sexplib.Sexp.t -> 'a) ->
?filename:string -> string -> 'a Core_sexp.With_text.t Or_error.t
val value : 'a Core_sexp.With_text.t -> 'a
val text : 'a Core_sexp.With_text.t -> string
val bin_t :
'a Bin_prot.Type_class.t ->
'a Core_sexp.With_text.t Bin_prot.Type_class.t
val bin_read_t :
'a Bin_prot.Read.reader ->
'a Core_sexp.With_text.t Bin_prot.Read.reader
val __bin_read_t__ :
'a Bin_prot.Read.reader ->
(int -> 'a Core_sexp.With_text.t) Bin_prot.Read.reader
val bin_reader_t :
'a Bin_prot.Type_class.reader ->
'a Core_sexp.With_text.t Bin_prot.Type_class.reader
val bin_size_t :
'a Bin_prot.Size.sizer ->
'a Core_sexp.With_text.t Bin_prot.Size.sizer
val bin_write_t :
'a Bin_prot.Write.writer ->
'a Core_sexp.With_text.t Bin_prot.Write.writer
val bin_writer_t :
'a Bin_prot.Type_class.writer ->
'a Core_sexp.With_text.t Bin_prot.Type_class.writer
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a Core_sexp.With_text.t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a Core_sexp.With_text.t -> Sexplib.Sexp.t
end
val of_sexp_allow_extra_fields :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a
val t_of_sexp : Sexplib.Sexp.t -> Core_sexp.t
val sexp_of_t : Core_sexp.t -> Sexplib.Sexp.t
val bin_t : Core_sexp.t Bin_prot.Type_class.t
val bin_read_t : Core_sexp.t Bin_prot.Read.reader
val __bin_read_t__ : (int -> Core_sexp.t) Bin_prot.Read.reader
val bin_reader_t : Core_sexp.t Bin_prot.Type_class.reader
val bin_size_t : Core_sexp.t Bin_prot.Size.sizer
val bin_write_t : Core_sexp.t Bin_prot.Write.writer
val bin_writer_t : Core_sexp.t Bin_prot.Type_class.writer
val no_raise_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a Core_sexp.no_raise
val sexp_of_no_raise :
('a -> Sexplib.Sexp.t) -> 'a Core_sexp.no_raise -> Sexplib.Sexp.t
val bin_no_raise :
'a Bin_prot.Type_class.t -> 'a Core_sexp.no_raise Bin_prot.Type_class.t
val bin_read_no_raise :
'a Bin_prot.Read.reader -> 'a Core_sexp.no_raise Bin_prot.Read.reader
val __bin_read_no_raise__ :
'a Bin_prot.Read.reader ->
(int -> 'a Core_sexp.no_raise) Bin_prot.Read.reader
val bin_reader_no_raise :
'a Bin_prot.Type_class.reader ->
'a Core_sexp.no_raise Bin_prot.Type_class.reader
val bin_size_no_raise :
'a Bin_prot.Size.sizer -> 'a Core_sexp.no_raise Bin_prot.Size.sizer
val bin_write_no_raise :
'a Bin_prot.Write.writer -> 'a Core_sexp.no_raise Bin_prot.Write.writer
val bin_writer_no_raise :
'a Bin_prot.Type_class.writer ->
'a Core_sexp.no_raise Bin_prot.Type_class.writer
end`