123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284(************************************************************************)(* * 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) *)(************************************************************************)(************************************************************************)(* SerAPI: Coq interaction protocol with bidirectional serialization *)(************************************************************************)(* Copyright 2016-2019 MINES ParisTech -- License LGPL 2.1+ *)(* Copyright 2019-2023 Inria -- License LGPL 2.1+ *)(* Written by: Emilio J. Gallego Arias and others *)(************************************************************************)openSexplib.StdopenPpx_hash_lib.Std.Hash.BuiltinopenPpx_compare_lib.BuiltinopenNamesmoduleInt=Ser_intmoduleCAst=Ser_cAst(************************************************************************)(* Serialization of Names.mli *)(************************************************************************)moduleId=struct(* Id.t: private *)moduleId_=structtypet=Names.Id.ttype_t=Idofstring[@@derivingsexp,yojson,hash,compare]letof_tid=Id(Id.to_stringid)letto_t(Idid)=Id.of_string_softidendmoduleSelf=SerType.Biject(Id_)includeSelfmoduleSet=Ser_cSet.Make(Names.Id.Set)(Self)moduleMap=Ser_cMap.Make(Names.Id.Map)(Self)endmoduleName=struct(* Name.t: public *)typet=[%import:Names.Name.t][@@derivingsexp,yojson,hash,compare]endmoduleDirPath=struct(* DirPath.t: private *)moduleDirPath_=structtypet=Names.DirPath.ttype_t=DirPathofId.tlist[@@derivingsexp,yojson,hash,compare]letof_tdp=DirPath(DirPath.reprdp)letto_t(DirPathdpl)=DirPath.makedplendincludeSerType.Biject(DirPath_)endmoduleDPmap=Ser_cMap.Make(DPmap)(DirPath)moduleLabel=struct(* Label.t: private *)moduleLabel_=structtypet=[%import:Names.Label.t](* XXX: This will miss the tag *)type_t=Id.t[@@derivingsexp,yojson,hash,compare]letto_t=Label.of_idletof_t=Label.to_idendincludeSerType.Biject(Label_)endmoduleMBId=struct(* MBId.t: private *)moduleMBIdBij=structtypet=[%import:Names.MBId.t]type_t=Mbidofint*Id.t*DirPath.t[@@derivingsexp,yojson,hash,compare]endincludeSerType.Pierce(MBIdBij)endmoduleModPath=struct(* ModPath.t: public *)typet=[%import:Names.ModPath.t][@@derivingsexp,yojson,hash,compare]endmoduleMPmap=Ser_cMap.Make(MPmap)(ModPath)(* KerName: private *)moduleKerName=structtypet=[%import:Names.KerName.t]type_t=KerNameofModPath.t*Label.t[@@derivingsexp,yojson,hash,compare]let_t_putkn=letmp,l=KerName.reprkninKerName(mp,l)let_kername_get(KerName(mp,l))=KerName.makempllett_of_sexpsexp=_kername_get(_t_of_sexpsexp)letsexp_of_tkn=sexp_of__t(_t_putkn)letof_yojsonjson=Ppx_deriving_yojson_runtime.(_t_of_yojsonjson>|=_kername_get)letto_yojsonkn=_t_to_yojson(_t_putkn)lethash x=hash__t(_t_putx)lethash_fold_tstid=hash_fold__tst(_t_putid)letcomparexy=compare__t(_t_putx)(_t_puty)letequal=KerName.equalendmoduleKNmap=Ser_cMap.Make(Names.KNmap)(KerName)moduleConstant=struct(* Constant.t: private *)typet=[%import:Names.Constant.t]type_t=ConstantofKerName.t*KerName.toption[@@derivingsexp,yojson,hash,compare]let_t_putcs=letcu,cc=Constant.(usercs,canonicalcs)inifKerName.equalcuccthenConstant(cu,None)elseConstant(cu,Somecc)let_t_get=function|Constant(cu,None)->Constant.make1cu|Constant(cu,Somecc)->Constant.makecucclett_of_sexpsexp=_t_get(_t_of_sexpsexp)letsexp_of_tdp=sexp_of__t(_t_putdp)letof_yojsonjson=Ppx_deriving_yojson_runtime.(_t_of_yojsonjson>|=_t_get)letto_yojsonlevel=_t_to_yojson(_t_putlevel)lethashx=hash__t(_t_putx)lethash_fold_tstid=hash_fold__tst(_t_putid)letcomparexy=compare__t(_t_putx)(_t_puty)endmoduleCset_env=Ser_cSet.Make(Cset_env)(Constant)moduleCmap=Ser_cMap.Make(Cmap)(Constant)moduleCmap_env=Ser_cMap.Make(Cmap_env)(Constant)moduleMutInd=struct(* MutInd.t: private *)moduleBijectSpec=structtypet=[%import:Names.MutInd.t]type_t=MutIndofKerName.t*KerName.toption[@@derivingsexp,yojson,hash,compare]letof_t cs=letcu,cc=MutInd.(usercs,canonicalcs)inifKerName.equalcuccthenMutInd(cu,None)elseMutInd(cu,Somecc)letto_t=function|MutInd(cu,None)->MutInd.make1cu|MutInd(cu,Somecc)->MutInd.makecuccendincludeSerType.Biject(BijectSpec)endmoduleMindmap=Ser_cMap.Make(Mindmap)(MutInd)moduleMindmap_env=Ser_cMap.Make(Mindmap_env)(MutInd)type'atableKey=[%import:'aNames.tableKey][@@derivingsexp]typevariable=[%import:Names.variable][@@derivingsexp,yojson,hash,compare](* Inductive and constructor = public *)moduleInd=structtypet=[%import:Names.Ind.t][@@derivingsexp,yojson,hash,compare]endmoduleIndset_env=Ser_cSet.Make(Indset_env)(Ind)moduleIndmap_env=Ser_cMap.Make(Indmap_env)(Ind)typeinductive=[%import:Names.inductive][@@derivingsexp,yojson,hash,compare]moduleConstruct=structtypet=[%import:Names.Construct.t][@@derivingsexp,yojson,hash,compare]endtypeconstructor=[%import:Names.constructor][@@derivingsexp,yojson,hash,compare](* Projection: private *)moduleProjection=structmoduleRepr=structmodulePierceSpec=structtypet=Names.Projection.Repr.ttype_t={proj_ind:inductive;proj_relevant:bool;proj_npars:int;proj_arg:int;proj_name:Label.t}[@@derivingsexp,yojson,hash,compare]endincludeSerType.Pierce(PierceSpec)endmodulePierceSpec=structtypet=[%import:Names.Projection.t]type_t=Repr.t*bool[@@derivingsexp,yojson,hash,compare]endincludeSerType.Pierce(PierceSpec)endmoduleGlobRef=structtypet=[%import:Names.GlobRef.t][@@derivingsexp,yojson,hash,compare]end(* Evaluable global reference: public *)(* type evaluable_global_reference =
* [%import: Names.evaluable_global_reference]
* [@@deriving sexp] *)typelident=[%import:Names.lident][@@derivingsexp,yojson,hash,compare]typelname=[%import:Names.lname][@@derivingsexp,yojson,hash,compare]typelstring=[%import:Names.lstring][@@derivingsexp,yojson,hash,compare]