diff options
| author | Emilio Jesus Gallego Arias | 2018-12-07 23:15:26 +0100 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2019-02-12 15:08:49 +0100 |
| commit | fd3bde66bc32ba70435aaad3f83d0b58c846af55 (patch) | |
| tree | 83ec1247955c547cc4434e4e78ee5bf880e851c7 /engine/proofview_monad.ml | |
| parent | 7f4cba971e8db5a9717f688f906094a458173af7 (diff) | |
[tactics] Remove dependency of abstract on global proof state.
In order to do so we place the polymorphic status and name in the
read-only part of the monad.
Note the added comments, as well as the fact that almost no part of
tactics depends on `proofs` nor `interp`, thus they should be placed
just after pretyping.
Gaƫtan Gilbert noted that ideally, abstract should not depend on the
polymorphic status, should we be able to defer closing of the
constant, however this will require significant effort.
Also, we may deprecate nameless abstract, thus rending both of the
changes this PR need unnecessary.
Diffstat (limited to 'engine/proofview_monad.ml')
| -rw-r--r-- | engine/proofview_monad.ml | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/engine/proofview_monad.ml b/engine/proofview_monad.ml index 69341d97df..80eb9d0124 100644 --- a/engine/proofview_monad.ml +++ b/engine/proofview_monad.ml @@ -177,7 +177,7 @@ module P = struct type s = proofview * Environ.env (** Recording info trace (true) or not. *) - type e = bool + type e = { trace: bool; name : Names.Id.t; poly : bool } (** Status (safe/unsafe) * shelved goals * given up *) type w = bool * goal list @@ -254,13 +254,16 @@ end (** Lens and utilies pertaining to the info trace *) module InfoL = struct - let recording = Logical.current + let recording = Logical.(map (fun {P.trace} -> trace) current) let if_recording t = let open Logical in recording >>= fun r -> if r then t else return () - let record_trace t = Logical.local true t + let record_trace t = + Logical.( + current >>= fun s -> + local {s with P.trace = true} t) let raw_update = Logical.update let update f = if_recording (raw_update f) |
