diff options
author | 2016-04-12 22:25:26 +0200 | |
---|---|---|
committer | 2016-06-16 17:30:18 +0200 | |
commit | e2d4490b12514362af8e1f0b8b89cf0550f78130 (patch) | |
tree | ddb275621606524ccd6af7b5a9b94b36988041c0 /ltac | |
parent | 613d99b98d3c78213a69acdbf23c660764487300 (diff) |
A stronger invariant on the syntax of TacAssert, what allows for a
simpler re-printing of assert.
Also fixing the precedence for printing "by" clause.
Diffstat (limited to 'ltac')
-rw-r--r-- | ltac/tacintern.ml | 2 | ||||
-rw-r--r-- | ltac/tacinterp.ml | 4 | ||||
-rw-r--r-- | ltac/tacsubst.ml | 3 | ||||
-rw-r--r-- | ltac/tauto.ml | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/ltac/tacintern.ml b/ltac/tacintern.ml index a72fb0d06..dc21fa885 100644 --- a/ltac/tacintern.ml +++ b/ltac/tacintern.ml @@ -495,7 +495,7 @@ let rec intern_atomic lf ist x = let f (id,c) = (intern_ident lf ist id,intern_type ist c) in TacMutualCofix (intern_ident lf ist id, List.map f l) | TacAssert (b,otac,ipat,c) -> - TacAssert (b,Option.map (intern_pure_tactic ist) otac, + TacAssert (b,Option.map (Option.map (intern_pure_tactic ist)) otac, Option.map (intern_intro_pattern lf ist) ipat, intern_constr_gen false (not (Option.is_empty otac)) ist c) | TacGeneralize cl -> diff --git a/ltac/tacinterp.ml b/ltac/tacinterp.ml index 3716de251..789e8d64b 100644 --- a/ltac/tacinterp.ml +++ b/ltac/tacinterp.ml @@ -1735,10 +1735,10 @@ and interp_atomic ist tac : unit Proofview.tactic = (if Option.is_empty t then interp_constr else interp_type) ist env sigma c in let sigma, ipat' = interp_intro_pattern_option ist env sigma ipat in - let tac = Option.map (interp_tactic ist) t in + let tac = Option.map (Option.map (interp_tactic ist)) t in Tacticals.New.tclWITHHOLES false (name_atomic ~env - (TacAssert(b,Option.map ignore t,ipat,c)) + (TacAssert(b,Option.map (Option.map ignore) t,ipat,c)) (Tactics.forward b tac ipat' c)) sigma end } | TacGeneralize cl -> diff --git a/ltac/tacsubst.ml b/ltac/tacsubst.ml index 2c3c76ef7..3d8f10e00 100644 --- a/ltac/tacsubst.ml +++ b/ltac/tacsubst.ml @@ -148,7 +148,8 @@ let rec subst_atomic subst (t:glob_atomic_tactic_expr) = match t with | TacMutualCofix (id,l) -> TacMutualCofix (id, List.map (fun (id,c) -> (id,subst_glob_constr subst c)) l) | TacAssert (b,otac,na,c) -> - TacAssert (b,Option.map (subst_tactic subst) otac,na,subst_glob_constr subst c) + TacAssert (b,Option.map (Option.map (subst_tactic subst)) otac,na, + subst_glob_constr subst c) | TacGeneralize cl -> TacGeneralize (List.map (on_fst (subst_constr_with_occurrences subst))cl) | TacLetTac (id,c,clp,b,eqpat) -> diff --git a/ltac/tauto.ml b/ltac/tauto.ml index c0cae84c0..756958c2f 100644 --- a/ltac/tauto.ml +++ b/ltac/tauto.ml @@ -96,7 +96,7 @@ let intro = Tactics.intro let assert_ ?by c = let tac = match by with | None -> None - | Some tac -> Some (tclCOMPLETE tac) + | Some tac -> Some (Some tac) in Proofview.tclINDEPENDENT (Tactics.forward true tac None c) |