]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/common/entity.ml
the sort hierarchy parameter enter the kernel status
[helm.git] / helm / software / lambda-delta / common / entity.ml
index 3aa1ef6b59cfb086430cd408d734d64ccc36898b..d6314150b935e77fca6d6bedbeb7a58c04548cbb 100644 (file)
@@ -21,13 +21,24 @@ type attrs = attr list (* attributes *)
 
 type 'term bind = Abst of 'term (* declaration: domain *)
                 | Abbr of 'term (* definition: body *)
+               | Void          (* exclusion *)
 
 type 'term entity = attrs * uri * 'term bind (* attrs, name, binder *)
 
-type uri_generator = string -> string (* this could be in CPS *) 
+type uri_generator = string -> string
+
+type status = {
+   g: Hierarchy.graph; (* sort hierarchy parameter *)
+   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
+
 let rec name err f = function
    | Name (n, r) :: _ -> f n r
    | _ :: tl          -> name err f tl
@@ -82,3 +93,9 @@ let xlate f xlate_term = function
       let f t = f (a, uri, Abst t) in xlate_term f t
    | a, uri, Abbr t ->
       let f t = f (a, uri, Abbr t) in xlate_term f t
+   | _, _, Void   ->
+      assert false
+
+let initial_status g expand si = {
+   g = g; delta = false; rt = false; si = si; expand = expand
+}