aboutsummaryrefslogtreecommitdiffhomepage
path: root/contrib/recdef
diff options
context:
space:
mode:
authorGravatar jforest <jforest@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-07-05 13:24:12 +0000
committerGravatar jforest <jforest@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-07-05 13:24:12 +0000
commitfe38cbc1cde5dbe09f5f56a6557d23ea71f9a797 (patch)
tree3aa458eb891884cda511aa9f8a7e7c46aa554729 /contrib/recdef
parente781edb69ae6c9e9d5c52646716b60332f98ff59 (diff)
Minor bug correction in Function. Non terminating Function e.g.
Function f (x:A) { wf R x} := f x. was not accepted. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9943 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'contrib/recdef')
-rw-r--r--contrib/recdef/recdef.ml420
1 files changed, 12 insertions, 8 deletions
diff --git a/contrib/recdef/recdef.ml4 b/contrib/recdef/recdef.ml4
index 5f45d9d85..213ec18a1 100644
--- a/contrib/recdef/recdef.ml4
+++ b/contrib/recdef/recdef.ml4
@@ -8,7 +8,7 @@
(*i camlp4deps: "parsing/grammar.cma" i*)
-(* $Id:$ *)
+(* $Id$ *)
open Term
open Termops
@@ -1179,6 +1179,7 @@ let base_leaf_eq func eqs f_id g =
let f_S t = mkApp(delayed_force coq_S, [|t|]);;
+
let rec introduce_all_values_eq cont_tac functional termine
f p heq1 pmax bounds le_proofs eqs ids =
function
@@ -1245,13 +1246,15 @@ let rec introduce_all_values_eq cont_tac functional termine
let def_na,_,_ = destProd t in
Nameops.out_name k_na,Nameops.out_name def_na
in
- observe_tac "general_rewrite_bindings" ( (general_rewrite_bindings false
- (mkVar heq,
+ let c_b = (mkVar heq,
ExplicitBindings
[dummy_loc, NamedHyp k_id,
f_S(mkVar pmax');
- dummy_loc, NamedHyp def_id, f]) false))
- g
+ dummy_loc, NamedHyp def_id, f])
+ in
+ observe_tac "general_rewrite_bindings" ( (general_rewrite_bindings false
+ c_b false))
+ g
)
[tclIDTAC;
tclTHENLIST
@@ -1412,10 +1415,11 @@ let recursive_definition is_mes function_name rec_impls type_of_f r rec_arg_num
with e ->
begin
if Tacinterp.get_debug () <> Tactic_debug.DebugOff
- then anomalylabstrm "" (str "Cannot create equation Lemma " ++ Cerrors.explain_exn e);
- stop := true;
+ then anomalylabstrm "" (str "Cannot create equation Lemma " ++ Cerrors.explain_exn e)
+ else anomaly "Cannot create equation Lemma"
+ ;
(* ignore(try Vernacentries.vernac_reset_name (Util.dummy_loc,functional_id) with _ -> ()); *)
-(* anomaly "Cannot create equation Lemma" *)
+ stop := true;
end
end;
if not !stop