aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel/coqinit.ml
diff options
context:
space:
mode:
authorGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2018-02-13 18:26:00 +0100
committerGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2018-02-15 11:37:51 +0100
commited18f926e4695acc730218925ca156abe56ba5fc (patch)
tree390d1fef8613afbfe4c5e2de3209e06f48f59122 /toplevel/coqinit.ml
parent4bc9529ece085441121678a07e4b269c7633471c (diff)
[toplevel] Make toplevel state into a record.
We organize the toplevel execution as a record and pass it around. This will be used by future PRs as to for example decouple goal printing from the classifier.
Diffstat (limited to 'toplevel/coqinit.ml')
-rw-r--r--toplevel/coqinit.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/toplevel/coqinit.ml b/toplevel/coqinit.ml
index 8574092b8..d8aaf3db8 100644
--- a/toplevel/coqinit.ml
+++ b/toplevel/coqinit.ml
@@ -21,12 +21,12 @@ let set_debug () =
let rcdefaultname = "coqrc"
-let load_rcfile ~rcfile ~time doc sid =
+let load_rcfile ~rcfile ~time ~state =
try
match rcfile with
| Some rcfile ->
if CUnix.file_readable_p rcfile then
- Vernac.load_vernac ~time ~verbosely:false ~interactive:false ~check:true doc sid rcfile
+ Vernac.load_vernac ~time ~verbosely:false ~interactive:false ~check:true ~state rcfile
else raise (Sys_error ("Cannot read rcfile: "^ rcfile))
| None ->
try
@@ -37,8 +37,8 @@ let load_rcfile ~rcfile ~time doc sid =
Envars.home ~warn / "."^rcdefaultname^"."^Coq_config.version;
Envars.home ~warn / "."^rcdefaultname
] in
- Vernac.load_vernac ~time ~verbosely:false ~interactive:false ~check:true doc sid inferedrc
- with Not_found -> doc, sid
+ Vernac.load_vernac ~time ~verbosely:false ~interactive:false ~check:true ~state inferedrc
+ with Not_found -> state
(*
Flags.if_verbose
mSGNL (str ("No coqrc or coqrc."^Coq_config.version^