123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687(************************************************************************)(* * The Coq Proof Assistant / The Coq 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) *)(************************************************************************)(* If [restore] is false, whenever [f] modifies the ref, we will
preserve the modification. *)letwith_modified_ref?(restore=true)rnffx=letold_ref=!rinr:=nf!r;tryletpre=!rinletres=fxin(* If r was modified don't restore its old value *)ifrestore||pre==!rthenr:=old_ref;reswithreraise->letreraise=Exninfo.capturereraiseinr:=old_ref;Exninfo.iraisereraiseletwith_optionofx=with_modified_ref~restore:falseo(fun_->true)fxletwithout_optionofx=with_modified_ref~restore:falseo(fun_->false)fxletwith_extra_valuesolfx=with_modified_refo(funol->ol@l)fx(* hide the [restore] option as internal *)letwith_modified_refrnffx=with_modified_refrnffxletwith_optionsolfx=letvl=List.map(!)olinlet()=List.iter(funr->r:=true)olintryletr=fxinlet()=List.iter2(:=)olvlinrwithreraise->letreraise=Exninfo.capturereraiseinlet()=List.iter2(:=)olvlinExninfo.iraisereraiseletasync_proofs_worker_id=ref"master"letasync_proofs_is_worker()=!async_proofs_worker_id<>"master"letload_vos_libraries=reffalseletxml_debug=reffalseletin_debugger=reffalseletin_ml_toplevel=reffalseletraw_print=reffalseletin_synterp_phase=reffalse(* Translate *)letbeautify=reffalseletbeautify_file=reffalseletrecord_comments=reffalse(* Silent / Verbose *)letquiet=reffalseletsilentlyfx=with_optionquietfxletverboselyfx=without_optionquietfxletif_silentfx=if!quietthenfxletif_verbosefx=ifnot!quietthenfxletwarn=reftrueletmake_warnflag=warn:=flag;()letif_warnfx=if!warnthenfx(* Level of inlining during a functor application *)letdefault_inline_level=100letinline_level=refdefault_inline_levelletset_inline_level=(:=)inline_levelletget_inline_level()=!inline_levelletprofile_ltac=reffalseletprofile_ltac_cutoff=ref2.0(* Default output directory *)letoutput_directory=refNone