]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/src/basic_ag/bagType.ml
when sort inclusion is enabled, we can produce conversion constraints in xml
[helm.git] / helm / software / lambda-delta / src / basic_ag / bagType.ml
index 1314218d39f3f5933423a8cc5907da70cfbf7d31..9069040115e3eb1e3a43c4728a6f45abf67abd53 100644 (file)
 
 module U  = NUri
 module C  = Cps
-module S  = Share
+module W  = Share
 module L  = Log
 module E  = Entity
 module H  = Hierarchy
+module S  = Status
 module Z  = Bag
 module ZO = BagOutput
 module ZE = BagEnvironment
@@ -73,7 +74,7 @@ let rec b_type_of f st c x =
       ZE.get_entity f uri   
    | Z.Bind (l, id, Z.Abbr v, t) ->
       let f xv xt tt =
-         f (S.sh2 v xv t xt x (Z.bind_abbr l id)) (Z.bind_abbr l id xv tt)
+         f (W.sh2 v xv t xt x (Z.bind_abbr l id)) (Z.bind_abbr l id xv tt)
       in
       let f xv cc = b_type_of (f xv) st cc t in
       let f xv = Z.push "type abbr" (f xv) c l id (Z.Abbr xv) in
@@ -84,14 +85,14 @@ let rec b_type_of f st c x =
       type_of f st c v
    | Z.Bind (l, id, Z.Abst u, t) ->
       let f xu xt tt =
-        f (S.sh2 u xu t xt x (Z.bind_abst l id)) (Z.bind_abst l id xu tt)
+        f (W.sh2 u xu t xt x (Z.bind_abst l id)) (Z.bind_abst l id xu tt)
       in
       let f xu cc = b_type_of (f xu) st cc t in
       let f xu _ = Z.push "type abst" (f xu) c l id (Z.Abst xu) in
       type_of f st c u
    | Z.Bind (l, id, Z.Void, t)   ->
       let f xt tt = 
-         f (S.sh1 t xt x (Z.bind l id Z.Void)) (Z.bind l id Z.Void tt)
+         f (W.sh1 t xt x (Z.bind l id Z.Void)) (Z.bind l id Z.Void tt)
       in
       let f cc = b_type_of f st cc t in
       Z.push "type void" f c l id Z.Void   
@@ -103,10 +104,10 @@ let rec b_type_of f st c x =
            L.unbox (succ level);
            let f a =                
 (*            L.warn (Printf.sprintf "Convertible: %b" a); *)
-              if a then f (S.sh2 v xv t xt x Z.appl) (Z.appl xv tt)
+              if a then f (W.sh2 v xv t xt x Z.appl) (Z.appl xv tt)
               else error3 c xv vv w
            in
-           ZR.are_convertible f ~si:st.E.si c w vv
+           ZR.are_convertible f ~si:st.S.si c w vv
         | _                                    -> 
            error1 "not a function" c xt
       in
@@ -116,9 +117,9 @@ let rec b_type_of f st c x =
    | Z.Cast (u, t)            ->
       let f xu xt tt a =  
          (* L.warn (Printf.sprintf "Convertible: %b" a); *)
-        if a then f (S.sh2 u xu t xt x Z.cast) xu else error3 c xt tt xu
+        if a then f (W.sh2 u xu t xt x Z.cast) xu else error3 c xt tt xu
       in
-      let f xu xt tt = ZR.are_convertible (f xu xt tt) ~si:st.E.si c xu tt in
+      let f xu xt tt = ZR.are_convertible (f xu xt tt) ~si:st.S.si c xu tt in
       let f xu _ = b_type_of (f xu) st c t in
       type_of f st c u