package ecaml

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Ecaml.RefSource

include module type of struct include Core.Ref end
Sourcetype 'a t = 'a Base.Ref.t = {
  1. mutable contents : 'a;
}
include Bin_prot.Binable.S_local1 with type 'a t := 'a t
include Bin_prot.Binable.S1 with type 'a t := 'a t
Sourceval bin_size_t : ('a, 'a t) Bin_prot.Size.sizer1
Sourceval bin_write_t : ('a, 'a t) Bin_prot.Write.writer1
Sourceval bin_read_t : ('a, 'a t) Bin_prot.Read.reader1
Sourceval __bin_read_t__ : ('a, int -> 'a t) Bin_prot.Read.reader1
Sourceval bin_writer_t : ('a, 'a t) Bin_prot.Type_class.S1.writer
Sourceval bin_reader_t : ('a, 'a t) Bin_prot.Type_class.S1.reader
Sourceval bin_t : ('a, 'a t) Bin_prot.Type_class.S1.t
Sourceval bin_size_t__local : ('a, 'a t) Bin_prot.Size.sizer_local1
Sourceval bin_write_t__local : ('a, 'a t) Bin_prot.Write.writer_local1
include Ppx_quickcheck_runtime.Quickcheckable.S1 with type 'a t := 'a t
Sourceval compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
Sourceval compare__local : ('a -> 'a -> int) -> 'a t -> 'a t -> int
Sourceval equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
Sourceval equal__local : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
Sourceval globalize : ('a -> 'a) -> 'a t -> 'a t
include Sexplib0.Sexpable.S1 with type 'a t := 'a t
Sourceval t_of_sexp : (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a t
Sourceval sexp_of_t : ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
Sourceval create : 'a -> 'a t
Sourceval (!) : 'a t -> 'a
Sourceval (:=) : 'a t -> 'a -> unit
Sourceval swap : 'a t -> 'a t -> unit

swap t1 t2 swaps the values in t1 and t2.

Sourceval replace : 'a t -> ('a -> 'a) -> unit

replace t f is t := f !t

Sourceval set_temporarily : 'a t -> 'a -> f:(unit -> 'b) -> 'b

set_temporarily t a ~f sets t to a, calls f (), and then restores t to its value prior to set_temporarily being called, whether f returns or raises.

Sourcemodule And_value = Core.Ref.And_value
Sourceval sets_temporarily : And_value.t list -> f:(unit -> 'a) -> 'a

sets_temporarily [ ...; T (ti, ai); ... ] ~f sets each ti to ai, calls f (), and then restores all ti to their value prior to sets_temporarily being called, whether f returns or raises.

Sourcemodule Permissioned = Core.Ref.Permissioned
Sourceval set_temporarily_async : 'a t -> 'a -> f:(unit -> 'b Async_kernel.Monitor.Deferred.t) -> 'b Async_kernel.Monitor.Deferred.t
OCaml

Innovation. Community. Security.