]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/src/common/entity.ml
when sort inclusion is enabled, we can produce conversion constraints in xml
[helm.git] / helm / software / lambda-delta / src / common / entity.ml
index e32b347a84e70589a092138422a0f59dd965d956..b88af255c288911108570404d60aa5a6e6188734 100644 (file)
@@ -9,10 +9,13 @@
      \ /   This software is distributed as is, NO WARRANTY.              
       V_______________________________________________________________ *)
 
-module O = Options
+module U = NUri
+module N = Level
+
+type uri = U.uri
+
+type id = string (* identifier *)
 
-type uri = NUri.uri
-type id = Aut.id
 type name = id * bool (* token, real? *)
 
 type names = name list
@@ -25,19 +28,12 @@ type attr = Name of name      (* name *)
 
 type attrs = attr list (* attributes *)
 
-type 'term bind = Abst of 'term (* declaration: domain *)
-                | Abbr of 'term (* definition: body *)
-               | Void          (* exclusion *)
+type 'term bind = Abst of N.level * 'term (* declaration: level, domain *)
+                | Abbr of 'term           (* definition: body           *)
+               | Void                    (* exclusion                  *)
 
 type 'term entity = attrs * uri * 'term bind (* attrs, name, binder *)
 
-type status = {
-   delta: bool;        (* global delta-expansion *)
-   rt: bool;           (* reference typing *)
-   si: bool;           (* sort inclusion *)
-   expand: bool        (* always expand global definitions *)
-}
-
 (* helpers ******************************************************************)
 
 let common f (a, u, _) = f a u
@@ -110,18 +106,9 @@ let rec rev_append_names ns = function
    | _ :: tl      -> rev_append_names ns tl
 
 let xlate f xlate_term = function
-   | a, uri, Abst t ->
-      let f t = f (a, uri, Abst t) in xlate_term f t
-   | a, uri, Abbr t ->
+   | a, uri, Abst (n, t) ->
+      let f t = f (a, uri, Abst (n, t)) in xlate_term f t
+   | a, uri, Abbr t      ->
       let f t = f (a, uri, Abbr t) in xlate_term f t
-   | _, _, Void   ->
+   | _, _, Void          ->
       assert false
-
-let initial_status () = {
-   delta = false; rt = false; si = !O.si; expand = !O.expand
-}
-
-let refresh_status st = {st with
-   si = !O.si; expand = !O.expand
-}
-