X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Flambda-delta%2Fbasic_ag%2FbagUntrusted.ml;h=33d6a5fbd21985d776425272fd2848e0c8a209ed;hb=4c157ac5c58f34fffc98289c2d2e71032d584a83;hp=69112d2fffaa44de83d86ee7d5042f9c57e46c6c;hpb=8a4c83c6341976f2bb70eb44a0c70f2aa95ad3ea;p=helm.git diff --git a/helm/software/lambda-delta/basic_ag/bagUntrusted.ml b/helm/software/lambda-delta/basic_ag/bagUntrusted.ml index 69112d2ff..33d6a5fbd 100644 --- a/helm/software/lambda-delta/basic_ag/bagUntrusted.ml +++ b/helm/software/lambda-delta/basic_ag/bagUntrusted.ml @@ -9,7 +9,9 @@ \ / This software is distributed as is, NO WARRANTY. V_______________________________________________________________ *) +module U = NUri module L = Log +module Y = Entity module B = Bag module E = BagEnvironment module T = BagType @@ -17,16 +19,11 @@ module T = BagType (* Interface functions ******************************************************) (* to share *) -let type_check f ?(si=false) g = function - | None -> f None None - | Some (a, uri, B.Abst t) -> - let f tt obj = f (Some tt) (Some obj) in - let f xt tt = E.set_obj (f tt) (a, uri, B.Abst xt) in - L.loc := a; T.type_of f ~si g B.empty_lenv t - | Some (a, uri, B.Abbr t) -> - let f tt obj = f (Some tt) (Some obj) in - let f xt tt = E.set_obj (f tt) (a, uri, B.Abbr xt) in - L.loc := a; T.type_of f ~si g B.empty_lenv t - | Some (a, uri, B.Void) -> - let f obj = f None (Some obj) in - L.loc := a; E.set_obj f (a, uri, B.Void) +let type_check f st = function + | a, uri, Y.Abst t -> + let f xt tt = E.set_entity (f tt) (a, uri, Y.Abst xt) in + L.loc := U.string_of_uri uri; T.type_of f st B.empty_lenv t + | a, uri, Y.Abbr t -> + let f xt tt = E.set_entity (f tt) (a, uri, Y.Abbr xt) in + L.loc := U.string_of_uri uri; T.type_of f st B.empty_lenv t + | _, _, Y.Void -> assert false