diff options
author | Emilio Jesus Gallego Arias <e+git@x80.org> | 2017-09-24 00:40:19 +0200 |
---|---|---|
committer | Emilio Jesus Gallego Arias <e+git@x80.org> | 2017-10-06 17:32:55 +0200 |
commit | 75c0c5c2b460614fba6705c6e0d64859815a613c (patch) | |
tree | 695b3617539fb9a31b80ee78eee491f8b3f49ff4 /toplevel/coqloop.mli | |
parent | 675a1dc401eb9a5540ba5bc9a522c1f84d4c3d54 (diff) |
[stm] Switch to a functional API
We make the Stm API functional over an opaque `doc` type. This allows
to have a much better picture of what the toplevel is doing; now
almost all users of STM private data are marked by typing.
For now only, the API is functional; a PR switching the internals
should come soon thou; however we must first fix some initialization
bugs.
Due to some users, we modify `feedback` internally to include a
"document id" field; we don't expose this change in the IDE protocol
yet.
Diffstat (limited to 'toplevel/coqloop.mli')
-rw-r--r-- | toplevel/coqloop.mli | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/toplevel/coqloop.mli b/toplevel/coqloop.mli index 8eaa68914..46dabf995 100644 --- a/toplevel/coqloop.mli +++ b/toplevel/coqloop.mli @@ -15,7 +15,7 @@ val print_emacs : bool ref * entered to be able to report errors without pretty-printing. *) type input_buffer = { - mutable prompt : unit -> string; + mutable prompt : Stm.doc -> string; mutable str : Bytes.t; (** buffer of already read characters *) mutable len : int; (** number of chars in the buffer *) mutable bols : int list; (** offsets in str of begining of lines *) @@ -32,8 +32,8 @@ val coqloop_feed : Feedback.feedback -> unit (** Parse and execute one vernac command. *) -val do_vernac : Stateid.t -> Stateid.t +val do_vernac : Stm.doc -> Stateid.t -> Stm.doc * Stateid.t (** Main entry point of Coq: read and execute vernac commands. *) -val loop : unit -> unit +val loop : Stm.doc -> unit |