X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_proof_checking%2FcicElim.ml;h=60cf5af2e60031a37579b791985b287a63576a98;hb=8b55faddb06e3c4b0a13839210bb49170939b33e;hp=e3fca907dd562f494a479333400c33ef069f08b8;hpb=f268a4b949ad0ac525f73dbd5116722c2ca6f552;p=helm.git diff --git a/helm/ocaml/cic_proof_checking/cicElim.ml b/helm/ocaml/cic_proof_checking/cicElim.ml index e3fca907d..60cf5af2e 100644 --- a/helm/ocaml/cic_proof_checking/cicElim.ml +++ b/helm/ocaml/cic_proof_checking/cicElim.ml @@ -25,11 +25,11 @@ open Printf -exception Elim_failure of string +exception Elim_failure of string Lazy.t exception Can_t_eliminate let debug_print = fun _ -> () -(*let debug_print = prerr_endline *) +(*let debug_print s = prerr_endline (Lazy.force s) *) let counter = ref ~-1 ;; @@ -367,24 +367,24 @@ let elim_of ?(sort = Cic.Type (CicUniv.fresh ())) uri typeno = 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); +debug_print (lazy (CicPp.ppterm eliminator_type)); +debug_print (lazy (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); +debug_print (lazy (CicPp.ppterm eliminator_type)); +debug_print (lazy (CicPp.ppterm eliminator_body)); *) let (computed_type, ugraph) = try CicTypeChecker.type_of_aux' [] [] eliminator_body CicUniv.empty_ugraph with CicTypeChecker.TypeCheckerFailure msg -> - raise (Elim_failure (sprintf + raise (Elim_failure (lazy (sprintf "type checker failure while type checking:\n%s\nerror:\n%s" - (CicPp.ppterm eliminator_body) msg)) + (CicPp.ppterm eliminator_body) (Lazy.force msg)))) in if not (fst (CicReduction.are_convertible [] eliminator_type computed_type ugraph))