sig
  module Key :
    sig
      type t = [ `Read | `Write ]
      val flip : Read_write.Key.t -> Read_write.Key.t
      val t_of_sexp : Sexplib.Sexp.t -> Read_write.Key.t
      val __t_of_sexp__ : Sexplib.Sexp.t -> Read_write.Key.t
      val sexp_of_t : Read_write.Key.t -> Sexplib.Sexp.t
    end
  type ('a, +'z) any = private { mutable read : 'a; mutable write : 'a; }
  module Immutable :
    sig
      type 'a t = ('a, Core.Std.immutable) Read_write.any
      val t_of_sexp :
        (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'Read_write.Immutable.t
      val sexp_of_t :
        ('-> Sexplib.Sexp.t) -> 'Read_write.Immutable.t -> Sexplib.Sexp.t
    end
  module Read_only :
    sig
      type 'a t = ('a, Core.Std.read_only) Read_write.any
      val t_of_sexp :
        (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'Read_write.Read_only.t
      val sexp_of_t :
        ('-> Sexplib.Sexp.t) -> 'Read_write.Read_only.t -> Sexplib.Sexp.t
    end
  module Mutable :
    sig
      type 'a t = ('a, Core.Std.read_write) Read_write.any
      val t_of_sexp :
        (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'Read_write.Mutable.t
      val sexp_of_t :
        ('-> Sexplib.Sexp.t) -> 'Read_write.Mutable.t -> Sexplib.Sexp.t
    end
  type 'a t = 'Read_write.Immutable.t
  val create : read:'-> write:'-> ('a, 'b) Read_write.any
  val createi : (Read_write.Key.t -> 'a) -> ('a, 'b) Read_write.any
  val create_both : '-> ('a, 'b) Read_write.any
  val create_fn : (unit -> 'a) -> ('a, 'b) Read_write.any
  val create_with :
    Read_write.Key.t -> '-> zero:'-> ('a, 'b) Read_write.any
  val copy : ('a, 'b) Read_write.any -> ('a, 'c) Read_write.any
  val exists : ('a, 'b) Read_write.any -> f:('-> bool) -> bool
  val for_all : ('a, 'b) Read_write.any -> f:('-> bool) -> bool
  val iteri :
    ('a, 'b) Read_write.any -> f:(Read_write.Key.t -> '-> unit) -> unit
  val iter : ('a, 'b) Read_write.any -> f:('-> unit) -> unit
  val mapi :
    ('a, 'c) Read_write.any ->
    f:(Read_write.Key.t -> '-> 'b) -> ('b, 'd) Read_write.any
  val map :
    ('a, 'c) Read_write.any -> f:('-> 'b) -> ('b, 'd) Read_write.any
  val foldi :
    ('a, 'c) Read_write.any ->
    '-> f:('-> Read_write.Key.t * '-> 'b) -> 'b
  val fold : ('a, 'c) Read_write.any -> '-> f:('-> '-> 'b) -> 'b
  val get : ('a, 'b) Read_write.any -> Read_write.Key.t -> 'a
  val replace :
    'Read_write.Mutable.t -> Read_write.Key.t -> f:('-> 'a) -> unit
  val replace_all :
    'Read_write.Mutable.t -> f:(Read_write.Key.t -> '-> 'a) -> unit
  val set : 'Read_write.Mutable.t -> Read_write.Key.t -> '-> unit
  module Export :
    sig
      type ('a, 'z) read_write_ =
        ('a, 'z) Read_write.any = private {
        mutable read : 'a;
        mutable write : 'a;
      }
    end
  val any_of_sexp :
    (Sexplib.Sexp.t -> 'a) ->
    (Sexplib.Sexp.t -> 'z) -> Sexplib.Sexp.t -> ('a, 'z) Read_write.any
  val sexp_of_any :
    ('-> Sexplib.Sexp.t) ->
    ('-> Sexplib.Sexp.t) -> ('a, 'z) Read_write.any -> Sexplib.Sexp.t
  val t_of_sexp : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'Read_write.t
  val sexp_of_t : ('-> Sexplib.Sexp.t) -> 'Read_write.t -> Sexplib.Sexp.t
end