]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/basic_ag/bagUntrusted.ml
basic_rg: improved interface, unwind removed from applicability check
[helm.git] / helm / software / lambda-delta / basic_ag / bagUntrusted.ml
index e80a06125cf286f037394b1a5cb7d1385256c605..e588caa496d3bf669bb8241b0ed1bef9fe8f150f 100644 (file)
@@ -9,6 +9,7 @@
      \ /   This software is distributed as is, NO WARRANTY.              
       V_______________________________________________________________ *)
 
+module L = Log
 module B = Bag
 module E = BagEnvironment
 module T = BagType
@@ -16,16 +17,16 @@ module T = BagType
 (* Interface functions ******************************************************)
 
 (* to share *)
-let type_check f g = function
+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
-      T.type_of f g B.empty_context t
+      L.loc := a; T.type_of f ~si g B.empty_context 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
-      T.type_of f g B.empty_context t
+      L.loc := a; T.type_of f ~si g B.empty_context t
    | Some (a, uri, B.Void)   ->
       let f obj = f None (Some obj) in
-      E.set_obj f (a, uri, B.Void)
+      L.loc := a; E.set_obj f (a, uri, B.Void)