aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toplevel/ccompile.ml23
1 files changed, 13 insertions, 10 deletions
diff --git a/toplevel/ccompile.ml b/toplevel/ccompile.ml
index e6255a947e..605db74836 100644
--- a/toplevel/ccompile.ml
+++ b/toplevel/ccompile.ml
@@ -20,6 +20,16 @@ let fatal_error msg =
(******************************************************************************)
(* Interactive Load File Simulation *)
(******************************************************************************)
+
+let load_init_file opts ~state =
+ if opts.load_rcfile then
+ Topfmt.(in_phase ~phase:LoadingRcFile) (fun () ->
+ Coqinit.load_rcfile ~rcfile:opts.rcfile ~state) ()
+ else begin
+ Flags.if_verbose Feedback.msg_info (str"Skipping rcfile loading.");
+ state
+ end
+
let load_vernacular opts ~state =
List.fold_left
(fun state (f_in, echo) ->
@@ -32,16 +42,9 @@ let load_vernacular opts ~state =
) state (List.rev opts.load_vernacular_list)
let load_init_vernaculars opts ~state =
- let state =
- if opts.load_rcfile then
- Topfmt.(in_phase ~phase:LoadingRcFile) (fun () ->
- Coqinit.load_rcfile ~rcfile:opts.rcfile ~state) ()
- else begin
- Flags.if_verbose Feedback.msg_info (str"Skipping rcfile loading.");
- state
- end in
-
- load_vernacular opts ~state
+ let state = load_init_file opts ~state in
+ let state = load_vernacular opts ~state in
+ state
(******************************************************************************)
(* File Compilation *)