X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fhelena%2Fsrc%2Fbasic_ag%2FbagUntrusted.ml;h=dc1a310f9d595e67161838a446e6069c667fb120;hb=88977b2d546e547e23b046792fe2ad8f6ff192a4;hp=5d04a3bf47d4e35af5f141f93ba8a5dc1e565d66;hpb=95872555aaa040a22ad2d93cb1278f79e20da70c;p=helm.git diff --git a/helm/software/helena/src/basic_ag/bagUntrusted.ml b/helm/software/helena/src/basic_ag/bagUntrusted.ml index 5d04a3bf4..dc1a310f9 100644 --- a/helm/software/helena/src/basic_ag/bagUntrusted.ml +++ b/helm/software/helena/src/basic_ag/bagUntrusted.ml @@ -16,14 +16,20 @@ module Z = Bag module ZE = BagEnvironment module ZT = BagType +IFDEF TYPE THEN + (* Interface functions ******************************************************) (* to share *) -let type_check f st = function - | a, uri, E.Abst (n, t) -> - let f xt tt = ZE.set_entity (f tt) (a, uri, E.Abst (n, xt)) in - L.loc := U.string_of_uri uri; ZT.type_of f st Z.empty_lenv t - | a, uri, E.Abbr t -> - let f xt tt = ZE.set_entity (f tt) (a, uri, E.Abbr xt) in - L.loc := U.string_of_uri uri; ZT.type_of f st Z.empty_lenv t - | _, _, E.Void -> assert false +let type_check err f st = function + | ra, na, uri, E.Abst (a, t) -> + let err msg = err (L.Uri uri :: msg) in + let f xt tt = ZE.set_entity (f tt) (ra, na, uri, E.abst a xt) in + ZT.type_of err f st Z.empty_lenv t + | ra, na, uri, E.Abbr (a, t) -> + let err msg = err (L.Uri uri :: msg) in + let f xt tt = ZE.set_entity (f tt) (ra, na, uri, E.abbr a xt) in + ZT.type_of err f st Z.empty_lenv t + | _, _, _, E.Void -> assert false + +END