Synint.LFRight-hand side of the turnstile for meta-types
Meta-types
and ctyp_decl = | Decl of {name : Syncom.Name.t;typ : ctyp;plicity : Syncom.Plicity.t;inductivity : Syncom.Inductivity.t;}| DeclOpt of {name : Syncom.Name.t;plicity : Syncom.Plicity.t;}and typ = | Atom of Syncom.Location.t * Syncom.Id.cid_typ * spine| PiTyp of typ_decl * Syncom.Depend.t * Syncom.Plicity.t * typ| Sigma of typ_rec| TClo of typ * suband normal = | Lam of Syncom.Location.t * Syncom.Name.t * normal| Root of Syncom.Location.t * head * spine * Syncom.Plicity.t| LFHole of Syncom.Location.t * Syncom.HoleId.t * Syncom.HoleId.name| Clo of normal * sub| Tuple of Syncom.Location.t * tupleand head = | BVar of Syncom.Id.offset| Const of Syncom.Id.cid_term| MMVar of mm_var_inst| MPVar of mm_var_inst| MVar of cvar * sub| PVar of Syncom.Id.offset * sub| AnnH of head * typ| Proj of head * int| FVar of Syncom.Name.t| FMVar of fvarsub| FPVar of fvarsub| HClo of Syncom.Id.offset * Syncom.Id.offset * sub| HMClo of Syncom.Id.offset * mm_var_instand fvarsub = Syncom.Name.t * suband sub = | Shift of Syncom.Id.offset| SVar of Syncom.Id.offset * int * sub| FSVar of Syncom.Id.offset * fvarsub| Dot of front * sub| MSVar of Syncom.Id.offset * mm_var_inst| EmptySub| Undefsand mm_var = {name : Syncom.Name.t;instantiation : iterm option Stdlib.ref;cD : mctx;mmvar_id : int;typ : ctyp;constraints : cnstr list Stdlib.ref;plicity : Syncom.Plicity.t;inductivity : Syncom.Inductivity.t;}and mm_var_inst = mm_var_inst' * suband cnstr = constrnt Stdlib.refand dctx_hat = ctx_var option * Syncom.Id.offsetval map_plicity : (Syncom.Plicity.t -> Syncom.Plicity.t) -> normal -> normalHelper for forming TClo LF types, which avoids doing so if the substitution is the identity.
val mm_var_inst : mm_var -> msub -> sub -> mm_var_instForms an MMVar instantiation by attaching an LF substitution and a meta-substituation to the variable.
val is_mmvar_instantiated : mm_var -> boolval rename_ctyp_decl :
(Syncom.Name.t -> Syncom.Name.t) ->
ctyp_decl ->
ctyp_declEmbeds a head into a normal by using an empty spine. Very useful for constructing variables as normals. Note that the normal will have a ghost location, as heads don't carry a location.
val mmvar : mm_var_inst -> headval mpvar : mm_var_inst -> headval require_decl :
ctyp_decl ->
Syncom.Name.t * ctyp * Syncom.Plicity.t * Syncom.Inductivity.tAssert that the contextual type declaration be a real Decl, and not a DeclOpt. Raises a violation if it is a DeclOpt.
val null_hat : dctx_hatval loc_of_normal : normal -> Syncom.Location.tval blockLength : typ_rec -> intval getIndex : typ_rec -> Syncom.Name.t -> intval is_explicit : ctyp_decl -> boolval name_of_ctyp_decl : ctyp_decl -> Syncom.Name.tval variable_of_mfront :
mfront ->
(Syncom.Id.offset * Syncom.Id.offset option) optionDecides whether the given mfront is a variable, viz. projection of a pattern variable, metavariable, or context variable. Returns the offset of the variable, and optionally the projection offset.
val get_constraint_id : constrnt -> constrnt_id