From: Claudio Sacerdoti Coen Date: Thu, 8 Oct 2009 16:07:20 +0000 (+0000) Subject: Printing extremely large terms no longer raises Failure. X-Git-Tag: make_still_working~3347 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=03f203779699068d517f298fe31b511821cdd561;p=helm.git Printing extremely large terms no longer raises Failure. --- diff --git a/helm/software/components/ng_kernel/nCicPp.ml b/helm/software/components/ng_kernel/nCicPp.ml index f608acc15..62dc58e4e 100644 --- a/helm/software/components/ng_kernel/nCicPp.ml +++ b/helm/software/components/ng_kernel/nCicPp.ml @@ -180,11 +180,14 @@ let ppterm ~formatter:f ~context ~subst ~metasenv:_ ?(inside_fix=false) t = ;; let on_buffer f t = + try let buff = Buffer.create 100 in let formatter = F.formatter_of_buffer buff in f ~formatter:formatter t; F.fprintf formatter "@?"; Buffer.contents buff + with Failure m -> + "[[Unprintable: " ^ m ^ "]]" ;; let ppterm ~formatter ~context ~subst ~metasenv ?(margin=80) ?inside_fix t =