]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/helena/src/basic_rg/brgType.ml
- new attributes system
[helm.git] / helm / software / helena / src / basic_rg / brgType.ml
index 29b73beeb587c85bc58f2918e7ec652132c3648c..5ba07c876355a1e63e8ec3b4c1c6f93873b1285f 100644 (file)
@@ -82,10 +82,10 @@ let rec b_type_of err f st m x =
       end
    | B.GRef (_, uri)         ->
       begin match BE.get_entity uri with
-         | _, _, E.Abst (_, w)             -> f x w
-        | _, _, E.Abbr (B.Cast (_, w, _)) -> f x w
-        | _, _, E.Abbr _                  -> assert false
-        | _, _, E.Void                    ->
+         | _, _, _, E.Abst w                  -> f x w
+        | _, _, _, E.Abbr (B.Cast (_, w, _)) -> f x w
+        | _, _, _, E.Abbr _                  -> assert false
+        | _, _, _, E.Void                    ->
             error1 err "reference to unknown entry" m x
       end
    | B.Bind (a, B.Abbr v, t) ->
@@ -96,12 +96,12 @@ let rec b_type_of err f st m x =
       let f xv = f xv (BR.push m a (B.abbr xv)) in
       let f xv vv = match xv with 
         | B.Cast _ -> f xv
-         | _        -> f (B.Cast ([], vv, xv))
+         | _        -> f (B.Cast (E.empty_node, vv, xv))
       in
       type_of err f st m v
    | B.Bind (a, B.Abst (n, u), t) ->
       let f xu xt tt =
-        f (W.sh2 u xu t xt x (B.bind_abst n a)) (B.bind_abst (N.pred n) a xu tt)
+        f (W.sh2 u xu t xt x (B.bind_abst n a)) (B.bind_abst (N.minus n 1) a xu tt)
       in
       let f xu m = b_type_of err (f xu) st m t in
       let f xu _ = f xu (BR.push m a (B.abst n xu)) in