X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Flambda-delta%2Fbasic_rg%2FbrgUntrusted.ml;h=4c1ae61dbc47cfd6cd40220d5832c4e95201f15e;hb=2b1375e4b44e2ef351a6341a5bb0a4823e8daae5;hp=959a746194a1d9ca187843d6ccae60b783b54313;hpb=2e451dca46e509fd7e7772f3d2e438c189ce10a1;p=helm.git diff --git a/helm/software/lambda-delta/basic_rg/brgUntrusted.ml b/helm/software/lambda-delta/basic_rg/brgUntrusted.ml index 959a74619..4c1ae61db 100644 --- a/helm/software/lambda-delta/basic_rg/brgUntrusted.ml +++ b/helm/software/lambda-delta/basic_rg/brgUntrusted.ml @@ -20,17 +20,19 @@ module T = BrgType (* Interface functions ******************************************************) (* to share *) -let type_check err f ?(si=false) g = function +let type_check err f st = function | a, uri, Y.Abst t -> let f xt tt = let e = E.set_entity (a, uri, Y.Abst xt) in f tt e in - let st = Y.initial_status si in - L.loc := U.string_of_uri uri; T.type_of err f st g R.empty_kam t + L.loc := U.string_of_uri uri; T.type_of err f st R.empty_kam t | a, uri, Y.Abbr t -> let f xt tt = + let xt = match xt with + | B.Cast _ -> xt + | _ -> B.Cast ([], tt, xt) + in let e = E.set_entity (a, uri, Y.Abbr xt) in f tt e in - let st = Y.initial_status si in - L.loc := U.string_of_uri uri; T.type_of err f st g R.empty_kam t + L.loc := U.string_of_uri uri; T.type_of err f st R.empty_kam t | _, _, Y.Void -> assert false