1234567891011121314151617181920212223242526272829303132333435363738394041(************************************************************************)(* * 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) *)(************************************************************************)openPpopenCoqargs(******************************************************************************)(* Interactive Load File Simulation *)(******************************************************************************)letload_init_fileopts~state=ifopts.pre.load_rcfilethenTopfmt.(in_phase~phase:LoadingRcFile)(fun()->Coqrc.load_rcfile~rcfile:opts.config.rcfile~state)()elsebeginFlags.if_verboseFeedback.msg_info(str"Skipping rcfile loading.");stateendletload_vernacularopts~state=List.fold_left(funstate(f_in,echo)->lets=Loadpath.locate_filef_inin(* Should make the beautify logic clearer *)letload_vernacf=Vernac.load_vernac~echo~interactive:false~check:true~statefinif!Flags.beautifythenFlags.with_optionFlags.beautify_fileload_vernacf_inelseload_vernacs)stateopts.pre.load_vernacular_listletload_init_vernacularsopts~state=letstate=load_init_fileopts~stateinletstate=load_vernacularopts~stateinstate