aboutsummaryrefslogtreecommitdiff
path: root/printing
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2016-02-22 10:32:57 +0100
committerPierre-Marie Pédrot2016-02-22 16:29:04 +0100
commitf358d7b4c962f5288ad9ce2dc35802666c882422 (patch)
tree3c5a27500644aa83de13e30740e330006448c2cd /printing
parentc5d0aa889fa80404f6c291000938e443d6200e5b (diff)
The tactic generic argument now returns a value rather than a glob_expr.
The glob_expr was actually always embedded as a VFun, so this patch should not change anything semantically. The only change occurs in the plugin API where one should use the Tacinterp.tactic_of_value function instead of Tacinterp.eval_tactic. Moreover, this patch allows to use tactics returning arguments from the ML side.
Diffstat (limited to 'printing')
-rw-r--r--printing/pptactic.ml10
-rw-r--r--printing/pptactic.mli2
2 files changed, 7 insertions, 5 deletions
diff --git a/printing/pptactic.ml b/printing/pptactic.ml
index c00036bb3c..ed85b21478 100644
--- a/printing/pptactic.ml
+++ b/printing/pptactic.ml
@@ -61,7 +61,7 @@ type 'a glob_extra_genarg_printer =
type 'a extra_genarg_printer =
(Term.constr -> std_ppcmds) ->
(Term.constr -> std_ppcmds) ->
- (tolerability -> glob_tactic_expr -> std_ppcmds) ->
+ (tolerability -> Val.t -> std_ppcmds) ->
'a -> std_ppcmds
let genarg_pprule = ref String.Map.empty
@@ -106,6 +106,8 @@ module Make
let keyword x = tag_keyword (str x)
let primitive x = tag_primitive (str x)
+ let pr_value _ _ = str "(* FIXME *)"
+
let pr_with_occurrences pr (occs,c) =
match occs with
| AllOccurrences ->
@@ -1308,10 +1310,10 @@ module Make
pr_generic = Genprint.generic_top_print;
pr_extend = pr_extend_rec
(pr_constr_env env Evd.empty) (pr_lconstr_env env Evd.empty)
- (pr_glob_tactic_level env) pr_constr_pattern;
+ pr_value pr_constr_pattern;
pr_alias = pr_alias
(pr_constr_env env Evd.empty) (pr_lconstr_env env Evd.empty)
- (pr_glob_tactic_level env) pr_constr_pattern;
+ pr_value pr_constr_pattern;
}
in
make_pr_tac
@@ -1330,7 +1332,7 @@ module Make
let pr_top_generic env = pr_top_generic_rec
(pr_constr_env env Evd.empty) (pr_lconstr_env env Evd.empty)
- (pr_glob_tactic_level env) pr_constr_pattern
+ pr_value pr_constr_pattern
let pr_raw_extend env = pr_raw_extend_rec
pr_constr_expr pr_lconstr_expr pr_raw_tactic_level pr_constr_pattern_expr
diff --git a/printing/pptactic.mli b/printing/pptactic.mli
index 2bc64509f0..31a5a5d4a8 100644
--- a/printing/pptactic.mli
+++ b/printing/pptactic.mli
@@ -32,7 +32,7 @@ type 'a glob_extra_genarg_printer =
type 'a extra_genarg_printer =
(Term.constr -> std_ppcmds) ->
(Term.constr -> std_ppcmds) ->
- (tolerability -> glob_tactic_expr -> std_ppcmds) ->
+ (tolerability -> Val.t -> std_ppcmds) ->
'a -> std_ppcmds
val declare_extra_genarg_pprule :