123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103(************************************************************************)(* * The Coq Proof Assistant / The Coq 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) *)(************************************************************************)openNamesopenMod_substopenGenargmoduleStore=Store.Make()typeintern_variable_status={intern_ids:Id.Set.t;notation_variable_status:(boolref*Notation_term.subscopesoptionref*Notation_term.notation_var_internalization_type)Id.Map.t}typeglob_sign={ltacvars:Id.Set.t;genv:Environ.env;extra:Store.t;intern_sign:intern_variable_status;}letempty_intern_sign={intern_ids=Id.Set.empty;notation_variable_status=Id.Map.empty;}letempty_glob_signenv={ltacvars=Id.Set.empty;genv=env;extra=Store.empty;intern_sign=empty_intern_sign;}(** 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.constr_patterntype('raw,'glb)intern_fun=glob_sign->'raw->glob_sign*'glbtype'glbsubst_fun=substitution->'glb->'glbtype'glbntn_subst_fun=glob_constr_and_exprId.Map.t->'glb->'glbmoduleInternObj=structtype('raw,'glb,'top)obj=('raw,'glb)intern_funletname="intern"letdefault_=NoneendmoduleSubstObj=structtype('raw,'glb,'top)obj='glbsubst_funletname="subst"letdefault_=NoneendmoduleNtnSubstObj=structtype('raw,'glb,'top)obj='glbntn_subst_funletname="notation_subst"letdefault_=NoneendmoduleIntern=Register(InternObj)moduleSubst=Register(SubstObj)moduleNtnSubst=Register(NtnSubstObj)letintern=Intern.objletregister_intern0=Intern.register0letgeneric_internist(GenArg(Rawwitwit,v))=let(ist,v)=internwitistvin(ist,in_gen(glbwitwit)v)(** Substitution functions *)letsubstitute=Subst.objletregister_subst0=Subst.register0letgeneric_substitutesubs(GenArg(Glbwitwit,v))=in_gen(glbwitwit)(substitutewitsubsv)let()=Hook.setDetyping.subst_genarg_hookgeneric_substitute(** Notation substitution *)letsubstitute_notation=NtnSubst.objletregister_ntn_subst0=NtnSubst.register0letgeneric_substitute_notationenv(GenArg(Glbwitwit,v))=letv=substitute_notationwitenvvinin_gen(glbwitwit)v