Structures.StructureA structure S is a non recursive inductive type with a single constructor
type projection = {proj_name : Names.Name.t; | (* field name *) |
proj_true : bool; | (* false = projection for a defined field (letin) *) |
proj_canonical : bool; | (* false = not to be used for CS inference *) |
proj_body : Names.Constant.t option; | (* the projection function *) |
}A projection to a structure field
val make : Environ.env -> Names.inductive -> projection list -> tval register : t -> unitval subst : Mod_subst.substitution -> t -> tval rebuild : Environ.env -> t -> trefreshes nparams, e.g. after section discharging
val find : Environ.env -> Names.inductive -> tfind isp returns the Structure.t associated to the inductive path isp if it corresponds to a structure, otherwise it fails with Not_found
val find_from_projection : Environ.env -> Names.Constant.t -> traise Not_found if not a structure projection
val find_projections : Environ.env -> Names.inductive -> Names.Constant.t option listlookup_projections isp returns the projections associated to the inductive path isp if it corresponds to a structure, otherwise it fails with Not_found
val projection_nparams : Environ.env -> Names.Constant.t -> intraise Not_found if not a projection
val is_projection : Names.Constant.t -> boolval projection_number : Environ.env -> Names.Constant.t -> intprojection_number env p returns the position of the projection p in the structure it corresponds to, counting from 0.