- let _, _, a, b = B.get e i in
- P.fprintf och "%a" (name err) a
- | B.GRef (_, s) ->
- P.fprintf och "$%s" (U.string_of_uri s)
- | B.Cast (_, u, t) ->
- P.fprintf och "{%a}.%a" (pp_term st e) u (pp_term st e) t
- | B.Appl (_, v, t) ->
- P.fprintf och "(%a).%a" (pp_term st e) v (pp_term st e) t
- | B.Bind (a, B.Abst (n, w), t) ->
- let f a =
- let ee = B.push e B.empty a (B.abst n w) in
- P.fprintf och "%a[%a:%a].%a" (pp_level st) n (name C.err) a (pp_term st e) w (pp_term st ee) t
- in
- rename f e a
- | B.Bind (a, B.Abbr v, t) ->
- let f a =
- let ee = B.push e B.empty a (B.abbr v) in
- P.fprintf och "[%a=%a].%a" (name C.err) a (pp_term st e) v (pp_term st ee) t
- in
- rename f e a
- | B.Bind (a, B.Void, t) ->
- let f a =
- let ee = B.push e B.empty a B.Void in
- P.fprintf och "[%a].%a" (name C.err) a (pp_term st ee) t
- in
- rename f e a
+ let _, _, _, y, b = B.get e i in
+ KP.fprintf och "%a" (name err) y
+ | B.GRef (_, s) ->
+ let u = U.string_of_uri s in
+ KP.fprintf och "$%s" (if !G.short then KF.basename u else u)
+ | B.Cast (u, t) ->
+ KP.fprintf och "<%a>.%a" (pp_term st e) u (pp_term st e) t
+ | B.Appl (_, v, t) ->
+ KP.fprintf och "(%a).%a" (pp_term st e) v (pp_term st e) t
+ | B.Bind (y, B.Abst (r, n, w), t) ->
+ let y = R.alpha B.mem e y in
+ let ee = B.push e B.empty E.empty_node y (B.abst r n w) in
+ KP.fprintf och "%a%a[%a:%a].%a" (pp_level st) n pp_reduced r (name C.start) y (pp_term st e) w (pp_term st ee) t
+ | B.Bind (y, B.Abbr v, t) ->
+ let y = R.alpha B.mem e y in
+ let ee = B.push e B.empty E.empty_node y (B.abbr v) in
+ KP.fprintf och "[%a=%a].%a" (name C.start) y (pp_term st e) v (pp_term st ee) t
+ | B.Bind (y, B.Void, t) ->
+ let y = R.alpha B.mem e y in
+ let ee = B.push e B.empty E.empty_node y B.Void in
+ KP.fprintf och "[%a].%a" (name C.start) y (pp_term st ee) t