Module Core_kernel__.Set_once

type 'a t
val sexp_of_t : ('a -> Ppx_sexp_conv_lib.Sexp.t) -> 'a t -> Ppx_sexp_conv_lib.Sexp.t

Passes when unset.

include Core_kernel__.Import.Invariant.S1 with type 'a t := 'a t
type 'a t
val invariant : 'a Base__.Invariant_intf.inv -> 'a t Base__.Invariant_intf.inv
val create : Core_kernel__.Import.unit -> _ t
val set : 'a t -> Core_kernel.Source_code_position.t -> 'a -> Core_kernel__.Import.unit Core_kernel.Or_error.t
val set_exn : 'a t -> Core_kernel.Source_code_position.t -> 'a -> Core_kernel__.Import.unit
val set_if_none : 'a t -> Core_kernel.Source_code_position.t -> 'a -> Core_kernel__.Import.unit

set_if_none t here a will do nothing if is_some t, otherwise it will set_exn t here a.

val get : 'a t -> 'a Core_kernel__.Import.option
val get_exn : 'a t -> Core_kernel.Source_code_position.t -> 'a
val is_none : _ t -> Core_kernel__.Import.bool
val is_some : _ t -> Core_kernel__.Import.bool
val iter : 'a t -> f:('a -> Core_kernel__.Import.unit) -> Core_kernel__.Import.unit
module Optional_syntax : Core_kernel.Optional_syntax.S1 with type 'a t := 'a t with type 'a value := 'a Core_kernel__.Import.identity
module Unstable : sig ... end
module Stable : sig ... end