123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657(************************************************************************)(* * The Rocq Prover / The Rocq Development Team *)(* v * Copyright INRIA, CNRS and contributors *)(* <O___,, * (see version control and CREDITS file for authors & dates) *)(* \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) *)(************************************************************************)openUtilopenGoptionsopenVernacexprletvernac_set_option~locality~stagekeyopt=matchoptwith|OptionUnset->unset_option_value_gen~locality~stagekey|OptionSetStrings->set_string_option_value_gen~locality~stagekeys|OptionSetIntn->set_int_option_value_gen~locality~stagekey(Somen)|OptionSetTrue->set_bool_option_value_gen~locality~stagekeytrueletwarn_set_append_deprecated=CWarnings.create~name:"set-append-deprecated"~category:Deprecation.Version.v9_1Pp.(fun()->str"Set ... Append is not supported.")letvernac_set_option~locality~stagetablev=lettable=ifString.equal"Append"(List.lasttable)thenbeginlettable=List.drop_lasttableinlet()=matchtablewith|["Warnings"]|["Debug"]->()|_->CErrors.user_errPp.(str"Set ... Append not allowed with "++prlist_with_sepspcstrtable++str".")inwarn_set_append_deprecated();tableendelsetableinvernac_set_option~locality~stagetablevletiter_tablefkv=Goptions.iter_table(Global.env())fkvletvernac_add_optionlocal=iter_table{aux=funtableenvx->table.addenvlocalx}letvernac_remove_optionlocal=iter_table{aux=funtableenvx->table.removeenvlocalx}letvernac_mem_option=iter_table{aux=funtable->table.mem}letvernac_print_optionkey=try(get_ref_tablekey).print()withNot_found->try(get_string_tablekey).print()withNot_found->tryprint_option_valuekeywithNot_found->error_undeclared_keykey