1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859(************************************************************************)(* * 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_substtype'adelayed_universes=|PrivateMonomorphicof'a|PrivatePolymorphicofint*Univ.ContextSet.ttypeopaque_proofterm=Constr.t*unitdelayed_universestype'cooking_infoopaque=|Indirectofsubstitutionlist*'cooking_infolist*DirPath.t*int(* subst, discharge, lib, index *)typeopaquetab={opaque_len:int;(** Size of the above map *)opaque_dir:DirPath.t;}letempty_opaquetab={opaque_len=0;opaque_dir=DirPath.initial;}letrepr(Indirect(s,ci,dp,i))=(s,ci,dp,i)letcreatedptab=letid=tab.opaque_leninletopaque_dir=ifDirPath.equaldptab.opaque_dirthentab.opaque_direlseifDirPath.equaltab.opaque_dirDirPath.initialthendpelseCErrors.anomaly(Pp.str"Using the same opaque table for multiple dirpaths.")inletntab={opaque_dir;opaque_len=id+1}inIndirect([],[],dp,id),ntabletsubst_opaquesub=function|Indirect(s,ci,dp,i)->Indirect(sub::s,ci,dp,i)letdischarge_opaqueinfo=function|Indirect(s,ci,dp,i)->assert(CList.is_emptys);Indirect([],info::ci,dp,i)moduleHandleMap=Int.Maptypeopaque_handle=intletrepr_handlei=iletmem_handlei{opaque_len=n;_}=i<n