123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566(************************************************************************)(* v * The Coq Proof Assistant / The Coq Development Team *)(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2016 *)(* \VV/ **************************************************************)(* // * This file is distributed under the terms of the *)(* * GNU Lesser General Public License Version 2.1 *)(************************************************************************)(************************************************************************)(* Coq serialization API/Plugin *)(* Copyright 2016 MINES ParisTech *)(************************************************************************)(* Status: Very Experimental *)(************************************************************************)(* open Sexplib.Std *)letcmake=CAst.makemoduleLoc=Ser_locmoduleCAst=Ser_cAstmoduleNames=Ser_namestype_t=Ser_QualidofNames.DirPath.t*Names.Id.t[@@derivingsexp,yojson]let_t_putqid=let(dp,id)=Libnames.repr_qualid(cmakeqid)inSer_Qualid(dp,id)let_t_get(Ser_Qualid(dp,id))=Libnames.(make_qualiddpid).CAst.vtypequalid_r=[%import:Libnames.qualid_r]letqualid_r_of_sexpsexp=_t_get(_t_of_sexpsexp)letsexp_of_qualid_rqid=sexp_of__t(_t_putqid)letqualid_r_of_yojsonjson=Ppx_deriving_yojson_runtime.(_t_of_yojsonjson>|=_t_get)letqualid_r_to_yojsonlevel=_t_to_yojson(_t_putlevel)(* qualid: private *)typequalid=[%import:Libnames.qualid][@@derivingsexp,yojson]moduleFP=structtype_t={dirpath:Names.DirPath.t;basename:Names.Id.t}[@@derivingsexp,yojson]let_t_get{dirpath;basename}=Libnames.make_pathdirpathbasenamelet_t_putfp=letdirpath,basename=Libnames.repr_pathfpin{dirpath;basename}endopenFPtypefull_path=Libnames.full_pathletfull_path_of_sexpsexp=_t_get(_t_of_sexpsexp)letsexp_of_full_pathqid=sexp_of__t(_t_putqid)letfull_path_of_yojsonjson=Ppx_deriving_yojson_runtime.(_t_of_yojsonjson>|=_t_get)letfull_path_to_yojsonlevel=_t_to_yojson(_t_putlevel)