jon.recoil.org

Module Typemode

val transl_mode_annots : Parsetree.modes -> Mode.Alloc.Const.Option.t

Interpret mode syntax as mode annotation, where axes can be left unspecified

val untransl_mode_annots : Mode.Alloc.Const.Option.t -> Parsetree.modes
val transl_alloc_mode : Parsetree.modes -> Mode.Alloc.Const.t

Interpret mode syntax as alloc mode (on arrow types), where axes are set to legacy if unspecified

Interpret mode syntax as modalities. Modalities occuring at different places requires different levels of maturity. Also takes the mutability and attributes on the field and insert mutable-implied modalities accordingly.

val let_mutable_modalities : Mode.Modality.Const.t
val atomic_mutable_modalities : Mode.Modality.Const.t

The (default) modalities for an atomic mutable field

Un-interpret modalities back to parsetree. Takes the mutability and attributes on the field and remove mutable-implied modalities accordingly.

val transl_mod_bounds : Parsetree.modes -> Types.Jkind_mod_bounds.t

Interpret a mod-bounds.

val untransl_mod_bounds : Types.Jkind_mod_bounds.t -> Parsetree.modes
val idx_expected_modalities : mut:bool -> Mode.Modality.Const.t