aboutsummaryrefslogtreecommitdiffhomepage
path: root/ltac
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2016-04-12 22:25:26 +0200
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2016-04-27 21:55:45 +0200
commitbde36d4b00185065628324d8ca71994f84eae244 (patch)
treec4d7bba0352ee72fa31712e02882c7066a6e1ba1 /ltac
parentc4d1e3113f77af2e5474fe5676c272050dd445e5 (diff)
In the short term, 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.ml2
-rw-r--r--ltac/tacinterp.ml4
-rw-r--r--ltac/tacsubst.ml3
-rw-r--r--ltac/tauto.ml2
4 files changed, 6 insertions, 5 deletions
diff --git a/ltac/tacintern.ml b/ltac/tacintern.ml
index 15589d5c4..4917c3bb5 100644
--- a/ltac/tacintern.ml
+++ b/ltac/tacintern.ml
@@ -502,7 +502,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 9b41a276b..b875fb26f 100644
--- a/ltac/tacinterp.ml
+++ b/ltac/tacinterp.ml
@@ -1765,10 +1765,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 438219f5a..22660aa83 100644
--- a/ltac/tacsubst.ml
+++ b/ltac/tacsubst.ml
@@ -151,7 +151,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 a86fdb98a..fa65a02b4 100644
--- a/ltac/tauto.ml
+++ b/ltac/tauto.ml
@@ -99,7 +99,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)