sig
  module Exit :
    sig
      type error = [ `Exit_non_zero of int ]
      type t = (unit, error) Core_kernel.Std.Result.t
      val to_string_hum : t -> string
      val code : t -> int
      val of_code : int -> t
      val or_error : t -> unit Core_kernel.Std.Or_error.t
      val error_of_sexp : Sexplib.Sexp.t -> error
      val __error_of_sexp__ : Sexplib.Sexp.t -> error
      val sexp_of_error : error -> Sexplib.Sexp.t
      val t_of_sexp : Sexplib.Sexp.t -> t
      val sexp_of_t : t -> Sexplib.Sexp.t
    end
  module Exit_or_signal :
    sig
      type error = [ `Exit_non_zero of int | `Signal of Core.Signal.t ]
      type t = (unit, error) Core_kernel.Std.Result.t
      val of_unix : Unix.process_status -> t
      val to_string_hum : t -> string
      val or_error : t -> unit Core_kernel.Std.Or_error.t
      val error_of_sexp : Sexplib.Sexp.t -> error
      val __error_of_sexp__ : Sexplib.Sexp.t -> error
      val sexp_of_error : error -> Sexplib.Sexp.t
      val t_of_sexp : Sexplib.Sexp.t -> t
      val sexp_of_t : t -> Sexplib.Sexp.t
    end
  module Exit_or_signal_or_stop :
    sig
      type error =
          [ `Exit_non_zero of int
          | `Signal of Core.Signal.t
          | `Stop of Core.Signal.t ]
      type t = (unit, error) Core_kernel.Std.Result.t
      val of_unix : Unix.process_status -> t
      val to_string_hum : t -> string
      val or_error : t -> unit Core_kernel.Std.Or_error.t
      val error_of_sexp : Sexplib.Sexp.t -> error
      val __error_of_sexp__ : Sexplib.Sexp.t -> error
      val sexp_of_error : error -> Sexplib.Sexp.t
      val t_of_sexp : Sexplib.Sexp.t -> t
      val sexp_of_t : t -> Sexplib.Sexp.t
    end
  val system : string -> Exit_or_signal.t Import.Deferred.t
  val system_exn : string -> unit Import.Deferred.t
  val getpid : unit -> Core.Std.Pid.t
  val getppid : unit -> Core.Std.Pid.t option
  val getppid_exn : unit -> Core.Std.Pid.t
  val this_process_became_child_of_init :
    ?poll_delay:Core.Std.Time.Span.t -> unit -> unit Import.Deferred.t
  val nice : int -> int
  val cores : (unit -> int Import.Deferred.t) Core.Std.Or_error.t
  type open_flag =
      [ `Append
      | `Creat
      | `Dsync
      | `Excl
      | `Noctty
      | `Nonblock
      | `Rdonly
      | `Rdwr
      | `Rsync
      | `Sync
      | `Trunc
      | `Wronly ]
  type file_perm = int
  val openfile :
    ?perm:file_perm ->
    ?close_on_exec:bool ->
    string -> mode:open_flag list -> Fd.t Import.Deferred.t
  val with_file :
    ?exclusive:[ `Read | `Write ] ->
    ?perm:file_perm ->
    string ->
    mode:open_flag list ->
    f:(Fd.t -> 'Import.Deferred.t) -> 'Import.Deferred.t
  module Open_flags :
    sig
      type t = Core.Core_unix.Open_flags.t
      val of_int : int -> t
      val to_int_exn : t -> int
      val equal : t -> t -> bool
      val empty : t
      val ( + ) : t -> t -> t
      val ( - ) : t -> t -> t
      val intersect : t -> t -> t
      val complement : t -> t
      val is_empty : t -> bool
      val do_intersect : t -> t -> bool
      val are_disjoint : t -> t -> bool
      val rdonly : t
      val wronly : t
      val rdwr : t
      val creat : t
      val excl : t
      val noctty : t
      val trunc : t
      val append : t
      val nonblock : t
      val dsync : t
      val sync : t
      val rsync : t
      val can_read : t -> bool
      val can_write : t -> bool
      val sexp_of_t : t -> Sexplib.Sexp.t
    end
  val fcntl_getfl : Fd.t -> Open_flags.t Import.Deferred.t
  val fcntl_setfl : Fd.t -> Open_flags.t -> unit Import.Deferred.t
  val close :
    ?should_close_file_descriptor:bool -> Fd.t -> unit Import.Deferred.t
  val lseek :
    Fd.t -> int64 -> mode:[< `Cur | `End | `Set ] -> int64 Import.Deferred.t
  val truncate : string -> len:int64 -> unit Import.Deferred.t
  val ftruncate : Fd.t -> len:int64 -> unit Import.Deferred.t
  val fsync : Fd.t -> unit Import.Deferred.t
  val fdatasync : Fd.t -> unit Import.Deferred.t
  val sync : unit -> unit Import.Deferred.t
  val lockf :
    ?len:Core.Std.Int64.t ->
    Fd.t -> [ `Read | `Write ] -> unit Import.Deferred.t
  val try_lockf : ?len:Core.Std.Int64.t -> Fd.t -> [ `Read | `Write ] -> bool
  val test_lockf : ?len:Core.Std.Int64.t -> Fd.t -> bool
  val unlockf : ?len:Core.Std.Int64.t -> Fd.t -> unit
  module File_kind :
    sig
      type t =
          [ `Block | `Char | `Directory | `Fifo | `File | `Link | `Socket ]
    end
  module Stats :
    sig
      type t =
        Unix_syscalls.Stats.t = {
        dev : int;
        ino : int;
        kind : File_kind.t;
        perm : file_perm;
        nlink : int;
        uid : int;
        gid : int;
        rdev : int;
        size : int64;
        atime : Core.Std.Time.t;
        mtime : Core.Std.Time.t;
        ctime : Core.Std.Time.t;
      }
      val ctime : t -> Core.Std.Time.t
      val mtime : t -> Core.Std.Time.t
      val atime : t -> Core.Std.Time.t
      val size : t -> int64
      val rdev : t -> int
      val gid : t -> int
      val uid : t -> int
      val nlink : t -> int
      val perm : t -> file_perm
      val kind : t -> File_kind.t
      val ino : t -> int
      val dev : t -> int
      module Fields :
        sig
          val names : string list
          val ctime : (t, Core.Std.Time.t) Fieldslib.Field.t
          val mtime : (t, Core.Std.Time.t) Fieldslib.Field.t
          val atime : (t, Core.Std.Time.t) Fieldslib.Field.t
          val size : (t, int64) Fieldslib.Field.t
          val rdev : (t, int) Fieldslib.Field.t
          val gid : (t, int) Fieldslib.Field.t
          val uid : (t, int) Fieldslib.Field.t
          val nlink : (t, int) Fieldslib.Field.t
          val perm : (t, file_perm) Fieldslib.Field.t
          val kind : (t, File_kind.t) Fieldslib.Field.t
          val ino : (t, int) Fieldslib.Field.t
          val dev : (t, int) Fieldslib.Field.t
          val fold :
            init:'acc__ ->
            dev:('acc__ -> (t, int) Fieldslib.Field.t -> 'acc__) ->
            ino:('acc__ -> (t, int) Fieldslib.Field.t -> 'acc__) ->
            kind:('acc__ -> (t, File_kind.t) Fieldslib.Field.t -> 'acc__) ->
            perm:('acc__ -> (t, file_perm) Fieldslib.Field.t -> 'acc__) ->
            nlink:('acc__ -> (t, int) Fieldslib.Field.t -> 'acc__) ->
            uid:('acc__ -> (t, int) Fieldslib.Field.t -> 'acc__) ->
            gid:('acc__ -> (t, int) Fieldslib.Field.t -> 'acc__) ->
            rdev:('acc__ -> (t, int) Fieldslib.Field.t -> 'acc__) ->
            size:('acc__ -> (t, int64) Fieldslib.Field.t -> 'acc__) ->
            atime:('acc__ -> (t, Core.Std.Time.t) Fieldslib.Field.t -> 'acc__) ->
            mtime:('acc__ -> (t, Core.Std.Time.t) Fieldslib.Field.t -> 'acc__) ->
            ctime:('acc__ -> (t, Core.Std.Time.t) Fieldslib.Field.t -> 'acc__) ->
            'acc__
          val make_creator :
            dev:((t, int) Fieldslib.Field.t ->
                 'compile_acc__ -> ('input__ -> int) * 'compile_acc__) ->
            ino:((t, int) Fieldslib.Field.t ->
                 'compile_acc__ -> ('input__ -> int) * 'compile_acc__) ->
            kind:((t, File_kind.t) Fieldslib.Field.t ->
                  'compile_acc__ ->
                  ('input__ -> File_kind.t) * 'compile_acc__) ->
            perm:((t, file_perm) Fieldslib.Field.t ->
                  'compile_acc__ -> ('input__ -> file_perm) * 'compile_acc__) ->
            nlink:((t, int) Fieldslib.Field.t ->
                   'compile_acc__ -> ('input__ -> int) * 'compile_acc__) ->
            uid:((t, int) Fieldslib.Field.t ->
                 'compile_acc__ -> ('input__ -> int) * 'compile_acc__) ->
            gid:((t, int) Fieldslib.Field.t ->
                 'compile_acc__ -> ('input__ -> int) * 'compile_acc__) ->
            rdev:((t, int) Fieldslib.Field.t ->
                  'compile_acc__ -> ('input__ -> int) * 'compile_acc__) ->
            size:((t, int64) Fieldslib.Field.t ->
                  'compile_acc__ -> ('input__ -> int64) * 'compile_acc__) ->
            atime:((t, Core.Std.Time.t) Fieldslib.Field.t ->
                   'compile_acc__ ->
                   ('input__ -> Core.Std.Time.t) * 'compile_acc__) ->
            mtime:((t, Core.Std.Time.t) Fieldslib.Field.t ->
                   'compile_acc__ ->
                   ('input__ -> Core.Std.Time.t) * 'compile_acc__) ->
            ctime:((t, Core.Std.Time.t) Fieldslib.Field.t ->
                   'compile_acc__ ->
                   ('input__ -> Core.Std.Time.t) * 'compile_acc__) ->
            'compile_acc__ -> ('input__ -> t) * 'compile_acc__
          val create :
            dev:int ->
            ino:int ->
            kind:File_kind.t ->
            perm:file_perm ->
            nlink:int ->
            uid:int ->
            gid:int ->
            rdev:int ->
            size:int64 ->
            atime:Core.Std.Time.t ->
            mtime:Core.Std.Time.t -> ctime:Core.Std.Time.t -> t
          val map :
            dev:((t, int) Fieldslib.Field.t -> int) ->
            ino:((t, int) Fieldslib.Field.t -> int) ->
            kind:((t, File_kind.t) Fieldslib.Field.t -> File_kind.t) ->
            perm:((t, file_perm) Fieldslib.Field.t -> file_perm) ->
            nlink:((t, int) Fieldslib.Field.t -> int) ->
            uid:((t, int) Fieldslib.Field.t -> int) ->
            gid:((t, int) Fieldslib.Field.t -> int) ->
            rdev:((t, int) Fieldslib.Field.t -> int) ->
            size:((t, int64) Fieldslib.Field.t -> int64) ->
            atime:((t, Core.Std.Time.t) Fieldslib.Field.t -> Core.Std.Time.t) ->
            mtime:((t, Core.Std.Time.t) Fieldslib.Field.t -> Core.Std.Time.t) ->
            ctime:((t, Core.Std.Time.t) Fieldslib.Field.t -> Core.Std.Time.t) ->
            t
          val iter :
            dev:((t, int) Fieldslib.Field.t -> unit) ->
            ino:((t, int) Fieldslib.Field.t -> unit) ->
            kind:((t, File_kind.t) Fieldslib.Field.t -> unit) ->
            perm:((t, file_perm) Fieldslib.Field.t -> unit) ->
            nlink:((t, int) Fieldslib.Field.t -> unit) ->
            uid:((t, int) Fieldslib.Field.t -> unit) ->
            gid:((t, int) Fieldslib.Field.t -> unit) ->
            rdev:((t, int) Fieldslib.Field.t -> unit) ->
            size:((t, int64) Fieldslib.Field.t -> unit) ->
            atime:((t, Core.Std.Time.t) Fieldslib.Field.t -> unit) ->
            mtime:((t, Core.Std.Time.t) Fieldslib.Field.t -> unit) ->
            ctime:((t, Core.Std.Time.t) Fieldslib.Field.t -> unit) -> unit
          val for_all :
            dev:((t, int) Fieldslib.Field.t -> bool) ->
            ino:((t, int) Fieldslib.Field.t -> bool) ->
            kind:((t, File_kind.t) Fieldslib.Field.t -> bool) ->
            perm:((t, file_perm) Fieldslib.Field.t -> bool) ->
            nlink:((t, int) Fieldslib.Field.t -> bool) ->
            uid:((t, int) Fieldslib.Field.t -> bool) ->
            gid:((t, int) Fieldslib.Field.t -> bool) ->
            rdev:((t, int) Fieldslib.Field.t -> bool) ->
            size:((t, int64) Fieldslib.Field.t -> bool) ->
            atime:((t, Core.Std.Time.t) Fieldslib.Field.t -> bool) ->
            mtime:((t, Core.Std.Time.t) Fieldslib.Field.t -> bool) ->
            ctime:((t, Core.Std.Time.t) Fieldslib.Field.t -> bool) -> bool
          val exists :
            dev:((t, int) Fieldslib.Field.t -> bool) ->
            ino:((t, int) Fieldslib.Field.t -> bool) ->
            kind:((t, File_kind.t) Fieldslib.Field.t -> bool) ->
            perm:((t, file_perm) Fieldslib.Field.t -> bool) ->
            nlink:((t, int) Fieldslib.Field.t -> bool) ->
            uid:((t, int) Fieldslib.Field.t -> bool) ->
            gid:((t, int) Fieldslib.Field.t -> bool) ->
            rdev:((t, int) Fieldslib.Field.t -> bool) ->
            size:((t, int64) Fieldslib.Field.t -> bool) ->
            atime:((t, Core.Std.Time.t) Fieldslib.Field.t -> bool) ->
            mtime:((t, Core.Std.Time.t) Fieldslib.Field.t -> bool) ->
            ctime:((t, Core.Std.Time.t) Fieldslib.Field.t -> bool) -> bool
          val to_list :
            dev:((t, int) Fieldslib.Field.t -> 'elem__) ->
            ino:((t, int) Fieldslib.Field.t -> 'elem__) ->
            kind:((t, File_kind.t) Fieldslib.Field.t -> 'elem__) ->
            perm:((t, file_perm) Fieldslib.Field.t -> 'elem__) ->
            nlink:((t, int) Fieldslib.Field.t -> 'elem__) ->
            uid:((t, int) Fieldslib.Field.t -> 'elem__) ->
            gid:((t, int) Fieldslib.Field.t -> 'elem__) ->
            rdev:((t, int) Fieldslib.Field.t -> 'elem__) ->
            size:((t, int64) Fieldslib.Field.t -> 'elem__) ->
            atime:((t, Core.Std.Time.t) Fieldslib.Field.t -> 'elem__) ->
            mtime:((t, Core.Std.Time.t) Fieldslib.Field.t -> 'elem__) ->
            ctime:((t, Core.Std.Time.t) Fieldslib.Field.t -> 'elem__) ->
            'elem__ list
          val map_poly :
            ([< `Read | `Set_and_create ], t, 'x0) Fieldslib.Field.user ->
            'x0 list
          module Direct :
            sig
              val iter :
                t ->
                dev:((t, int) Fieldslib.Field.t -> t -> int -> unit) ->
                ino:((t, int) Fieldslib.Field.t -> t -> int -> unit) ->
                kind:((t, File_kind.t) Fieldslib.Field.t ->
                      t -> File_kind.t -> unit) ->
                perm:((t, file_perm) Fieldslib.Field.t ->
                      t -> file_perm -> unit) ->
                nlink:((t, int) Fieldslib.Field.t -> t -> int -> unit) ->
                uid:((t, int) Fieldslib.Field.t -> t -> int -> unit) ->
                gid:((t, int) Fieldslib.Field.t -> t -> int -> unit) ->
                rdev:((t, int) Fieldslib.Field.t -> t -> int -> unit) ->
                size:((t, int64) Fieldslib.Field.t -> t -> int64 -> unit) ->
                atime:((t, Core.Std.Time.t) Fieldslib.Field.t ->
                       t -> Core.Std.Time.t -> unit) ->
                mtime:((t, Core.Std.Time.t) Fieldslib.Field.t ->
                       t -> Core.Std.Time.t -> unit) ->
                ctime:((t, Core.Std.Time.t) Fieldslib.Field.t ->
                       t -> Core.Std.Time.t -> unit) ->
                unit
              val fold :
                t ->
                init:'acc__ ->
                dev:('acc__ ->
                     (t, int) Fieldslib.Field.t -> t -> int -> 'acc__) ->
                ino:('acc__ ->
                     (t, int) Fieldslib.Field.t -> t -> int -> 'acc__) ->
                kind:('acc__ ->
                      (t, File_kind.t) Fieldslib.Field.t ->
                      t -> File_kind.t -> 'acc__) ->
                perm:('acc__ ->
                      (t, file_perm) Fieldslib.Field.t ->
                      t -> file_perm -> 'acc__) ->
                nlink:('acc__ ->
                       (t, int) Fieldslib.Field.t -> t -> int -> 'acc__) ->
                uid:('acc__ ->
                     (t, int) Fieldslib.Field.t -> t -> int -> 'acc__) ->
                gid:('acc__ ->
                     (t, int) Fieldslib.Field.t -> t -> int -> 'acc__) ->
                rdev:('acc__ ->
                      (t, int) Fieldslib.Field.t -> t -> int -> 'acc__) ->
                size:('acc__ ->
                      (t, int64) Fieldslib.Field.t -> t -> int64 -> 'acc__) ->
                atime:('acc__ ->
                       (t, Core.Std.Time.t) Fieldslib.Field.t ->
                       t -> Core.Std.Time.t -> 'acc__) ->
                mtime:('acc__ ->
                       (t, Core.Std.Time.t) Fieldslib.Field.t ->
                       t -> Core.Std.Time.t -> 'acc__) ->
                ctime:('acc__ ->
                       (t, Core.Std.Time.t) Fieldslib.Field.t ->
                       t -> Core.Std.Time.t -> 'acc__) ->
                'acc__
            end
        end
      val to_string : t -> string
      val t_of_sexp : Sexplib.Sexp.t -> t
      val sexp_of_t : t -> Sexplib.Sexp.t
    end
  val fstat : Fd.t -> Stats.t Import.Deferred.t
  val stat : string -> Stats.t Import.Deferred.t
  val lstat : string -> Stats.t Import.Deferred.t
  val unlink : string -> unit Import.Deferred.t
  val remove : string -> unit Import.Deferred.t
  val rename : src:string -> dst:string -> unit Import.Deferred.t
  val link :
    ?force:bool ->
    target:string -> link_name:string -> unit -> unit Import.Deferred.t
  val chmod : string -> perm:file_perm -> unit Import.Deferred.t
  val fchmod : Fd.t -> perm:file_perm -> unit Import.Deferred.t
  val chown : string -> uid:int -> gid:int -> unit Import.Deferred.t
  val fchown : Fd.t -> uid:int -> gid:int -> unit Import.Deferred.t
  val access :
    string ->
    [ `Exec | `Exists | `Read | `Write ] list ->
    (unit, exn) Core.Std.Result.t Import.Deferred.t
  val access_exn :
    string ->
    [ `Exec | `Exists | `Read | `Write ] list -> unit Import.Deferred.t
  val set_close_on_exec : Fd.t -> unit
  val clear_close_on_exec : Fd.t -> unit
  val mkdir : ?p:unit -> ?perm:file_perm -> string -> unit Import.Deferred.t
  val rmdir : string -> unit Import.Deferred.t
  val chdir : string -> unit Import.Deferred.t
  val getcwd : unit -> string Import.Deferred.t
  val chroot : string -> unit Import.Deferred.t
  type dir_handle = Core.Std.Unix.dir_handle
  val opendir : string -> dir_handle Import.Deferred.t
  val readdir : dir_handle -> string Import.Deferred.t
  val rewinddir : dir_handle -> unit Import.Deferred.t
  val closedir : dir_handle -> unit Import.Deferred.t
  val pipe :
    Core.Std.Info.t ->
    ([ `Reader of Fd.t ] * [ `Writer of Fd.t ]) Import.Deferred.t
  val mkfifo : ?perm:file_perm -> string -> unit Import.Deferred.t
  val symlink : src:string -> dst:string -> unit Import.Deferred.t
  val readlink : string -> string Import.Deferred.t
  val mkstemp : string -> (string * Fd.t) Import.Deferred.t
  val mkdtemp : string -> string Import.Deferred.t
  type process_times =
    Core.Std.Unix.process_times = {
    tms_utime : float;
    tms_stime : float;
    tms_cutime : float;
    tms_cstime : float;
  }
  val times : unit -> process_times
  type tm =
    Core.Std.Unix.tm = {
    tm_sec : int;
    tm_min : int;
    tm_hour : int;
    tm_mday : int;
    tm_mon : int;
    tm_year : int;
    tm_wday : int;
    tm_yday : int;
    tm_isdst : bool;
  }
  val time : unit -> float
  val gettimeofday : unit -> float
  val gmtime : float -> tm
  val localtime : float -> tm
  val mktime : tm -> float * tm
  val utimes :
    string -> access:float -> modif:float -> unit Import.Deferred.t
  val environment : unit -> string array
  val getenv : string -> string option
  val getenv_exn : string -> string
  val putenv : key:string -> data:string -> unit
  val unsetenv : string -> unit
  val fork_exec :
    prog:string ->
    args:string list ->
    ?use_path:bool ->
    ?env:string list -> unit -> Core.Std.Pid.t Import.Deferred.t
  type wait_on =
      [ `Any | `Group of Core.Std.Pid.t | `My_group | `Pid of Core.Std.Pid.t ]
  val wait : wait_on -> (Core.Std.Pid.t * Exit_or_signal.t) Import.Deferred.t
  val wait_nohang : wait_on -> (Core.Std.Pid.t * Exit_or_signal.t) option
  val wait_untraced :
    wait_on -> (Core.Std.Pid.t * Exit_or_signal_or_stop.t) Import.Deferred.t
  val wait_nohang_untraced :
    wait_on -> (Core.Std.Pid.t * Exit_or_signal_or_stop.t) option
  val waitpid : Core.Std.Pid.t -> Exit_or_signal.t Import.Deferred.t
  val waitpid_exn : Core.Std.Pid.t -> unit Import.Deferred.t
  module Inet_addr :
    sig
      type t = Core.Std.Unix.Inet_addr.t
      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 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 = Unix_syscalls.Inet_addr.comparator
      val comparator : (t, comparator) Core_kernel.Comparator.t
      val validate_lbound :
        min:t Core_kernel.Comparable_intf.bound ->
        t Core_kernel.Validate.check
      val validate_ubound :
        max:t Core_kernel.Comparable_intf.bound ->
        t Core_kernel.Validate.check
      val validate_bound :
        min:t Core_kernel.Comparable_intf.bound ->
        max:t Core_kernel.Comparable_intf.bound ->
        t Core_kernel.Validate.check
      module Map :
        sig
          module Key :
            sig
              type t = t
              val compare : t -> t -> int
              val t_of_sexp : Sexplib.Sexp.t -> t
              val sexp_of_t : t -> Sexplib.Sexp.t
              type comparator = comparator
              val comparator : (t, comparator) Core_kernel.Comparator.t_
            end
          module Tree :
            sig
              type 'a t =
                  (Key.t, 'a, Key.comparator) Core_kernel.Core_map.Tree.t
              val empty : 'a t
              val singleton : Key.t -> '-> 'a t
              val of_alist :
                (Key.t * 'a) list ->
                [ `Duplicate_key of Key.t | `Ok of 'a 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:'-> f:('-> '-> 'b) -> 'b t
              val of_alist_reduce :
                (Key.t * 'a) list -> f:('-> '-> 'a) -> 'a t
              val of_sorted_array :
                (Key.t * 'a) array -> 'a t Core_kernel.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 t
              val add_multi : 'a list t -> key:Key.t -> data:'-> '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:'-> unit) -> unit
              val iter2 :
                'a t ->
                'b t ->
                f:(key:Key.t ->
                   data:[ `Both of 'a * '| `Left of '| `Right of 'b ] ->
                   unit) ->
                unit
              val map : 'a t -> f:('-> 'b) -> 'b t
              val mapi : 'a t -> f:(key:Key.t -> data:'-> 'b) -> 'b t
              val fold :
                'a t -> init:'-> f:(key:Key.t -> data:'-> '-> 'b) -> 'b
              val fold_right :
                'a t -> init:'-> f:(key:Key.t -> data:'-> '-> 'b) -> 'b
              val filter : 'a t -> f:(key:Key.t -> data:'-> bool) -> 'a t
              val filter_map : 'a t -> f:('-> 'b option) -> 'b t
              val filter_mapi :
                'a t -> f:(key:Key.t -> data:'-> 'b option) -> 'b t
              val compare_direct : ('-> '-> int) -> 'a t -> 'a t -> int
              val equal : ('-> '-> 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) ->
                'Core_kernel.Validate.check ->
                'a t Core_kernel.Validate.check
              val merge :
                'a t ->
                'b t ->
                f:(key:Key.t ->
                   [ `Both of 'a * '| `Left of '| `Right of 'b ] ->
                   'c option) ->
                'c t
              val symmetric_diff :
                'a t ->
                'a t ->
                data_equal:('-> '-> bool) ->
                (Key.t * [ `Left of '| `Right of '| `Unequal of 'a * 'a ])
                list
              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:('-> bool) -> bool
              val exists : 'a t -> f:('-> bool) -> bool
              val fold_range_inclusive :
                'a t ->
                min:Key.t ->
                max:Key.t ->
                init:'-> f:(key:Key.t -> data:'-> '-> 'b) -> 'b
              val range_to_alist :
                'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
              val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
              val next_key : 'a t -> Key.t -> (Key.t * 'a) option
              val rank : 'a t -> Key.t -> int option
              val to_tree : 'a t -> 'a t
              val t_of_sexp :
                (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
              val sexp_of_t :
                ('-> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
            end
          type 'a t = (Key.t, 'a, Key.comparator) Core_kernel.Core_map.t
          val empty : 'a t
          val singleton : Key.t -> '-> 'a t
          val of_alist :
            (Key.t * 'a) list -> [ `Duplicate_key of Key.t | `Ok of 'a 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:'-> f:('-> '-> 'b) -> 'b t
          val of_alist_reduce :
            (Key.t * 'a) list -> f:('-> '-> 'a) -> 'a t
          val of_sorted_array :
            (Key.t * 'a) array -> 'a t Core_kernel.Or_error.t
          val of_sorted_array_unchecked : (Key.t * 'a) array -> 'a t
          val of_tree : '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 t
          val add_multi : 'a list t -> key:Key.t -> data:'-> '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:'-> unit) -> unit
          val iter2 :
            'a t ->
            'b t ->
            f:(key:Key.t ->
               data:[ `Both of 'a * '| `Left of '| `Right of 'b ] -> unit) ->
            unit
          val map : 'a t -> f:('-> 'b) -> 'b t
          val mapi : 'a t -> f:(key:Key.t -> data:'-> 'b) -> 'b t
          val fold :
            'a t -> init:'-> f:(key:Key.t -> data:'-> '-> 'b) -> 'b
          val fold_right :
            'a t -> init:'-> f:(key:Key.t -> data:'-> '-> 'b) -> 'b
          val filter : 'a t -> f:(key:Key.t -> data:'-> bool) -> 'a t
          val filter_map : 'a t -> f:('-> 'b option) -> 'b t
          val filter_mapi :
            'a t -> f:(key:Key.t -> data:'-> 'b option) -> 'b t
          val compare_direct : ('-> '-> int) -> 'a t -> 'a t -> int
          val equal : ('-> '-> 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) ->
            'Core_kernel.Validate.check -> 'a t Core_kernel.Validate.check
          val merge :
            'a t ->
            'b t ->
            f:(key:Key.t ->
               [ `Both of 'a * '| `Left of '| `Right of 'b ] -> 'c option) ->
            'c t
          val symmetric_diff :
            'a t ->
            'a t ->
            data_equal:('-> '-> bool) ->
            (Key.t * [ `Left of '| `Right of '| `Unequal of 'a * 'a ])
            list
          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:('-> bool) -> bool
          val exists : 'a t -> f:('-> bool) -> bool
          val fold_range_inclusive :
            'a t ->
            min:Key.t ->
            max:Key.t ->
            init:'-> f:(key:Key.t -> data:'-> '-> 'b) -> 'b
          val range_to_alist :
            'a t -> min:Key.t -> max:Key.t -> (Key.t * 'a) list
          val prev_key : 'a t -> Key.t -> (Key.t * 'a) option
          val next_key : 'a t -> Key.t -> (Key.t * 'a) option
          val rank : 'a t -> Key.t -> int option
          val to_tree : 'a t -> 'Tree.t
          val t_of_sexp : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a t
          val sexp_of_t : ('-> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
          val compare : ('-> '-> int) -> 'a t -> 'a t -> int
        end
      module Set :
        sig
          module Elt :
            sig
              type t = t
              val compare : t -> t -> int
              val t_of_sexp : Sexplib.Sexp.t -> t
              val sexp_of_t : t -> Sexplib.Sexp.t
              type comparator = comparator
              val comparator : (t, comparator) Core_kernel.Comparator.t_
            end
          module Tree :
            sig
              type t = (Elt.t, Elt.comparator) Core_kernel.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 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 compare_direct : t -> t -> int
              val equal : t -> t -> bool
              val subset : t -> t -> bool
              val fold_until :
                t ->
                init:'->
                f:('-> Elt.t -> [ `Continue of '| `Stop of 'b ]) -> 'b
              val fold_right : t -> init:'-> f:(Elt.t -> '-> '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 * bool * 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 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 Core_kernel.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_kernel.Core_set.Tree.t -> f:('-> Elt.t) -> t
              val filter_map :
                ('a, 'b) Core_kernel.Core_set.Tree.t ->
                f:('-> Elt.t option) -> t
              val of_tree : 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) Core_kernel.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 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 compare_direct : t -> t -> int
          val equal : t -> t -> bool
          val subset : t -> t -> bool
          val fold_until :
            t ->
            init:'->
            f:('-> Elt.t -> [ `Continue of '| `Stop of 'b ]) -> 'b
          val fold_right : t -> init:'-> f:(Elt.t -> '-> '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 * bool * 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 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 Core_kernel.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_kernel.Core_set.t -> f:('-> Elt.t) -> t
          val filter_map :
            ('a, 'b) Core_kernel.Core_set.t -> f:('-> Elt.t option) -> t
          val of_tree : Tree.t -> t
          val t_of_sexp : Sexplib.Sexp.t -> t
          val sexp_of_t : t -> Sexplib.Sexp.t
          val compare : t -> t -> int
        end
      val of_string : string -> t
      val to_string : t -> string
      val bind_any : t
      val bind_any_inet6 : t
      val localhost : t
      val localhost_inet6 : t
      val inet4_addr_of_int32 : Core.Std.Int32.t -> t
      val inet4_addr_to_int32_exn : t -> Core.Std.Int32.t
      val of_string_or_getbyname : string -> t Import.Deferred.t
      val compare : t -> t -> int
      val t_of_sexp : Sexplib.Sexp.t -> t
      val sexp_of_t : t -> Sexplib.Sexp.t
      val bin_t : t Core.Std.Bin_prot.Type_class.t
      val bin_read_t : t Core.Std.Bin_prot.Read.reader
      val __bin_read_t__ : (int -> t) Core.Std.Bin_prot.Read.reader
      val bin_reader_t : t Core.Std.Bin_prot.Type_class.reader
      val bin_size_t : t Core.Std.Bin_prot.Size.sizer
      val bin_write_t : t Core.Std.Bin_prot.Write.writer
      val bin_writer_t : t Core.Std.Bin_prot.Type_class.writer
    end
  module Cidr :
    sig
      type t = Core.Core_unix.Cidr.t
      val of_string : string -> t
      val to_string : t -> string
      val base_address : t -> Core.Std.Unix.Inet_addr.t
      val bits : t -> int
      val multicast : t
      val does_match : t -> Core.Std.Unix.Inet_addr.t -> bool
      val bin_t : t Core_kernel.Std.Bin_prot.Type_class.t
      val bin_read_t : t Core_kernel.Std.Bin_prot.Read.reader
      val __bin_read_t__ : (int -> t) Core_kernel.Std.Bin_prot.Read.reader
      val bin_reader_t : t Core_kernel.Std.Bin_prot.Type_class.reader
      val bin_size_t : t Core_kernel.Std.Bin_prot.Size.sizer
      val bin_write_t : t Core_kernel.Std.Bin_prot.Write.writer
      val bin_writer_t : t Core_kernel.Std.Bin_prot.Type_class.writer
      val t_of_sexp : Sexplib.Sexp.t -> t
      val sexp_of_t : t -> Sexplib.Sexp.t
    end
  module Protocol_family : sig type t = Core.Std.Unix.Protocol_family.t end
  val socketpair : unit -> Fd.t * Fd.t
  module Socket :
    sig
      module Address :
        sig
          module Unix :
            sig
              type t = [ `Unix of string ]
              val create : string -> t
              val to_string : t -> string
              val compare : t -> t -> int
              val t_of_sexp : Sexplib.Sexp.t -> t
              val __t_of_sexp__ : Sexplib.Sexp.t -> t
              val sexp_of_t : t -> Sexplib.Sexp.t
              val bin_t : t Core.Std.Bin_prot.Type_class.t
              val bin_read_t : t Core.Std.Bin_prot.Read.reader
              val __bin_read_t__ : (int -> t) Core.Std.Bin_prot.Read.reader
              val bin_reader_t : t Core.Std.Bin_prot.Type_class.reader
              val bin_size_t : t Core.Std.Bin_prot.Size.sizer
              val bin_write_t : t Core.Std.Bin_prot.Write.writer
              val bin_writer_t : t Core.Std.Bin_prot.Type_class.writer
            end
          module Inet :
            sig
              type t = [ `Inet of Inet_addr.t * int ]
              val create : Inet_addr.t -> port:int -> t
              val create_bind_any : port:int -> t
              val addr : t -> Inet_addr.t
              val port : t -> int
              val to_string : t -> string
              val compare : t -> t -> int
              val t_of_sexp : Sexplib.Sexp.t -> t
              val __t_of_sexp__ : Sexplib.Sexp.t -> t
              val sexp_of_t : t -> Sexplib.Sexp.t
              val bin_t : t Core.Std.Bin_prot.Type_class.t
              val bin_read_t : t Core.Std.Bin_prot.Read.reader
              val __bin_read_t__ : (int -> t) Core.Std.Bin_prot.Read.reader
              val bin_reader_t : t Core.Std.Bin_prot.Type_class.reader
              val bin_size_t : t Core.Std.Bin_prot.Size.sizer
              val bin_write_t : t Core.Std.Bin_prot.Write.writer
              val bin_writer_t : t Core.Std.Bin_prot.Type_class.writer
            end
          type t = [ `Inet of Inet_addr.t * int | `Unix of string ]
          val to_string : [< t ] -> string
          val to_sockaddr : [< t ] -> Core.Std.Unix.sockaddr
          val t_of_sexp : Sexplib.Sexp.t -> t
          val __t_of_sexp__ : Sexplib.Sexp.t -> t
          val sexp_of_t : t -> Sexplib.Sexp.t
          val bin_t : t Core.Std.Bin_prot.Type_class.t
          val bin_read_t : t Core.Std.Bin_prot.Read.reader
          val __bin_read_t__ : (int -> t) Core.Std.Bin_prot.Read.reader
          val bin_reader_t : t Core.Std.Bin_prot.Type_class.reader
          val bin_size_t : t Core.Std.Bin_prot.Size.sizer
          val bin_write_t : t Core.Std.Bin_prot.Write.writer
          val bin_writer_t : t Core.Std.Bin_prot.Type_class.writer
        end
      module Family :
        sig
          type 'a t = 'Unix_syscalls.Socket.Family.t
            constraint 'a = [< Address.t ]
          val unix : Address.Unix.t t
          val inet : Address.Inet.t t
          val to_string : [< Address.t ] t -> string
        end
      type ('a, 'b) t = ('a, 'b) Unix_syscalls.Socket.t
        constraint 'a = [< `Active | `Bound | `Passive | `Unconnected ]
        constraint 'b = [< Address.t ]
      module Type :
        sig
          type 'a t = 'Unix_syscalls.Socket.Type.t
            constraint 'a = [< Address.t ]
          val tcp : Address.Inet.t t
          val udp : Address.Inet.t t
          val unix : Address.Unix.t t
          val unix_dgram : Address.Unix.t t
        end
      val create : ([< Address.t ] as 'a) Type.t -> ([ `Unconnected ], 'a) t
      val connect :
        ([ `Unconnected ], [< Address.t ] as 'a) t ->
        '-> ([ `Active ], 'a) t Import.Deferred.t
      val connect_interruptible :
        ([ `Unconnected ], [< Address.t ] as 'a) t ->
        '->
        interrupt:unit Import.Deferred.t ->
        [ `Interrupted | `Ok of ([ `Active ], 'a) t ] Import.Deferred.t
      val bind :
        ([ `Unconnected ], [< Address.t ] as 'a) t ->
        '-> ([ `Bound ], 'a) t Import.Deferred.t
      val listen :
        ?max_pending_connections:int ->
        ([ `Bound ], [< Address.t ] as 'a) t -> ([ `Passive ], 'a) t
      val accept :
        ([ `Passive ], [< Address.t ] as 'a) t ->
        [ `Ok of ([ `Active ], 'a) t * '| `Socket_closed ]
        Import.Deferred.t
      val accept_interruptible :
        ([ `Passive ], [< Address.t ] as 'a) t ->
        interrupt:unit Import.Deferred.t ->
        [ `Interrupted | `Ok of ([ `Active ], 'a) t * '| `Socket_closed ]
        Import.Deferred.t
      val shutdown :
        ([< `Active | `Bound | `Passive | `Unconnected ], [< Address.t ]) t ->
        [ `Both | `Receive | `Send ] -> unit
      val fd :
        ([< `Active | `Bound | `Passive | `Unconnected ], [< Address.t ]) t ->
        Fd.t
      val of_fd :
        Fd.t ->
        ([< Address.t ] as 'a) Type.t ->
        ([< `Active | `Bound | `Passive | `Unconnected ], 'a) t
      val getsockname :
        ([< `Active | `Bound | `Passive | `Unconnected ],
         [< Address.t ] as 'a)
        t -> 'a
      val getpeername :
        ([< `Active | `Bound | `Passive | `Unconnected ],
         [< Address.t ] as 'a)
        t -> 'a
      module Opt :
        sig
          type 'a t = 'Unix_syscalls.Socket.Opt.t
          val debug : bool t
          val broadcast : bool t
          val reuseaddr : bool t
          val keepalive : bool t
          val dontroute : bool t
          val oobinline : bool t
          val acceptconn : bool t
          val nodelay : bool t
          val sndbuf : int t
          val rcvbuf : int t
          val error : int t
          val typ : int t
          val rcvlowat : int t
          val sndlowat : int t
          val linger : int option t
          val rcvtimeo : float t
          val sndtimeo : float t
          val mcast_loop : bool t
          val mcast_ttl : int t
          val to_string : 'a t -> string
        end
      val getopt :
        ([< `Active | `Bound | `Passive | `Unconnected ], [< Address.t ]) t ->
        'Opt.t -> 'c
      val setopt :
        ([< `Active | `Bound | `Passive | `Unconnected ], [< Address.t ]) t ->
        'Opt.t -> '-> unit
      val mcast_join :
        ?ifname:string ->
        ([< `Active | `Bound | `Passive | `Unconnected ],
         [< Address.t ] as 'a)
        t -> '-> unit
      val mcast_leave :
        ?ifname:string ->
        ([< `Active | `Bound | `Passive | `Unconnected ],
         [< Address.t ] as 'a)
        t -> '-> unit
      val sexp_of_t :
        (([< `Active | `Bound | `Passive | `Unconnected ] as 'a) ->
         Sexplib.Sexp.t) ->
        (([< Address.t ] as 'b) -> Sexplib.Sexp.t) ->
        ('a, 'b) t -> Sexplib.Sexp.t
    end
  module Host :
    sig
      type t =
        Core.Std.Unix.Host.t = {
        name : string;
        aliases : string array;
        family : Protocol_family.t;
        addresses : Inet_addr.t array;
      }
      val getbyname : string -> t option Import.Deferred.t
      val getbyname_exn : string -> t Import.Deferred.t
      val getbyaddr : Inet_addr.t -> t option Import.Deferred.t
      val getbyaddr_exn : Inet_addr.t -> t Import.Deferred.t
      val have_address_in_common : t -> t -> bool
    end
  val gethostname : unit -> string
  val getuid : unit -> int
  val geteuid : unit -> int
  val getgid : unit -> int
  val getegid : unit -> int
  val setuid : int -> unit
  type error =
    Core.Std.Unix.error =
      E2BIG
    | EACCES
    | EAGAIN
    | EBADF
    | EBUSY
    | ECHILD
    | EDEADLK
    | EDOM
    | EEXIST
    | EFAULT
    | EFBIG
    | EINTR
    | EINVAL
    | EIO
    | EISDIR
    | EMFILE
    | EMLINK
    | ENAMETOOLONG
    | ENFILE
    | ENODEV
    | ENOENT
    | ENOEXEC
    | ENOLCK
    | ENOMEM
    | ENOSPC
    | ENOSYS
    | ENOTDIR
    | ENOTEMPTY
    | ENOTTY
    | ENXIO
    | EPERM
    | EPIPE
    | ERANGE
    | EROFS
    | ESPIPE
    | ESRCH
    | EXDEV
    | EWOULDBLOCK
    | EINPROGRESS
    | EALREADY
    | ENOTSOCK
    | EDESTADDRREQ
    | EMSGSIZE
    | EPROTOTYPE
    | ENOPROTOOPT
    | EPROTONOSUPPORT
    | ESOCKTNOSUPPORT
    | EOPNOTSUPP
    | EPFNOSUPPORT
    | EAFNOSUPPORT
    | EADDRINUSE
    | EADDRNOTAVAIL
    | ENETDOWN
    | ENETUNREACH
    | ENETRESET
    | ECONNABORTED
    | ECONNRESET
    | ENOBUFS
    | EISCONN
    | ENOTCONN
    | ESHUTDOWN
    | ETOOMANYREFS
    | ETIMEDOUT
    | ECONNREFUSED
    | EHOSTDOWN
    | EHOSTUNREACH
    | ELOOP
    | EOVERFLOW
    | EUNKNOWNERR of int
  exception Unix_error of error * string * string
  module Terminal_io :
    sig
      type t =
        Core.Std.Caml.Unix.terminal_io = {
        mutable c_ignbrk : bool;
        mutable c_brkint : bool;
        mutable c_ignpar : bool;
        mutable c_parmrk : bool;
        mutable c_inpck : bool;
        mutable c_istrip : bool;
        mutable c_inlcr : bool;
        mutable c_igncr : bool;
        mutable c_icrnl : bool;
        mutable c_ixon : bool;
        mutable c_ixoff : bool;
        mutable c_opost : bool;
        mutable c_obaud : int;
        mutable c_ibaud : int;
        mutable c_csize : int;
        mutable c_cstopb : int;
        mutable c_cread : bool;
        mutable c_parenb : bool;
        mutable c_parodd : bool;
        mutable c_hupcl : bool;
        mutable c_clocal : bool;
        mutable c_isig : bool;
        mutable c_icanon : bool;
        mutable c_noflsh : bool;
        mutable c_echo : bool;
        mutable c_echoe : bool;
        mutable c_echok : bool;
        mutable c_echonl : bool;
        mutable c_vintr : char;
        mutable c_vquit : char;
        mutable c_verase : char;
        mutable c_vkill : char;
        mutable c_veof : char;
        mutable c_veol : char;
        mutable c_vmin : int;
        mutable c_vtime : int;
        mutable c_vstart : char;
        mutable c_vstop : char;
      }
      type setattr_when =
        Core.Std.Caml.Unix.setattr_when =
          TCSANOW
        | TCSADRAIN
        | TCSAFLUSH
      val tcgetattr : Fd.t -> t Import.Deferred.t
      val tcsetattr :
        t -> Fd.t -> mode:setattr_when -> unit Import.Deferred.t
    end
  module Passwd :
    sig
      type t =
        Unix_syscalls.Passwd.t = {
        name : string;
        passwd : string;
        uid : int;
        gid : int;
        gecos : string;
        dir : string;
        shell : string;
      }
      val shell : t -> string
      val dir : t -> string
      val gecos : t -> string
      val gid : t -> int
      val uid : t -> int
      val passwd : t -> string
      val name : t -> string
      module Fields :
        sig
          val names : string list
          val shell : (t, string) Fieldslib.Field.t
          val dir : (t, string) Fieldslib.Field.t
          val gecos : (t, string) Fieldslib.Field.t
          val gid : (t, int) Fieldslib.Field.t
          val uid : (t, int) Fieldslib.Field.t
          val passwd : (t, string) Fieldslib.Field.t
          val name : (t, string) Fieldslib.Field.t
          val fold :
            init:'acc__ ->
            name:('acc__ -> (t, string) Fieldslib.Field.t -> 'acc__) ->
            passwd:('acc__ -> (t, string) Fieldslib.Field.t -> 'acc__) ->
            uid:('acc__ -> (t, int) Fieldslib.Field.t -> 'acc__) ->
            gid:('acc__ -> (t, int) Fieldslib.Field.t -> 'acc__) ->
            gecos:('acc__ -> (t, string) Fieldslib.Field.t -> 'acc__) ->
            dir:('acc__ -> (t, string) Fieldslib.Field.t -> 'acc__) ->
            shell:('acc__ -> (t, string) Fieldslib.Field.t -> 'acc__) ->
            'acc__
          val make_creator :
            name:((t, string) Fieldslib.Field.t ->
                  'compile_acc__ -> ('input__ -> string) * 'compile_acc__) ->
            passwd:((t, string) Fieldslib.Field.t ->
                    'compile_acc__ -> ('input__ -> string) * 'compile_acc__) ->
            uid:((t, int) Fieldslib.Field.t ->
                 'compile_acc__ -> ('input__ -> int) * 'compile_acc__) ->
            gid:((t, int) Fieldslib.Field.t ->
                 'compile_acc__ -> ('input__ -> int) * 'compile_acc__) ->
            gecos:((t, string) Fieldslib.Field.t ->
                   'compile_acc__ -> ('input__ -> string) * 'compile_acc__) ->
            dir:((t, string) Fieldslib.Field.t ->
                 'compile_acc__ -> ('input__ -> string) * 'compile_acc__) ->
            shell:((t, string) Fieldslib.Field.t ->
                   'compile_acc__ -> ('input__ -> string) * 'compile_acc__) ->
            'compile_acc__ -> ('input__ -> t) * 'compile_acc__
          val create :
            name:string ->
            passwd:string ->
            uid:int ->
            gid:int -> gecos:string -> dir:string -> shell:string -> t
          val map :
            name:((t, string) Fieldslib.Field.t -> string) ->
            passwd:((t, string) Fieldslib.Field.t -> string) ->
            uid:((t, int) Fieldslib.Field.t -> int) ->
            gid:((t, int) Fieldslib.Field.t -> int) ->
            gecos:((t, string) Fieldslib.Field.t -> string) ->
            dir:((t, string) Fieldslib.Field.t -> string) ->
            shell:((t, string) Fieldslib.Field.t -> string) -> t
          val iter :
            name:((t, string) Fieldslib.Field.t -> unit) ->
            passwd:((t, string) Fieldslib.Field.t -> unit) ->
            uid:((t, int) Fieldslib.Field.t -> unit) ->
            gid:((t, int) Fieldslib.Field.t -> unit) ->
            gecos:((t, string) Fieldslib.Field.t -> unit) ->
            dir:((t, string) Fieldslib.Field.t -> unit) ->
            shell:((t, string) Fieldslib.Field.t -> unit) -> unit
          val for_all :
            name:((t, string) Fieldslib.Field.t -> bool) ->
            passwd:((t, string) Fieldslib.Field.t -> bool) ->
            uid:((t, int) Fieldslib.Field.t -> bool) ->
            gid:((t, int) Fieldslib.Field.t -> bool) ->
            gecos:((t, string) Fieldslib.Field.t -> bool) ->
            dir:((t, string) Fieldslib.Field.t -> bool) ->
            shell:((t, string) Fieldslib.Field.t -> bool) -> bool
          val exists :
            name:((t, string) Fieldslib.Field.t -> bool) ->
            passwd:((t, string) Fieldslib.Field.t -> bool) ->
            uid:((t, int) Fieldslib.Field.t -> bool) ->
            gid:((t, int) Fieldslib.Field.t -> bool) ->
            gecos:((t, string) Fieldslib.Field.t -> bool) ->
            dir:((t, string) Fieldslib.Field.t -> bool) ->
            shell:((t, string) Fieldslib.Field.t -> bool) -> bool
          val to_list :
            name:((t, string) Fieldslib.Field.t -> 'elem__) ->
            passwd:((t, string) Fieldslib.Field.t -> 'elem__) ->
            uid:((t, int) Fieldslib.Field.t -> 'elem__) ->
            gid:((t, int) Fieldslib.Field.t -> 'elem__) ->
            gecos:((t, string) Fieldslib.Field.t -> 'elem__) ->
            dir:((t, string) Fieldslib.Field.t -> 'elem__) ->
            shell:((t, string) Fieldslib.Field.t -> 'elem__) -> 'elem__ list
          val map_poly :
            ([< `Read | `Set_and_create ], t, 'x0) Fieldslib.Field.user ->
            'x0 list
          module Direct :
            sig
              val iter :
                t ->
                name:((t, string) Fieldslib.Field.t -> t -> string -> unit) ->
                passwd:((t, string) Fieldslib.Field.t -> t -> string -> unit) ->
                uid:((t, int) Fieldslib.Field.t -> t -> int -> unit) ->
                gid:((t, int) Fieldslib.Field.t -> t -> int -> unit) ->
                gecos:((t, string) Fieldslib.Field.t -> t -> string -> unit) ->
                dir:((t, string) Fieldslib.Field.t -> t -> string -> unit) ->
                shell:((t, string) Fieldslib.Field.t -> t -> string -> unit) ->
                unit
              val fold :
                t ->
                init:'acc__ ->
                name:('acc__ ->
                      (t, string) Fieldslib.Field.t -> t -> string -> 'acc__) ->
                passwd:('acc__ ->
                        (t, string) Fieldslib.Field.t ->
                        t -> string -> 'acc__) ->
                uid:('acc__ ->
                     (t, int) Fieldslib.Field.t -> t -> int -> 'acc__) ->
                gid:('acc__ ->
                     (t, int) Fieldslib.Field.t -> t -> int -> 'acc__) ->
                gecos:('acc__ ->
                       (t, string) Fieldslib.Field.t -> t -> string -> 'acc__) ->
                dir:('acc__ ->
                     (t, string) Fieldslib.Field.t -> t -> string -> 'acc__) ->
                shell:('acc__ ->
                       (t, string) Fieldslib.Field.t -> t -> string -> 'acc__) ->
                'acc__
            end
        end
      val getbyname : string -> t option Import.Deferred.t
      val getbyname_exn : string -> t Import.Deferred.t
      val getbyuid : int -> t option Import.Deferred.t
      val getbyuid_exn : int -> t Import.Deferred.t
      val t_of_sexp : Sexplib.Sexp.t -> t
      val sexp_of_t : t -> Sexplib.Sexp.t
    end
  module Group :
    sig
      type t =
        Unix_syscalls.Group.t = {
        name : string;
        passwd : string;
        gid : int;
        mem : string array;
      }
      val mem : t -> string array
      val gid : t -> int
      val passwd : t -> string
      val name : t -> string
      module Fields :
        sig
          val names : string list
          val mem : (t, string array) Fieldslib.Field.t
          val gid : (t, int) Fieldslib.Field.t
          val passwd : (t, string) Fieldslib.Field.t
          val name : (t, string) Fieldslib.Field.t
          val fold :
            init:'acc__ ->
            name:('acc__ -> (t, string) Fieldslib.Field.t -> 'acc__) ->
            passwd:('acc__ -> (t, string) Fieldslib.Field.t -> 'acc__) ->
            gid:('acc__ -> (t, int) Fieldslib.Field.t -> 'acc__) ->
            mem:('acc__ -> (t, string array) Fieldslib.Field.t -> 'acc__) ->
            'acc__
          val make_creator :
            name:((t, string) Fieldslib.Field.t ->
                  'compile_acc__ -> ('input__ -> string) * 'compile_acc__) ->
            passwd:((t, string) Fieldslib.Field.t ->
                    'compile_acc__ -> ('input__ -> string) * 'compile_acc__) ->
            gid:((t, int) Fieldslib.Field.t ->
                 'compile_acc__ -> ('input__ -> int) * 'compile_acc__) ->
            mem:((t, string array) Fieldslib.Field.t ->
                 'compile_acc__ ->
                 ('input__ -> string array) * 'compile_acc__) ->
            'compile_acc__ -> ('input__ -> t) * 'compile_acc__
          val create :
            name:string -> passwd:string -> gid:int -> mem:string array -> t
          val map :
            name:((t, string) Fieldslib.Field.t -> string) ->
            passwd:((t, string) Fieldslib.Field.t -> string) ->
            gid:((t, int) Fieldslib.Field.t -> int) ->
            mem:((t, string array) Fieldslib.Field.t -> string array) -> t
          val iter :
            name:((t, string) Fieldslib.Field.t -> unit) ->
            passwd:((t, string) Fieldslib.Field.t -> unit) ->
            gid:((t, int) Fieldslib.Field.t -> unit) ->
            mem:((t, string array) Fieldslib.Field.t -> unit) -> unit
          val for_all :
            name:((t, string) Fieldslib.Field.t -> bool) ->
            passwd:((t, string) Fieldslib.Field.t -> bool) ->
            gid:((t, int) Fieldslib.Field.t -> bool) ->
            mem:((t, string array) Fieldslib.Field.t -> bool) -> bool
          val exists :
            name:((t, string) Fieldslib.Field.t -> bool) ->
            passwd:((t, string) Fieldslib.Field.t -> bool) ->
            gid:((t, int) Fieldslib.Field.t -> bool) ->
            mem:((t, string array) Fieldslib.Field.t -> bool) -> bool
          val to_list :
            name:((t, string) Fieldslib.Field.t -> 'elem__) ->
            passwd:((t, string) Fieldslib.Field.t -> 'elem__) ->
            gid:((t, int) Fieldslib.Field.t -> 'elem__) ->
            mem:((t, string array) Fieldslib.Field.t -> 'elem__) ->
            'elem__ list
          val map_poly :
            ([< `Read | `Set_and_create ], t, 'x0) Fieldslib.Field.user ->
            'x0 list
          module Direct :
            sig
              val iter :
                t ->
                name:((t, string) Fieldslib.Field.t -> t -> string -> unit) ->
                passwd:((t, string) Fieldslib.Field.t -> t -> string -> unit) ->
                gid:((t, int) Fieldslib.Field.t -> t -> int -> unit) ->
                mem:((t, string array) Fieldslib.Field.t ->
                     t -> string array -> unit) ->
                unit
              val fold :
                t ->
                init:'acc__ ->
                name:('acc__ ->
                      (t, string) Fieldslib.Field.t -> t -> string -> 'acc__) ->
                passwd:('acc__ ->
                        (t, string) Fieldslib.Field.t ->
                        t -> string -> 'acc__) ->
                gid:('acc__ ->
                     (t, int) Fieldslib.Field.t -> t -> int -> 'acc__) ->
                mem:('acc__ ->
                     (t, string array) Fieldslib.Field.t ->
                     t -> string array -> 'acc__) ->
                'acc__
            end
        end
      val getbyname : string -> t option Import.Deferred.t
      val getbyname_exn : string -> t Import.Deferred.t
      val getbygid : int -> t option Import.Deferred.t
      val getbygid_exn : int -> t Import.Deferred.t
      val t_of_sexp : Sexplib.Sexp.t -> t
      val sexp_of_t : t -> Sexplib.Sexp.t
    end
  val getlogin : unit -> string Import.Deferred.t
  val wordexp :
    (?flags:[ `No_cmd | `Show_err | `Undef ] list ->
     string -> string array Import.Deferred.t)
    Core.Std.Or_error.t
  val wait_on_of_sexp : Sexplib.Sexp.t -> wait_on
  val __wait_on_of_sexp__ : Sexplib.Sexp.t -> wait_on
  val sexp_of_wait_on : wait_on -> Sexplib.Sexp.t
  val error_of_sexp : Sexplib.Sexp.t -> error
  val sexp_of_error : error -> Sexplib.Sexp.t
end