package core_kernel

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

A 'a Set_once.t is like an 'a option ref that can only be set once. A Set_once.t starts out as None, the first set transitions it to Some, and subsequent sets fail.

type 'a t
include sig ... end
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t

Passes when unset.

include Base.Invariant.S1 with type 'a t := 'a t
val invariant : ('a -> unit) -> 'a t -> unit
val create : Base.Unit.t -> _ t
val set_exn : 'a t -> Source_code_position.t -> 'a -> Base.Unit.t
val get : 'a t -> 'a Base.Option.t
val get_exn : 'a t -> Source_code_position.t -> 'a
val is_none : _ t -> Base.Bool.t
val is_some : _ t -> Base.Bool.t
val iter : 'a t -> f:('a -> Base.Unit.t) -> Base.Unit.t
module Optional_syntax : sig ... end
module Unstable : sig ... end
module Stable : sig ... end
OCaml

Innovation. Community. Security.