X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fng_kernel%2FnCicPp.ml;h=73c3f572c0ff1dbade596812d08ae80c25f84ae6;hb=a981b42002f822aa49a41b3889a76b9438b093bb;hp=5f29d25d87093d71cf26875d045e7af5e99ec614;hpb=b0b6b600e029435bfce53f41cd267c669a1f8dc2;p=helm.git diff --git a/helm/software/components/ng_kernel/nCicPp.ml b/helm/software/components/ng_kernel/nCicPp.ml index 5f29d25d8..73c3f572c 100644 --- a/helm/software/components/ng_kernel/nCicPp.ml +++ b/helm/software/components/ng_kernel/nCicPp.ml @@ -11,17 +11,6 @@ (* $Id$ *) -let ppterm = - ref (fun ~context:_ ~subst:_ ~metasenv:_ ?inside_fix _ -> - ignore (inside_fix) ; "Please, set a pp callback") -;; - -let set_ppterm f = ppterm := f;; - -let ppterm ~context ~subst ~metasenv ?inside_fix t = - !ppterm ~context ~subst ~metasenv ?inside_fix t -;; - module C = NCic module R = NReference @@ -54,7 +43,7 @@ let r2s pp_fix_name r = with NCicLibrary.ObjectNotFound _ -> R.string_of_reference r ;; -let trivial_pp_term ~context ~subst:_ ~metasenv:_ ?(inside_fix=false) t = +let ppterm ~context ~subst ~metasenv:_ ?(inside_fix=false) t = let buff = Buffer.create 100 in let f = Format.formatter_of_buffer buff in let module F = Format in @@ -132,11 +121,18 @@ let trivial_pp_term ~context ~subst:_ ~metasenv:_ ?(inside_fix=false) t = if not toplevel then F.fprintf f ")"; F.fprintf f "@]" | C.Implicit _ -> F.fprintf f "?" + | C.Meta (n,lc) when List.mem_assoc n subst -> + let _,_,t,_ = List.assoc n subst in + aux ctx (NCicSubstitution.subst_meta lc t) | C.Meta (n,(shift,C.Irl len)) -> F.fprintf f "?%d(%d,%d)" n shift len | C.Meta (n,(shift,C.Ctx l)) -> F.fprintf f "?%d(%d,[" n shift; - List.iter (fun x -> aux ctx x; F.fprintf f ",") l; + if List.length l > 0 then + begin + aux ctx (List.hd l); + List.iter (fun x -> F.fprintf f ",";aux ctx x) (List.tl l); + end; F.fprintf f "])" | C.Sort C.Prop -> F.fprintf f "Prop" | C.Sort (C.Type []) -> F.fprintf f "IllFormedUniverse"