12345678910111213141516171819202122232425262728293031323334(************************************************************************)(* 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-2018 MINES ParisTech *)(************************************************************************)(* Status: Very Experimental *)(************************************************************************)exceptionSer_errorofstringlet_=CErrors.register_handler(function|Ser_errormsg->SomePp.(seq[str"Serlib Error: ";strmsg])|_->None)letopaque_of_sexp~typ_obj=raise(Ser_error("["^typ^": ABSTRACT / cannot deserialize]"))letexn_on_opaque=reftrueletsexp_of_opaque~typ_exp=letmsg="["^typ^": ABSTRACT]"inif!exn_on_opaquethenraise(Ser_errormsg)elseSexplib.Sexp.Atom("["^typ^": ABSTRACT]")