sig
  val bin_size_t : Sexplib.Sexp.t Bin_prot.Size.sizer
  val bin_write_t : Sexplib.Sexp.t Bin_prot.Map_to_safe.writer
  val bin_write_t_ : Sexplib.Sexp.t Bin_prot.Unsafe_write_c.writer
  val bin_read_t : Sexplib.Sexp.t Bin_prot.Read_ml.reader
  val bin_read_t_ : Sexplib.Sexp.t Bin_prot.Unsafe_read_c.reader
  val bin_read_t__ : (int -> Sexplib.Sexp.t) Bin_prot.Unsafe_read_c.reader
  val bin_writer_t : Sexplib.Sexp.t Bin_prot.Type_class.writer
  val bin_reader_t : Sexplib.Sexp.t Bin_prot.Type_class.reader
  val bin_t : Sexplib.Sexp.t Bin_prot.Type_class.t
  type t = Sexplib.Type.t = Atom of string | List of t list
  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_iter_sexps :
    ?buf:Buffer.t -> f:(t -> unit) -> Lexing.lexbuf -> unit
  val scan_fold_sexps :
    ?buf:Buffer.t -> f:('-> t -> 'a) -> init:'-> 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, '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 =
    '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) -> 'Annotated.conv
  val load_sexp_conv_exn :
    ?strict:bool -> ?buf:string -> string -> (t -> 'a) -> 'a
  val load_sexps_conv :
    ?buf:string -> string -> (t -> '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 =
        Core.Core_sexp.Of_string_conv_exn.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) -> 'Annotated.conv
  val of_string_conv_exn : string -> (t -> 'a) -> 'a
  val of_bigstring : bigstring -> t
  val of_bigstring_conv : bigstring -> (t -> '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
  external sexp_of_t : t -> t = "%identity"
  external t_of_sexp : t -> t = "%identity"
  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
  val of_int_style : [ `No_underscores | `Underscores ] ref
  type 'a no_raise = 'a
  val sexp_of_no_raise :
    ('-> Sexplib.Sexp.t) -> 'a no_raise -> Sexplib.Sexp.t
  val no_raise_of_sexp :
    (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a no_raise
  val bin_size_no_raise :
    'Bin_prot.Size.sizer -> 'a no_raise Bin_prot.Size.sizer
  val bin_write_no_raise :
    'Bin_prot.Unsafe_write_c.writer -> 'a no_raise Bin_prot.Write_ml.writer
  val bin_write_no_raise_ :
    'Bin_prot.Unsafe_write_c.writer ->
    'a no_raise Bin_prot.Unsafe_write_c.writer
  val bin_writer_no_raise :
    'Bin_prot.Type_class.writer -> 'a no_raise Bin_prot.Type_class.writer
  val bin_read_no_raise :
    'Bin_prot.Unsafe_read_c.reader -> 'a no_raise Bin_prot.Read_ml.reader
  val bin_read_no_raise_ :
    'Bin_prot.Unsafe_read_c.reader ->
    'a no_raise Bin_prot.Unsafe_read_c.reader
  val bin_read_no_raise__ :
    'Bin_prot.Unsafe_read_c.reader ->
    (int -> 'a no_raise) Bin_prot.Unsafe_read_c.reader
  val bin_reader_no_raise :
    'Bin_prot.Type_class.reader -> 'a no_raise Bin_prot.Type_class.reader
  val bin_no_raise :
    'Bin_prot.Type_class.t -> 'a no_raise Bin_prot.Type_class.t
  module Sexp_option :
    sig
      val bin_size_sexp_option : ('a, 'a option) Bin_prot.Size.sizer1
      val bin_write_sexp_option :
        ('a, 'a option) Bin_prot.Map_to_safe.writer1
      val bin_write_sexp_option_ :
        ('a, 'a option) Bin_prot.Unsafe_write_c.writer1
      val bin_read_sexp_option : ('a, 'a option) Bin_prot.Map_to_safe.reader1
      val bin_read_sexp_option_ :
        ('a, 'a option) Bin_prot.Unsafe_read_c.reader1
      val bin_read_sexp_option__ :
        ('a, int -> 'a option) Bin_prot.Unsafe_read_c.reader1
      val bin_writer_sexp_option :
        ('a, 'a option) Bin_prot.Type_class.S1.writer
      val bin_reader_sexp_option :
        ('a, 'a option) Bin_prot.Type_class.S1.reader
      val bin_sexp_option : ('a, 'a option) Bin_prot.Type_class.S1.t
    end
  module Sexp_list :
    sig
      val bin_size_sexp_list : ('a, 'a list) Bin_prot.Size.sizer1
      val bin_write_sexp_list : ('a, 'a list) Bin_prot.Map_to_safe.writer1
      val bin_write_sexp_list_ :
        ('a, 'a list) Bin_prot.Unsafe_write_c.writer1
      val bin_read_sexp_list : ('a, 'a list) Bin_prot.Map_to_safe.reader1
      val bin_read_sexp_list_ : ('a, 'a list) Bin_prot.Unsafe_read_c.reader1
      val bin_read_sexp_list__ :
        ('a, int -> 'a list) Bin_prot.Unsafe_read_c.reader1
      val bin_writer_sexp_list : ('a, 'a list) Bin_prot.Type_class.S1.writer
      val bin_reader_sexp_list : ('a, 'a list) Bin_prot.Type_class.S1.reader
      val bin_sexp_list : ('a, 'a list) Bin_prot.Type_class.S1.t
    end
  module Sexp_array :
    sig
      val bin_size_sexp_array : ('a, 'a array) Bin_prot.Size.sizer1
      val bin_write_sexp_array : ('a, 'a array) Bin_prot.Map_to_safe.writer1
      val bin_write_sexp_array_ :
        ('a, 'a array) Bin_prot.Unsafe_write_c.writer1
      val bin_read_sexp_array : ('a, 'a array) Bin_prot.Map_to_safe.reader1
      val bin_read_sexp_array_ :
        ('a, 'a array) Bin_prot.Unsafe_read_c.reader1
      val bin_read_sexp_array__ :
        ('a, int -> 'a array) Bin_prot.Unsafe_read_c.reader1
      val bin_writer_sexp_array :
        ('a, 'a array) Bin_prot.Type_class.S1.writer
      val bin_reader_sexp_array :
        ('a, 'a array) Bin_prot.Type_class.S1.reader
      val bin_sexp_array : ('a, 'a array) Bin_prot.Type_class.S1.t
    end
  module Sexp_opaque :
    sig
      val bin_size_sexp_opaque : ('a, 'a) Bin_prot.Size.sizer1
      val bin_write_sexp_opaque : ('a, 'a) Bin_prot.Map_to_safe.writer1
      val bin_write_sexp_opaque_ : ('a, 'a) Bin_prot.Unsafe_write_c.writer1
      val bin_read_sexp_opaque : ('a, 'a) Bin_prot.Map_to_safe.reader1
      val bin_read_sexp_opaque_ : ('a, 'a) Bin_prot.Unsafe_read_c.reader1
      val bin_read_sexp_opaque__ :
        ('a, int -> 'a) Bin_prot.Unsafe_read_c.reader1
      val bin_writer_sexp_opaque : ('a, 'a) Bin_prot.Type_class.S1.writer
      val bin_reader_sexp_opaque : ('a, 'a) Bin_prot.Type_class.S1.reader
      val bin_sexp_opaque : ('a, 'a) Bin_prot.Type_class.S1.t
    end
  module Sexp_maybe :
    sig
      type 'a t = ('a, Sexplib.Sexp.t) Core.Result.t
      val sexp_of_t : ('-> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
      val t_of_sexp : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
      val bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
      val bin_write_t : ('a, 'a t) Bin_prot.Map_to_safe.writer1
      val bin_write_t_ : ('a, 'a t) Bin_prot.Unsafe_write_c.writer1
      val bin_read_t : ('a, 'a t) Bin_prot.Map_to_safe.reader1
      val bin_read_t_ : ('a, 'a t) Bin_prot.Unsafe_read_c.reader1
      val bin_read_t__ : ('a, int -> 'a t) Bin_prot.Unsafe_read_c.reader1
      val bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
      val bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
      val bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
    end
  val ounit_tests : unit -> OUnit.test
  val is_atom : Core.Std.Sexp.t -> bool
  val is_list : Core.Std.Sexp.t -> bool
  val atom : string -> Core.Std.Sexp.t
  val list : Core.Std.Sexp.t list -> Core.Std.Sexp.t
  val to_string_hum' : Core.Std.Sexp.t -> string
  val format : Core.Std.Sexp.t -> Pp.t
  val pp_hum' : Format.formatter -> Core.Std.Sexp.t -> unit
  val comment : string -> string
  val print_diff :
    ?oc:out_channel -> Core.Std.Sexp.t -> Core.Std.Sexp.t -> unit
  val summarize :
    Core.Std.Sexp.t ->
    sub_sexp:Core.Std.Sexp.t ->
    size:[ `depth of int | `string of int ] -> Core.Std.Sexp.t
  val of_sexp_allow_extra_fields :
    (Core.Std.Sexp.t -> 'a) -> Core.Std.Sexp.t -> 'a
  val filter_record :
    (Core.Std.Sexp.t -> 'a) -> string list -> Core.Std.Sexp.t -> 'a
  module Records_table :
    sig
      type 'a t = 'a list
      val sexp_of_t : ('-> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
      val t_of_sexp : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
    end
  module Make_sexp_maybe2 :
    functor (Random_state : sig val state : Core.Std.Random.State.t end->
      sig
        type ('a, 'b) t = ('a * 'b) Core.Std.Sexp_maybe.t
        val sexp_of_t :
          ('-> Sexplib.Sexp.t) ->
          ('-> Sexplib.Sexp.t) -> ('a, 'b) t -> Sexplib.Sexp.t
        val t_of_sexp :
          (Sexplib.Sexp.t -> 'a) ->
          (Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> ('a, 'b) t
        val bin_size_t : ('a, 'b, ('a, 'b) t) Bin_prot.Size.sizer2
        val bin_write_t : ('a, 'b, ('a, 'b) t) Bin_prot.Map_to_safe.writer2
        val bin_write_t_ :
          ('a, 'b, ('a, 'b) t) Bin_prot.Unsafe_write_c.writer2
        val bin_read_t : ('a, 'b, ('a, 'b) t) Bin_prot.Map_to_safe.reader2
        val bin_read_t_ : ('a, 'b, ('a, 'b) t) Bin_prot.Unsafe_read_c.reader2
        val bin_read_t__ :
          ('a, 'b, int -> ('a, 'b) t) Bin_prot.Unsafe_read_c.reader2
        val bin_writer_t : ('a, 'b, ('a, 'b) t) Bin_prot.Type_class.S2.writer
        val bin_reader_t : ('a, 'b, ('a, 'b) t) Bin_prot.Type_class.S2.reader
        val bin_t : ('a, 'b, ('a, 'b) t) Bin_prot.Type_class.S2.t
        val final_pass :
          Core.Std.Sexp.t -> use_sexp_maybe:bool -> Core.Std.Sexp.t
      end
  module Make_explicit_sexp_option :
    functor
      (T : sig
             type t
             val sexp_of_t : t -> Sexplib.Sexp.t
             val t_of_sexp : Sexplib.Sexp.t -> t
             val explicit_sexp_option_fields : string list
           end->
      sig
        type t = T.t
        val sexp_of_t : t -> Sexplib.Sexp.t
        val t_of_sexp : Sexplib.Sexp.t -> t
      end
  val load_sexp_conv_exn_sample :
    ?strict:bool ->
    ?buf:string ->
    ?on_non_existence:[ `Exit | `Raise ] ->
    ?name:string ->
    string ->
    sexp_of_t:('-> Core.Std.Sexp.t) ->
    t_of_sexp:(Core.Std.Sexp.t -> 'a) -> sample:'-> 'a
  val ounit_tests : unit -> OUnit.test
end