D.shift (xlate_term f c) e t
(* this case should be removed by improving alpha-conversion *)
| D.TBind (ab, D.Abst (n, ws), D.TCast (ac, u, t)) ->
- xlate_term f c (D.TCast (ac, D.TBind (ab, D.Abst (N.pred n, ws), u), D.TBind (ab, D.Abst (n, ws), t)))
+ xlate_term f c (D.TCast (ac, D.TBind (ab, D.Abst (N.minus n 1, ws), u), D.TBind (ab, D.Abst (n, ws), t)))
| D.TBind (a, b, t) ->
let f cc =
let a, l, b = List.hd cc in
and xlate_bind f c a = function
| D.Abst (_, w) ->
- let f ww = Z.push "xlate_bind" f c a (J.new_location ()) (Z.Abst ww) in
+ let f ww = Z.push "xlate_bind" f c a (J.new_mark ()) (Z.Abst ww) in
xlate_term f c w
| D.Abbr v ->
- let f vv = Z.push "xlate_bind" f c a (J.new_location ()) (Z.Abbr vv) in
+ let f vv = Z.push "xlate_bind" f c a (J.new_mark ()) (Z.Abbr vv) in
xlate_term f c v
| D.Void ->
- Z.push "xlate_bind" f c a (J.new_location ()) Z.Void
+ Z.push "xlate_bind" f c a (J.new_mark ()) Z.Void
(* internal functions: bag to crg term **************************************)
let rec xlate_bk_term f c = function
- | Z.Sort h -> f (D.TSort ([], h))
- | Z.GRef s -> f (D.TGRef ([], s))
+ | Z.Sort h -> f (D.TSort (E.empty_node, h))
+ | Z.GRef s -> f (D.TGRef (E.empty_node, s))
| Z.LRef l ->
- let f i = f (D.TLRef ([], i)) in
+ let f i = f (D.TLRef (E.empty_node, i)) in
Z.nth C.err f l c
| Z.Cast (u, t) ->
- let f tt uu = f (D.TCast ([], uu, tt)) in
+ let f tt uu = f (D.TCast (E.empty_node, uu, tt)) in
let f tt = xlate_bk_term (f tt) c u in
xlate_bk_term f c t
| Z.Appl (u, t) ->
- let f tt uu = f (D.TAppl ([], uu, tt)) in
+ let f tt uu = f (D.TAppl (E.empty_node, uu, tt)) in
let f tt = xlate_bk_term (f tt) c u in
xlate_bk_term f c t
| Z.Bind (a, l, b, t) ->