X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_proof_checking%2FcicElim.ml;fp=helm%2Focaml%2Fcic_proof_checking%2FcicElim.ml;h=869d5d08b9fccea8021c85a9418c0672ad4d5460;hb=e5108fbb1b112d713e611f7dbcd8a2ab8002e9a5;hp=ab7ddd0e1fb2bb0a75bd4a4a48a3a82ae12f5f37;hpb=5e1fd9ee5ced5737c7fd4f25fca47feda1fda8e9;p=helm.git diff --git a/helm/ocaml/cic_proof_checking/cicElim.ml b/helm/ocaml/cic_proof_checking/cicElim.ml index ab7ddd0e1..869d5d08b 100644 --- a/helm/ocaml/cic_proof_checking/cicElim.ml +++ b/helm/ocaml/cic_proof_checking/cicElim.ml @@ -28,13 +28,16 @@ open Printf exception Elim_failure of string exception Can_t_eliminate -let debug_print = fun _ -> () +(* +let debug_print = fun _ -> () *) +let debug_print = prerr_endline let counter = ref ~-1 ;; -let fresh_binder () = +let fresh_binder () = Cic.Name "matita_dummy" +(* incr counter; - Cic.Name ("e" ^ string_of_int !counter) + Cic.Name ("e" ^ string_of_int !counter) *) (** verifies if a given inductive type occurs in a term in target position *) let rec recursive uri typeno = function @@ -364,10 +367,14 @@ let elim_of ?(sort = Cic.Type (CicUniv.fresh ())) uri typeno = in add_params (fun b s t -> Cic.Lambda (b, s, t)) leftno ty cic in -(* debug_print (CicPp.ppterm eliminator_type); debug_print (CicPp.ppterm eliminator_body); -*) + let eliminator_type = + FreshNamesGenerator.mk_fresh_names [] [] [] eliminator_type in + let eliminator_body = + FreshNamesGenerator.mk_fresh_names [] [] [] eliminator_body in +debug_print (CicPp.ppterm eliminator_type); +debug_print (CicPp.ppterm eliminator_body); let (computed_type, ugraph) = try CicTypeChecker.type_of_aux' [] [] eliminator_body CicUniv.empty_ugraph