Mlsem_lang.MVariablemodule SA = Mlsem_system.Asttype t = Mlsem_common.Variable.tval is_mutable : Mlsem_common.Variable.t -> boolval kind : Mlsem_common.Variable.t -> kindval add_to_env :
Mlsem_common.Variable.t ->
Mlsem_types.TyScheme.t ->
Mlsem_common.Env.t ->
Mlsem_common.Env.tBinds a top-level variable, giving a mutable one the type its declaration fixes rather than the type inferred for its initializer.
val replace_in_env :
Mlsem_common.Variable.t ->
Mlsem_types.TyScheme.t ->
Mlsem_common.Env.t ->
Mlsem_common.Env.tThe four operations a mutable variable is encoded with, on an abstract reference type. Each raises Invalid_argument if the variable is not mutable.
val ref_uninit : Mlsem_common.Variable.t -> SA.eCreation of an uninitialized cell.
val ref_cons : Mlsem_common.Variable.t -> SA.t -> SA.eCreation of a cell holding the given expression.
val ref_get : Mlsem_common.Variable.t -> SA.eRead of the cell.
val ref_assign : Mlsem_common.Variable.t -> SA.t -> SA.eWrite of the given expression into the cell.