From 75c0c5c2b460614fba6705c6e0d64859815a613c Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Sun, 24 Sep 2017 00:40:19 +0200 Subject: [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. --- API/API.mli | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'API/API.mli') diff --git a/API/API.mli b/API/API.mli index 3ed326ff0e..5c421ade48 100644 --- a/API/API.mli +++ b/API/API.mli @@ -5768,8 +5768,11 @@ end module Stm : sig + type doc type state - val state_of_id : + + val get_doc : Feedback.doc_id -> doc + val state_of_id : doc:doc -> Stateid.t -> [ `Valid of state option | `Expired | `Error of exn ] end -- cgit v1.2.3