X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_proof_checking%2FcicSubstitution.ml;h=a30a036cb42dc7726c1720906d706f903b0fcf30;hb=6c43a7f440daf19e2475b7eabd20456bdb0e9f76;hp=a9fa1d9b19e8e86ca8c8b89621e6fa4e13c365e1;hpb=a93a94942ad58d8645af1fd94bef8fa31d9541a4;p=helm.git diff --git a/helm/ocaml/cic_proof_checking/cicSubstitution.ml b/helm/ocaml/cic_proof_checking/cicSubstitution.ml index a9fa1d9b1..a30a036cb 100644 --- a/helm/ocaml/cic_proof_checking/cicSubstitution.ml +++ b/helm/ocaml/cic_proof_checking/cicSubstitution.ml @@ -23,6 +23,8 @@ * http://cs.unibo.it/helm/. *) +(* $Id$ *) + exception CannotSubstInMeta;; exception RelToHiddenHypothesis;; exception ReferenceToVariable;; @@ -121,7 +123,7 @@ let subst arg = List.map (function (uri,t) -> (uri,substaux k t)) exp_named_subst in C.Var (uri,exp_named_subst') - | C.Meta (i, l) as t -> + | C.Meta (i, l) -> let l' = List.map (function @@ -189,7 +191,7 @@ let subst arg = (*CSC: dovrebbe diventare da sinistra verso destra: *) (*CSC: t{a=a/A;b/a} ==> \H:a=a.H{b/a} ==> \H:b=b.H *) (*CSC: per la roba che proviene da Coq questo non serve! *) -let subst_vars exp_named_subst = +let subst_vars exp_named_subst t = (* debug_print (lazy ("@@@POSSIBLE BUG: SUBSTITUTION IS NOT SIMULTANEOUS")) ; *) @@ -230,7 +232,7 @@ debug_print (lazy "---- END\n\n ") ; *) C.Var (uri,exp_named_subst'') ) - | C.Meta (i, l) as t -> + | C.Meta (i, l) -> let l' = List.map (function @@ -342,7 +344,8 @@ if List.mem uri params then debug_print (lazy "---- OK2") ; List.map (function (uri,t) -> (uri,substaux k t)) exp_named_subst' @ (filter_and_lift exp_named_subst) in - substaux 1 + if exp_named_subst = [] then t + else substaux 1 t ;; (* subst_meta [t_1 ; ... ; t_n] t *)