X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_transformations%2FboxPp.ml;h=073bf633d0ee901a869d4b9c3697b6f21fd71014;hb=fdd8107cc53f5e862004aa5fcd48593ee5634234;hp=fd06a42039835bc936cf478273b03aaad2b927c0;hpb=fc6a9cb859b3edbfe308c07b62e1c5f287c9f865;p=helm.git diff --git a/helm/ocaml/cic_transformations/boxPp.ml b/helm/ocaml/cic_transformations/boxPp.ml index fd06a4203..073bf633d 100644 --- a/helm/ocaml/cic_transformations/boxPp.ml +++ b/helm/ocaml/cic_transformations/boxPp.ml @@ -29,7 +29,7 @@ let to_string object_to_string b = function [] -> layout := current_s::!layout | Box.Text (_,s)::tl -> aux_h (current_s ^ s) tl - | (Box.Space _)::_ -> assert false + | (Box.Space _)::tl -> aux_h (current_s ^ " ") tl | Box.H (_,bl)::tl -> aux_h current_s (bl@tl) | Box.V (_,[])::tl -> aux_h current_s tl | Box.V (_,[b])::tl -> aux_h current_s (b::tl) @@ -38,10 +38,17 @@ let to_string object_to_string b = aux_h (String.make (String.length current_s) ' ') (Box.V([],bl')::tl) | Box.Object (_,obj)::tl -> aux_h (current_s ^ (object_to_string obj)) tl | (Box.Action _)::tl -> assert false + | (Box.Ink _)::tl -> aux_h (current_s ^ "----------") tl in aux_h "" [b] ; List.rev !layout -let pp_term t = - String.concat "\n" (to_string CicAstPp.pp_term (Ast2pres.ast2box t)) +let pp_term ?ids_to_uris t = + let ids_to_uris = + match ids_to_uris with + | None -> Hashtbl.create 0 + | Some tbl -> tbl + in + String.concat "\n" (to_string CicAstPp.pp_term + (Ast2pres.ast2astBox (t, ids_to_uris)))