123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051(************************************************************************)(* * 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-2019 MINES ParisTech *)(* Copyright 2019-2022 Inria *)(* Written by Emilio J. Gallego Arias *)(************************************************************************)[@@@ocamlformat"disable"]letlist_lastl=List.(nthl(lengthl-1))(* Should improve *)letmap_serlibfl_pkg=letsupported=matchfl_pkgwith(* Supported by serlib *)(* directory *)|"coq-core.plugins.ltac"(* ltac *)|"coq-core.plugins.firstorder"(* firstorder *)|"coq-core.plugins.funind"(* funind *)|"coq-core.plugins.ring"(* ring *)|"coq-core.plugins.extraction"(* extraction *)|"coq-core.plugins.ssrmatching"(* ssrmatching *)|"coq-core.plugins.ssreflect"(* ssr *)->true|_->Feedback.msg_warningPp.(str"Missing serlib plugin: "++strfl_pkg);falseinifsupportedthenletplugin_name=String.split_on_char'.'fl_pkg|>list_lastinSome("coq-serapi.serlib."^plugin_name)elseNoneletplugin_handleruser_loader=letloader=Option.default(Fl_dynload.load_packages~debug:false)user_loaderinfunfl_pkg->let_,fl_pkg=Mltop.PluginSpec.reprfl_pkginmatchmap_serlibfl_pkgwith|Someserlib_pkg->loader[serlib_pkg]|None->loader[fl_pkg]