aboutsummaryrefslogtreecommitdiff
path: root/stm
diff options
context:
space:
mode:
authorEnrico Tassi2020-10-12 16:52:47 +0200
committerEnrico Tassi2020-11-02 10:04:48 +0100
commitfd9d10f2c7eff9ff72f42e9ecd3ffd5179de4da0 (patch)
tree2ba3cd5e6459b6acf8b6bed63786c49d5770f9dd /stm
parenta464fdc040a77022dd9e6e57129f80144918ace6 (diff)
[stm] support #[using] attribute
Diffstat (limited to 'stm')
-rw-r--r--stm/stm.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/stm/stm.ml b/stm/stm.ml
index 85f889c879..df7e35beb5 100644
--- a/stm/stm.ml
+++ b/stm/stm.ml
@@ -2275,8 +2275,9 @@ let known_state ~doc ?(redefine_qed=false) ~cache id =
), true, true
| `MaybeASync (start, nodes, name, delegate) -> (fun () ->
reach ~cache:true start;
- (* no sections *)
- if CList.is_empty (Environ.named_context (Global.env ()))
+ if CList.is_empty (Environ.named_context (Global.env ())) (* no sections *)
+ || PG_compat.get_pstate () |> (* #[using] attribute *)
+ Option.cata (fun x -> Option.has_some (Declare.Proof.get_used_variables x)) false
then Util.pi1 (aux (`ASync (start, nodes, name, delegate))) ()
else Util.pi1 (aux (`Sync (name, `NoPU_NoHint_NoES))) ()
), not redefine_qed, true