aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorherbelin2002-11-14 20:26:01 +0000
committerherbelin2002-11-14 20:26:01 +0000
commit724ae6574aa7488f28fefec50fd25c3aa8aef97b (patch)
treec38356a25da1714d444c8c8187abb34b55ed0751
parentc302006a565d5cfebf0af1b188a0c05f9257f948 (diff)
Re-ajout constrIn
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3237 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r--tactics/tacinterp.ml15
-rw-r--r--tactics/tacinterp.mli2
2 files changed, 14 insertions, 3 deletions
diff --git a/tactics/tacinterp.ml b/tactics/tacinterp.ml
index be6362d3a9..2140640275 100644
--- a/tactics/tacinterp.ml
+++ b/tactics/tacinterp.ml
@@ -162,9 +162,18 @@ let valueOut = function
else
anomalylabstrm "valueOut" (str "Dynamic tag should be value")
| ast ->
- anomalylabstrm "valueOut"
- (str "Not a Dynamic ast: " (* ++ print_ast ast*) )
-
+ anomalylabstrm "valueOut" (str "Not a Dynamic ast: ")
+
+(* To embed constr in Coqast.t *)
+let constrIn t = CDynamic (dummy_loc,Pretyping.constr_in t)
+let constrOut = function
+ | CDynamic (_,d) ->
+ if (Dyn.tag d) = "constr" then
+ Pretyping.constr_out d
+ else
+ anomalylabstrm "constrOut" (str "Dynamic tag should be constr")
+ | ast ->
+ anomalylabstrm "constrOut" (str "Not a Dynamic ast")
let loc = dummy_loc
(* Table of interpretation functions *)
diff --git a/tactics/tacinterp.mli b/tactics/tacinterp.mli
index 07ccf1d591..b4b666fa75 100644
--- a/tactics/tacinterp.mli
+++ b/tactics/tacinterp.mli
@@ -60,6 +60,8 @@ val tacticIn : (interp_sign -> raw_tactic_expr) -> raw_tactic_expr
val tacticOut : raw_tactic_expr -> (interp_sign -> raw_tactic_expr)
val valueIn : value -> raw_tactic_arg
val valueOut: raw_tactic_arg -> value
+val constrIn : constr -> constr_expr
+val constrOut : constr_expr -> constr
(* Sets the debugger mode *)
val set_debug : debug_info -> unit