You can search for identifiers within the package.
in-package search v0.2.0
Source file genintern.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151(************************************************************************)(* * The Rocq Prover / The Rocq Development Team *)(* v * Copyright INRIA, CNRS and contributors *)(* <O___,, * (see version control and CREDITS file for authors & dates) *)(* \VV/ **************************************************************)(* // * This file is distributed under the terms of the *)(* * GNU Lesser General Public License Version 2.1 *)(* * (see LICENSE file for the text of the license) *)(************************************************************************)openNamesopenGenargmoduleStore=Store.Make()typentnvar_status={mutablentnvar_used:boollist;mutablentnvar_used_as_binder:bool;mutablentnvar_scopes:Notation_term.subscopesoption;mutablentnvar_binding_ids:Notation_term.notation_var_bindersoption;ntnvar_typ:Notation_term.notation_var_internalization_type;}typeintern_variable_status={intern_ids:Id.Set.t;intern_univs:UnivNames.universe_binders;notation_variable_status:ntnvar_statusId.Map.t;}typeglob_sign={ltacvars:Id.Set.t;genv:Environ.env;extra:Store.t;intern_sign:intern_variable_status;strict_check:bool;}letempty_intern_signunivs={intern_ids=Id.Set.empty;intern_univs=univs;notation_variable_status=Id.Map.empty;}letempty_glob_sign~strictenvunivs={ltacvars=Id.Set.empty;genv=env;extra=Store.empty;intern_sign=empty_intern_signunivs;strict_check=strict;}(** In globalize tactics, we need to keep the initial [constr_expr] to recompute
in the environment by the effective calls to Intro, Inversion, etc
The [constr_expr] field is [None] in TacDef though *)typeglob_constr_and_expr=Glob_term.glob_constr*Constrexpr.constr_exproptiontypeglob_constr_pattern_and_expr=Id.Set.t*glob_constr_and_expr*Pattern.uninstantiated_patterntype('raw,'glb)intern_fun=glob_sign->'raw->glob_sign*'glbtype'glbntn_subst_fun=ntnvar_statusId.Map.t->(Id.t->Glob_term.glob_constroption)->'glb->'glbmoduleInternObj=structtype('raw,'glb,'top)obj=('raw,'glb)intern_funletname="intern"letdefault_=Noneendtype('raw,'glb)constr_intern_fun=?loc:Loc.t->glob_sign->'raw->'glbmoduleCInternObj=structtype('r,'g)t=('r,'g)constr_intern_funendmoduleNtnSubstObj=structtype(_,'glb)t='glbntn_subst_funendmoduleIntern=Register(InternObj)moduleCIntern=GenConstr.Register(CInternObj)moduleNtnSubst=GenConstr.Register(NtnSubstObj)letintern=Intern.objletregister_intern0=Intern.register0letregister_intern_constr=CIntern.registerletgeneric_internist(GenArg(Rawwitwit,v))=let(ist,v)=internwitistvin(ist,in_gen(glbwitwit)v)letgeneric_intern_constr?locist(GenConstr.Raw(tag,v))=letinternf=CIntern.gettaginGenConstr.Glb(tag,internf?locistv)moduleInternPatObj=structtype('raw,'glb)t=('raw,'glb)constr_intern_funendmoduleInternPat=GenConstr.Register(InternPatObj)letregister_intern_pat=InternPat.registerletgeneric_intern_pat?locist(GenConstr.Raw(tag,v))=matchInternPat.find_opttagwith|None->letname=GenConstr.reprtaginCErrors.user_err?locPp.(str"This quotation is not supported in tactic patterns ("++strname++str").")|Someinternf->letv=internf?locistvinGenConstr.Glb(tag,v)(** Notation substitution *)letsubstitute_notation=NtnSubst.getletregister_ntn_subst0=NtnSubst.registerletgeneric_substitute_notationavoidenv(GenConstr.Glb(tag,v)asorig)=letv'=substitute_notationtagavoidenvvinifv'==vthenorigelseGlb(tag,v')letwith_used_ntnvarsntnvarsf=let()=Id.Map.iter(fun_status->status.ntnvar_used<-false::status.ntnvar_used)ntnvarsinmatchf()with|v->letused=Id.Map.fold(funidstatusacc->matchstatus.ntnvar_usedwith|[]->assertfalse|false::rest->status.ntnvar_used<-rest;acc|true::rest->letrest=matchrestwith|[]|true::_->rest|false::rest->true::restinstatus.ntnvar_used<-rest;Id.Set.addidacc)ntnvarsId.Set.emptyinused,v|exceptione->lete=Exninfo.captureeinlet()=Id.Map.iter(fun_status->status.ntnvar_used<-List.tlstatus.ntnvar_used)ntnvarsinExninfo.iraiseeletcreate_uniform_genconstrname=lettag=GenConstr.createnameinlet()=register_intern_constrtag(fun?loc_v->v)inlet()=Gensubst.register_constr_substtag(fun_v->v)intag