diff options
| author | Enrico Tassi | 2019-01-09 11:01:53 +0100 |
|---|---|---|
| committer | Enrico Tassi | 2019-01-09 11:01:53 +0100 |
| commit | 2c4c8357a701ddd7bc8ee73a5c457d3844948867 (patch) | |
| tree | b7f00599f459f3e75b83d17cb1b35dec132fa366 /stm | |
| parent | 727d4da625f88b7ba302d5c129f9773dc1fb1e33 (diff) | |
| parent | 320363315e350bf427054d837a02b4d97f015199 (diff) | |
Merge PR #9273: Fix #9272: `Unset Nested Proofs Allowed` does not capture nested `Ins…
Diffstat (limited to 'stm')
| -rw-r--r-- | stm/stm.ml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/stm/stm.ml b/stm/stm.ml index 32c6c7d959..27feac9adb 100644 --- a/stm/stm.ml +++ b/stm/stm.ml @@ -2993,7 +2993,14 @@ let process_transaction ~doc ?(newtip=Stateid.fresh ()) (* Unknown: we execute it, check for open goals and propagate sideeff *) | VtUnknown, VtNow -> let in_proof = not (VCS.Branch.equal head VCS.Branch.master) in - let id = VCS.new_node ~id:newtip () in + if not (get_allow_nested_proofs ()) && in_proof then + "Commands which may open proofs are not allowed in a proof unless you turn option Nested Proofs Allowed on." + |> Pp.str + |> (fun s -> (UserError (None, s), Exninfo.null)) + |> State.exn_on ~valid:Stateid.dummy Stateid.dummy + |> Exninfo.iraise + else + let id = VCS.new_node ~id:newtip () in let head_id = VCS.get_branch_pos head in let _st : unit = Reach.known_state ~doc ~cache:true head_id in (* ensure it is ok *) let step () = |
