diff options
| author | Pierre-Marie Pédrot | 2014-03-26 20:37:40 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2014-03-26 20:42:26 +0100 |
| commit | 73ddce3136549532c81405fa82871dcd3a51b28f (patch) | |
| tree | 8cdba08a62187f03cd3096e61f1976bf0e7a30c0 /proofs | |
| parent | 681fe91e80266c0947f0fad72e6f509d75ea34f9 (diff) | |
Adding a tclEFFECTS primitive allowing to push STM side-effects in tactics.
Diffstat (limited to 'proofs')
| -rw-r--r-- | proofs/proofview.ml | 6 | ||||
| -rw-r--r-- | proofs/proofview.mli | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/proofs/proofview.ml b/proofs/proofview.ml index 67893e3b78..ae4b2e3363 100644 --- a/proofs/proofview.ml +++ b/proofs/proofview.ml @@ -555,6 +555,12 @@ let tclEVARMAP = let tclENV = Proof.current +let tclEFFECTS eff = + (* spiwack: convenience notations, waiting for ocaml 3.12 *) + let (>>=) = Proof.bind in + Proof.get >>= fun initial -> + Proof.set (emit_side_effects eff initial) + exception Timeout let _ = Errors.register_handler begin function | Timeout -> Errors.errorlabstrm "Proofview.tclTIMEOUT" (Pp.str"Tactic timeout!") diff --git a/proofs/proofview.mli b/proofs/proofview.mli index 7be8f6003b..409bbb76a1 100644 --- a/proofs/proofview.mli +++ b/proofs/proofview.mli @@ -234,6 +234,9 @@ val tclEVARMAP : Evd.evar_map tactic environment is returned by {!Proofview.Goal.env}. *) val tclENV : Environ.env tactic +(* [tclEFFECTS eff] add the effects [eff] to the current state. *) +val tclEFFECTS : Declareops.side_effects -> unit tactic + (* Shelves all the goals under focus. The goals are placed on the shelf for later use (or being solved by side-effects). *) val shelve : unit tactic |
