]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/toplevel/metaBrg.ml
- new semantic log system
[helm.git] / helm / software / lambda-delta / toplevel / metaBrg.ml
index 4088c2982f25115891f09fcc51d3c8f57f86a1b3..192613264688473fcd64b3577c80d4d829a8ec87 100644 (file)
@@ -20,23 +20,23 @@ let map_fold_left f map1 map2 a l =
 
 let map_args f t v = f (B.Appl (v, t))
 
-let map_pars f t (id, w) = f (B.Bind (id, B.Abst, w, t))
+let map_pars f t (id, w) = f (B.Bind (id, B.Abst w, t))
 
 let rec xlate_term f = function
    | M.Sort s            -> 
       let f h = f (B.Sort h) in
       if s then f 0 else f 1
    | M.LRef (l, i)       ->
-      f (B.LRef (l - i))
+      f (B.LRef (l - succ i))
    | M.GRef (_, uri, vs) ->
       let f vs = map_fold_left f Cps.id map_args (B.GRef uri) vs in
-      Cps.list_rev_map f xlate_term vs
+      Cps.list_map f xlate_term vs
    | M.Appl (v, t)       ->
       let f v t = f (B.Appl (v, t)) in
       let f v = xlate_term (f v) t in
       xlate_term f v
    | M.Abst (id, w, t)   ->
-      let f w t = f (B.Bind (id, B.Abst, w, t)) in
+      let f w t = f (B.Bind (id, B.Abst w, t)) in
       let f w = xlate_term (f w) t in
       xlate_term f w
 
@@ -46,14 +46,14 @@ let xlate_pars f (id, w) =
 
 let xlate_entry f = function
    | e, pars, uri, u, None        ->
-      let f u = f (e, uri, B.Abst, u) in
+      let f u = f (e, uri, B.Abst u) in
       let f pars = map_fold_left f xlate_term map_pars u pars in      
-      Cps.list_rev_map f xlate_pars pars
+      Cps.list_map f xlate_pars pars
    | e, pars, uri, u, Some (_, t) ->
-      let f u t = f (e, uri, B.Abbr, (B.Cast (u, t))) in
+      let f u t = f (e, uri, B.Abbr (B.Cast (u, t))) in
       let f pars u = map_fold_left (f u) xlate_term map_pars t pars in      
       let f pars = map_fold_left (f pars) xlate_term map_pars u pars in
-      Cps.list_rev_map f xlate_pars pars
+      Cps.list_map f xlate_pars pars
 
 let xlate_item f = function
    | None   -> f None