]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/basic_rg/brgUntrusted.ml
autItem : the uris of the objects involved in the implicit coercions
[helm.git] / helm / software / lambda-delta / basic_rg / brgUntrusted.ml
index 80a9d4fe78d67433636b98e34155c5ce8e600eb6..96be162172c8a1b7ee7b1ae7d596c8d730f45d69 100644 (file)
@@ -15,11 +15,17 @@ module T = BrgType
 
 (* Interface functions ******************************************************)
 
+(* to share *)
 let type_check f g = function
-   | None                           -> f None
-   | Some ((_, _, B.Abst t) as obj)
-   | Some ((_, _, B.Abbr t) as obj) ->
-       let f tt obj = f (Some (tt, obj)) in
-       let f tt = E.set_obj (f tt) obj in
-       T.type_of f g B.empty_context t
-   | Some (_, _, B.Void)            -> assert false
+   | 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
+   | 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
+   | Some (a, uri, B.Void)   ->
+      let f obj = f None (Some obj) in
+      E.set_obj f (a, uri, B.Void)