X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fng_refiner%2FnCicRefiner.ml;h=757fceea2a4a5dd83e728fb88e069a7f28f54957;hb=dc7e826399162e2fde3ddf1f02d5530d6cd11205;hp=e2aabb31cddd76a68c301841dad7746827516adf;hpb=897373ab09685b29cbfab8deb6c868ece21c5cc1;p=helm.git diff --git a/helm/software/components/ng_refiner/nCicRefiner.ml b/helm/software/components/ng_refiner/nCicRefiner.ml index e2aabb31c..757fceea2 100644 --- a/helm/software/components/ng_refiner/nCicRefiner.ml +++ b/helm/software/components/ng_refiner/nCicRefiner.ml @@ -22,13 +22,14 @@ let indent = ref "";; let inside c = indent := !indent ^ String.make 1 c;; let outside () = indent := String.sub !indent 0 (String.length !indent -1);; - +let debug = ref false;; let pp s = - prerr_endline (Printf.sprintf "%-20s" !indent ^ " " ^ Lazy.force s) + if !debug then + prerr_endline (Printf.sprintf "%-20s" !indent ^ " " ^ Lazy.force s) + else + () ;; -let pp _ = ();; - let wrap_exc msg = function | NCicUnification.Uncertain _ -> Uncertain msg | NCicUnification.UnificationFailure _ -> RefineFailure msg @@ -377,7 +378,7 @@ and try_coercions rdb let rec first exc = function | [] -> raise (wrap_exc (lazy (localise orig_t, Printf.sprintf - "The term %s has type %s but is here used with type %s" + "The term\n%s\nhas type\n%s\nbut is here used with type\n%s" (NCicPp.ppterm ~metasenv ~subst ~context t) (NCicPp.ppterm ~metasenv ~subst ~context infty) (NCicPp.ppterm ~metasenv ~subst ~context expty))) exc)