From: Claudio Sacerdoti Coen Date: Fri, 30 Oct 2009 10:17:49 +0000 (+0000) Subject: Sometimes it is useful to be able to print the subst without applying it. X-Git-Tag: make_still_working~3222 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=40ebec98f53ac1a9a1e7a462cbf0dd3e3d8d42fd;p=helm.git Sometimes it is useful to be able to print the subst without applying it. --- diff --git a/helm/software/components/ng_kernel/nCicPp.ml b/helm/software/components/ng_kernel/nCicPp.ml index 6131a7daf..1a793b92f 100644 --- a/helm/software/components/ng_kernel/nCicPp.ml +++ b/helm/software/components/ng_kernel/nCicPp.ml @@ -261,8 +261,9 @@ let rec ppsubst ~formatter ~subst ~metasenv = function ppsubst ~formatter ~subst ~metasenv tl ;; -let ppsubst ~formatter ~metasenv subst = - ppsubst ~formatter ~metasenv ~subst subst +let ppsubst ~formatter ~metasenv ?(use_subst=true) subst = + let ssubst = if use_subst then subst else [] in + ppsubst ~formatter ~metasenv ~subst:ssubst subst ;; let string_of_generated = function @@ -355,7 +356,9 @@ let ppcontext ?sep ~subst ~metasenv ctx = let ppmetasenv ~subst metasenv = on_buffer (ppmetasenv ~subst) metasenv;; -let ppsubst ~metasenv subst = on_buffer (ppsubst ~metasenv) subst;; +let ppsubst ~metasenv ?use_subst subst = + on_buffer (ppsubst ~metasenv ?use_subst) subst +;; let ppobj obj = on_buffer ppobj obj;; diff --git a/helm/software/components/ng_kernel/nCicPp.mli b/helm/software/components/ng_kernel/nCicPp.mli index 3b4cffb6d..a01895678 100644 --- a/helm/software/components/ng_kernel/nCicPp.mli +++ b/helm/software/components/ng_kernel/nCicPp.mli @@ -33,7 +33,8 @@ val ppcontext: val ppmetasenv: subst:NCic.substitution -> NCic.metasenv -> string -val ppsubst: metasenv:NCic.metasenv -> NCic.substitution -> string +val ppsubst: + metasenv:NCic.metasenv -> ?use_subst:bool -> NCic.substitution -> string val ppobj: NCic.obj -> string