diff options
author | Emilio Jesus Gallego Arias <e+git@x80.org> | 2018-02-13 18:26:00 +0100 |
---|---|---|
committer | Emilio Jesus Gallego Arias <e+git@x80.org> | 2018-02-15 11:37:51 +0100 |
commit | ed18f926e4695acc730218925ca156abe56ba5fc (patch) | |
tree | 390d1fef8613afbfe4c5e2de3209e06f48f59122 /toplevel/vernac.mli | |
parent | 4bc9529ece085441121678a07e4b269c7633471c (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/vernac.mli')
-rw-r--r-- | toplevel/vernac.mli | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/toplevel/vernac.mli b/toplevel/vernac.mli index b77b024fa..e909ada1e 100644 --- a/toplevel/vernac.mli +++ b/toplevel/vernac.mli @@ -7,14 +7,24 @@ (************************************************************************) (** Parsing of vernacular. *) +module State : sig + + type t = { + doc : Stm.doc; + sid : Stateid.t; + proof : Proof.t option; + } + +end (** [process_expr sid cmd] Executes vernac command [cmd]. Callers are expected to handle and print errors in form of exceptions, however care is taken so the state machine is left in a consistent state. *) -val process_expr : time:bool -> Stm.doc -> Stateid.t -> Vernacexpr.vernac_control Loc.located -> Stm.doc * Stateid.t +val process_expr : time:bool -> state:State.t -> Vernacexpr.vernac_control Loc.located -> State.t (** [load_vernac echo sid file] Loads [file] on top of [sid], will echo the commands if [echo] is set. Callers are expected to handle and print errors in form of exceptions. *) -val load_vernac : time:bool -> verbosely:bool -> check:bool -> interactive:bool -> Stm.doc -> Stateid.t -> string -> Stm.doc * Stateid.t +val load_vernac : time:bool -> verbosely:bool -> check:bool -> interactive:bool -> + state:State.t -> string -> State.t |