- F.fprintf frm "<Appl%a/>%a%a" id a exp_boxed v exp_term t
- | B.Bind (a, b, t) ->
- F.fprintf frm "%a%a" (exp_bind a) b exp_term t
-
-and exp_boxed frm t =
- F.fprintf frm "@,@[<v3> %a@]@," exp_term t
-
-and exp_bind a frm = function
- | B.Abst w ->
- F.fprintf frm "<Abst%a/>%a" id a exp_boxed w
- | B.Abbr v ->
- F.fprintf frm "<Abbr%a/>%a" id a exp_boxed v
- | B.Void ->
- F.fprintf frm "<Void%a/>" id a
-
-let export_obj frm = function
- | _, uri, B.Abst w ->
- let str = U.string_of_uri uri in
- F.fprintf frm "%s@,@,<ABST uri=%S>%a</ABST>"
- (CL.doctype "ABST") str exp_boxed w
- | _, uri, B.Abbr v ->
- let str = U.string_of_uri uri in
- F.fprintf frm "%s@,@,<ABBR uri=%S>%a</ABBR>"
- (CL.doctype "ABBR") str exp_boxed v
- | _, uri, B.Void ->
- let str = U.string_of_uri uri in
- F.fprintf frm "%s@,@,<VOID uri=%S/>"
- (CL.doctype "VOID") str
+ F.fprintf frm "<Appl%a>%a</Appl>@,%a" X.old_name a (exp_boxed c) v (exp_term c) t
+ | B.Bind (b, t) ->
+ let f b cc = F.fprintf frm "%a@,%a" (exp_bind c) b (exp_term cc) t in
+ let f b = B.push (f b) c b in
+ rename_bind f c b
+
+and exp_boxed c frm t =
+ F.fprintf frm "@,@[<v3> %a@]@," (exp_term c) t
+
+and exp_bind c frm = function
+ | B.Abst (a, w) ->
+ F.fprintf frm "<Abst%a>%a</Abst>" X.old_name a (exp_boxed c) w
+ | B.Abbr (a, v) ->
+ F.fprintf frm "<Abbr%a/>%a</Abbr>" X.old_name a (exp_boxed c) v
+ | B.Void a ->
+ F.fprintf frm "<Void%a/>" X.old_name a
+
+let export_term frm t =
+ F.fprintf frm "%a" (exp_boxed B.empty_lenv) t