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 -> 'a Read_write.Immutable.t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a 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 -> 'a Read_write.Read_only.t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a 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 -> 'a Read_write.Mutable.t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a Read_write.Mutable.t -> Sexplib.Sexp.t
end
type 'a t = 'a Read_write.Immutable.t
val create : read:'a -> write:'a -> ('a, 'b) Read_write.any
val createi : (Read_write.Key.t -> 'a) -> ('a, 'b) Read_write.any
val create_both : 'a -> ('a, 'b) Read_write.any
val create_fn : (unit -> 'a) -> ('a, 'b) Read_write.any
val create_with :
Read_write.Key.t -> 'a -> zero:'a -> ('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:('a -> bool) -> bool
val for_all : ('a, 'b) Read_write.any -> f:('a -> bool) -> bool
val iteri :
('a, 'b) Read_write.any -> f:(Read_write.Key.t -> 'a -> unit) -> unit
val iter : ('a, 'b) Read_write.any -> f:('a -> unit) -> unit
val mapi :
('a, 'c) Read_write.any ->
f:(Read_write.Key.t -> 'a -> 'b) -> ('b, 'd) Read_write.any
val map :
('a, 'c) Read_write.any -> f:('a -> 'b) -> ('b, 'd) Read_write.any
val foldi :
('a, 'c) Read_write.any ->
'b -> f:('b -> Read_write.Key.t * 'a -> 'b) -> 'b
val fold : ('a, 'c) Read_write.any -> 'b -> f:('b -> 'a -> 'b) -> 'b
val get : ('a, 'b) Read_write.any -> Read_write.Key.t -> 'a
val replace :
'a Read_write.Mutable.t -> Read_write.Key.t -> f:('a -> 'a) -> unit
val replace_all :
'a Read_write.Mutable.t -> f:(Read_write.Key.t -> 'a -> 'a) -> unit
val set : 'a Read_write.Mutable.t -> Read_write.Key.t -> 'a -> 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 :
('a -> Sexplib.Sexp.t) ->
('z -> Sexplib.Sexp.t) -> ('a, 'z) Read_write.any -> Sexplib.Sexp.t
val t_of_sexp : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a Read_write.t
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a Read_write.t -> Sexplib.Sexp.t
end