2 let to_string object_to_string b =
4 let rec aux_h current_s =
6 [] -> layout := current_s::!layout
7 | Box.Text (_,s)::tl -> aux_h (current_s ^ s) tl
8 | (Box.Space _)::_ -> assert false
9 | Box.H (_,bl)::tl -> aux_h current_s (bl@tl)
10 | Box.V (_,[])::tl -> aux_h current_s tl
11 | Box.V (_,[b])::tl -> aux_h current_s (b::tl)
12 | Box.V (_,b::bl')::tl ->
14 aux_h (String.make (String.length current_s) ' ') (Box.V([],bl')::tl)
15 | Box.Object (_,obj)::tl -> aux_h (current_s ^ (object_to_string obj)) tl
16 | (Box.Action _)::tl -> assert false
21 let pp_term t = String.concat "\n" (to_string CicAstPp.pp_term (Ast2pres.ast2box t))