Module Core_kernel.Moption

A Moption is a mutable option, like 'a option ref, but with a more efficient implementation; in particular, set_some does not allocate.

type 'a t
include sig ... end
val sexp_of_t : ('a ‑> Sexplib.Sexp.t) ‑> 'a t ‑> Sexplib.Sexp.t
include Core_kernel__.Import.Invariant.S1 with type t := a t
type 'a t
val create : Core_kernel__.Import.unit ‑> _ t
val is_none : _ t ‑> Core_kernel__.Import.bool
val is_some : _ t ‑> Core_kernel__.Import.bool
val get : 'a t ‑> 'a Core_kernel__.Import.option
val get_some_exn : 'a t ‑> 'a
val set : 'a t ‑> 'a Core_kernel__.Import.option ‑> Core_kernel__.Import.unit
val set_none : _ t ‑> Core_kernel__.Import.unit
val set_some : 'a t ‑> 'a ‑> Core_kernel__.Import.unit