Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file ser_names.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252(************************************************************************)(* * The Coq Proof Assistant / The Coq Development Team *)(* v * INRIA, CNRS and contributors - Copyright 1999-2018 *)(* <O___,, * (see CREDITS file for the list of authors) *)(* \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) *)(************************************************************************)(************************************************************************)(* Coq serialization API/Plugin *)(* Copyright 2016-2018 MINES ParisTech -- Dual License LGPL 2.1 / GPL3+ *)(* Written by: Emilio J. Gallego Arias *)(************************************************************************)(* Status: Very Experimental *)(************************************************************************)openSexplib.StdopenNamesmoduleInt=Ser_intmoduleCAst=Ser_cAst(************************************************************************)(* Serialization of Names.mli *)(************************************************************************)(* Id.t: private *)moduleId=structmoduleSelf=structtypet=[%import:Names.Id.t]type_t=Idofstring[@@derivingsexp,yojson]let_t_putid=Id(Id.to_stringid)let_t_get(Idid)=Id.of_string_softidlett_of_sexpsexp=_t_get(_t_of_sexpsexp)letsexp_of_tid=sexp_of__t(_t_putid)letof_yojsonjson=Ppx_deriving_yojson_runtime.(_t_of_yojsonjson>|=_t_get)letto_yojsonlevel=_t_to_yojson(_t_putlevel)endincludeSelfmoduleSet=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]endmoduleDirPath=struct(* DirPath.t: private *)typet=[%import:Names.DirPath.t]type_t=DirPathofId.tlist[@@derivingsexp,yojson]let_t_putdp=DirPath(DirPath.reprdp)let_t_get(DirPathdpl)=DirPath.makedpllett_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)endmoduleLabel=struct(* Label.t: private *)typet=[%import:Names.Label.t](* XXX: This will miss the tag *)lett_of_sexpsexp=Label.of_id(Id.t_of_sexpsexp)letsexp_of_tlabel=Id.sexp_of_t(Label.to_idlabel)letof_yojsonjson=Ppx_deriving_yojson_runtime.(Id.of_yojsonjson>|=Label.of_id)letto_yojsonlevel=Id.to_yojson(Label.to_idlevel)endmoduleMBId=struct(* MBId.t: private *)typet=[%import:Names.MBId.t]type_t=Mbidofint*Id.t*DirPath.t[@@derivingsexp,yojson]let_t_putdp=leti,n,dp=MBId.reprdpinMbid(i,n,dp)let_t_get(Mbid(i,n,dp))=Obj.magic(i,n,dp)lett_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)endmoduleModPath=struct(* ModPath.t: public *)typet=[%import:Names.ModPath.t][@@derivingsexp,yojson]endmoduleMPmap=Ser_cMap.Make(MPmap)(ModPath)(* KerName: private *)moduleKerName=structtypet=[%import:Names.KerName.t]type_kername=KerNameofModPath.t*Label.t[@@derivingsexp]let_kername_putkn=letmp,l=KerName.reprkninKerName(mp,l)let_kername_get(KerName(mp,l))=KerName.makempllett_of_sexpsexp=_kername_get(_kername_of_sexpsexp)letsexp_of_tdp=sexp_of__kername(_kername_putdp)endmoduleConstant=struct(* Constant.t: private *)typet=[%import:Names.Constant.t]type_t=ConstantofModPath.t*Label.t[@@derivingsexp,yojson]let_t_putcs=letmp,l=Constant.repr2csinConstant(mp,l)let_t_get(Constant(mp,l))=Constant.make2mpllett_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)endmoduleCmap=Ser_cMap.Make(Cmap)(Constant)moduleCmap_env=Ser_cMap.Make(Cmap_env)(Constant)moduleMutInd=struct(* MutInd.t: private *)typet=[%import:Names.MutInd.t]type_t=MutIndofModPath.t*Label.t[@@derivingsexp,yojson]let_t_putcs=letmp,l=MutInd.repr2csinMutInd(mp,l)let_t_get(MutInd(mp,l))=MutInd.make2mpllett_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)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](* Inductive and constructor = public *)typeinductive=[%import:Names.inductive][@@derivingsexp,yojson]typeconstructor=[%import:Names.constructor][@@derivingsexp,yojson](* Projection: private *)moduleProjection=structmoduleRepr=structtypet={proj_ind:inductive;proj_npars:int;proj_arg:int;proj_name:Label.t;}[@@derivingsexp,yojson]endtype_t=Repr.t*bool[@@derivingsexp,yojson]typet=[%import:Names.Projection.t]lett_of_sexpse=Obj.magic(_t_of_sexpse)letsexp_of_tdp=sexp_of__t(Obj.magicdp)letof_yojsonjson=Ppx_deriving_yojson_runtime.(_t_of_yojsonjson>|=Obj.magic)letto_yojsonlevel=_t_to_yojson(Obj.magiclevel)endmoduleGlobRef=structtypet=[%import:Names.GlobRef.t][@@derivingsexp,yojson]end(* Evaluable global reference: public *)typeevaluable_global_reference=[%import:Names.evaluable_global_reference][@@derivingsexp]typelident=[%import:Names.lident][@@derivingsexp,yojson]typelname=[%import:Names.lname][@@derivingsexp,yojson]typelstring=[%import:Names.lstring][@@derivingsexp,yojson]