sig
  module Z :
    sig
      type 'a t = [ `Eof | `Ok of 'a ]
      val __t_of_sexp__ : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.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
      val bin_size_t : ('-> int) -> [> `Ok of 'a ] -> int
      val bin_write_t_ :
        (Core.Std.Bin_prot.Unsafe_common.sptr ->
         Core.Std.Bin_prot.Unsafe_common.eptr ->
         '-> Core.Std.Bin_prot.Unsafe_common.sptr) ->
        Core.Std.Bin_prot.Unsafe_common.sptr ->
        Core.Std.Bin_prot.Unsafe_common.eptr ->
        [< `Eof | `Ok of 'a ] -> Core.Std.Bin_prot.Unsafe_common.sptr
      val bin_write_t :
        (Core.Std.Bin_prot.Unsafe_common.sptr ->
         Core.Std.Bin_prot.Unsafe_common.eptr ->
         '-> Core.Std.Bin_prot.Unsafe_common.sptr) ->
        Core.Std.Bin_prot.Common.buf ->
        pos:Core.Std.Bin_prot.Common.pos ->
        [< `Eof | `Ok of 'a ] -> Core.Std.Bin_prot.Common.pos
      val bin_writer_t :
        'Core.Std.Bin_prot.Type_class.writer ->
        [< `Eof | `Ok of 'a > `Ok ] Core.Std.Bin_prot.Type_class.writer
      val bin_read_t__ :
        ('-> '-> 'c) -> '-> '-> int -> [> `Eof | `Ok of 'c ]
      val bin_read_t_ :
        (Core.Std.Bin_prot.Unsafe_common.sptr_ptr ->
         Core.Std.Bin_prot.Unsafe_common.eptr -> 'a) ->
        Core.Std.Bin_prot.Unsafe_common.sptr_ptr ->
        Core.Std.Bin_prot.Unsafe_common.eptr -> [> `Eof | `Ok of 'a ]
      val bin_read_t :
        (Core.Std.Bin_prot.Unsafe_common.sptr_ptr ->
         Core.Std.Bin_prot.Unsafe_common.eptr -> 'a) ->
        Core.Std.Bin_prot.Common.buf ->
        pos_ref:Core.Std.Bin_prot.Common.pos Pervasives.ref ->
        'Reader0.Read_result.Z.t
      val bin_reader_t :
        'Core.Std.Bin_prot.Type_class.reader ->
        'Reader0.Read_result.Z.t Core.Std.Bin_prot.Type_class.reader
      val bin_t :
        'Core.Std.Bin_prot.Type_class.t ->
        'Reader0.Read_result.Z.t Core.Std.Bin_prot.Type_class.t
      val bind : [< `Eof | `Ok of 'a ] -> ('-> ([> `Eof ] as 'b)) -> 'b
      val return : '-> [> `Ok of 'a ]
    end
  type 'a t = [ `Eof | `Ok of 'a ]
  val __t_of_sexp__ : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.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
  val bin_size_t : ('-> int) -> [> `Ok of 'a ] -> int
  val bin_write_t_ :
    (Core.Std.Bin_prot.Unsafe_common.sptr ->
     Core.Std.Bin_prot.Unsafe_common.eptr ->
     '-> Core.Std.Bin_prot.Unsafe_common.sptr) ->
    Core.Std.Bin_prot.Unsafe_common.sptr ->
    Core.Std.Bin_prot.Unsafe_common.eptr ->
    [< `Eof | `Ok of 'a ] -> Core.Std.Bin_prot.Unsafe_common.sptr
  val bin_write_t :
    (Core.Std.Bin_prot.Unsafe_common.sptr ->
     Core.Std.Bin_prot.Unsafe_common.eptr ->
     '-> Core.Std.Bin_prot.Unsafe_common.sptr) ->
    Core.Std.Bin_prot.Common.buf ->
    pos:Core.Std.Bin_prot.Common.pos ->
    [< `Eof | `Ok of 'a ] -> Core.Std.Bin_prot.Common.pos
  val bin_writer_t :
    'Core.Std.Bin_prot.Type_class.writer ->
    [< `Eof | `Ok of 'a > `Ok ] Core.Std.Bin_prot.Type_class.writer
  val bin_read_t__ :
    ('-> '-> 'c) -> '-> '-> int -> [> `Eof | `Ok of 'c ]
  val bin_read_t_ :
    (Core.Std.Bin_prot.Unsafe_common.sptr_ptr ->
     Core.Std.Bin_prot.Unsafe_common.eptr -> 'a) ->
    Core.Std.Bin_prot.Unsafe_common.sptr_ptr ->
    Core.Std.Bin_prot.Unsafe_common.eptr -> [> `Eof | `Ok of 'a ]
  val bin_read_t :
    (Core.Std.Bin_prot.Unsafe_common.sptr_ptr ->
     Core.Std.Bin_prot.Unsafe_common.eptr -> 'a) ->
    Core.Std.Bin_prot.Common.buf ->
    pos_ref:Core.Std.Bin_prot.Common.pos ref -> 'a t
  val bin_reader_t :
    'Core.Std.Bin_prot.Type_class.reader ->
    'a t Core.Std.Bin_prot.Type_class.reader
  val bin_t :
    'Core.Std.Bin_prot.Type_class.t -> 'a t Core.Std.Bin_prot.Type_class.t
  val bind : [< `Eof | `Ok of 'a ] -> ('-> ([> `Eof ] as 'b)) -> 'b
  val return : '-> [> `Ok of 'a ]
  val ( >>= ) : 'a t -> ('-> 'b t) -> 'b t
  val ( >>| ) : 'a t -> ('-> 'b) -> 'b t
  module Monad_infix :
    sig
      val ( >>= ) : 'a t -> ('-> 'b t) -> 'b t
      val ( >>| ) : 'a t -> ('-> 'b) -> 'b t
    end
  val bind : 'a t -> ('-> 'b t) -> 'b t
  val return : '-> 'a t
  val map : 'a t -> f:('-> 'b) -> 'b t
  val join : 'a t t -> 'a t
  val ignore : 'a t -> unit t
  val all : 'a t list -> 'a list t
  val all_ignore : unit t list -> unit t
end