123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167(************************************************************************)(* 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 *)(************************************************************************)openSexplibopenSexplib.ConvmoduleStdlib=Ser_stdlibmoduleNames=Ser_namesmoduleRawLevel=structmoduleUGlobal=structtypet=Names.DirPath.t*int[@@derivingsexp,yojson]endtypet=|SProp|Prop|Set|LevelofUGlobal.t|Varofint[@@derivingsexp,yojson]endmoduleLevel=structtype_t={hash:int;data:RawLevel.t}[@@derivingsexp,yojson]typet=Univ.Level.tlett_of_sexpsexp=Obj.magic(_t_of_sexpsexp)letsexp_of_tlevel=sexp_of__t(Obj.magiclevel)letof_yojsonjson=Ppx_deriving_yojson_runtime.(_t_of_yojsonjson>|=Obj.magic)letto_yojsonlevel=_t_to_yojsonObj.(magiclevel)endmoduleLSet=Ser_cSet.Make(Univ.LSet)(Level)(* XXX: Think what to do with this *)moduleUniverse=structtypet=[%import:Univ.Universe.t]type_t=(Level.t*int)list[@@derivingsexp,yojson]lett_of_sexpsexp=Obj.magic(_t_of_sexpsexp)letsexp_of_tuniverse=sexp_of__t(Obj.magicuniverse)letof_yojsonjson=Ppx_deriving_yojson_runtime.(_t_of_yojsonjson>|=Obj.magic)letto_yojsonlevel=_t_to_yojsonObj.(magiclevel)end(*************************************************************************)moduleVariance=structtypet=[%import:Univ.Variance.t][@@derivingsexp]endmoduleInstance=structtypet=[%import:Univ.Instance.t]type_t=InstanceofLevel.tarray[@@derivingsexp,yojson]let_instance_putinstance=Instance(Univ.Instance.to_arrayinstance)let_instance_get(Instanceinstance)=Univ.Instance.of_arrayinstancelett_of_sexpsexp=_instance_get(_t_of_sexpsexp)letsexp_of_tinstance=sexp_of__t(_instance_putinstance)letof_yojsonjson=Ppx_deriving_yojson_runtime.(_t_of_yojsonjson>|=_instance_get)letto_yojsonlevel=_t_to_yojson(_instance_putlevel)endtypeconstraint_type=[%import:Univ.constraint_type][@@derivingsexp,yojson]typeuniv_constraint=[%import:Univ.univ_constraint][@@derivingsexp,yojson]moduleConstraint=Ser_cSet.MakeJ(Univ.Constraint)(structlett_of_sexp=univ_constraint_of_sexpletsexp_of_t=sexp_of_univ_constraintletof_yojson=univ_constraint_of_yojsonletto_yojson=univ_constraint_to_yojsonend)type'aconstrained=[%import:'aUniv.constrained][@@derivingsexp]moduleUContext=structtypet=Univ.UContext.tlett_of_sexps=Univ.UContext.make(Conv.pair_of_sexpInstance.t_of_sexpConstraint.t_of_sexps)letsexp_of_tt=Conv.sexp_of_pairInstance.sexp_of_tConstraint.sexp_of_t(Univ.UContext.destt)endmoduleAUContext=structtypet=Univ.AUContext.t(* XXX: Opaque, so check they are the same *)lett_of_sexpx=Obj.magic(UContext.t_of_sexpx)letsexp_of_tc=UContext.sexp_of_t(Obj.magicc)endmoduleContextSet=structtypet=[%import:Univ.ContextSet.t][@@derivingsexp]endtype'ain_universe_context=[%import:'aUniv.in_universe_context][@@derivingsexp]type'ain_universe_context_set=[%import:'aUniv.in_universe_context_set][@@derivingsexp]type'apuniverses=[%import:'aUniv.puniverses][@@derivingsexp,yojson]typeexplanation=[%import:Univ.explanation][@@derivingsexp]typeuniv_inconsistency=[%import:Univ.univ_inconsistency][@@derivingsexp]