]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/helena/src/common/entity.ml
- revision of ground_2 and basic_2
[helm.git] / helm / software / helena / src / common / entity.ml
index f616b780c54bf368f74f8be7d5d80f870d9b0f28..c53db162bdb0d4edc40bb808e2bf395faf429c6f 100644 (file)
@@ -10,7 +10,7 @@
       V_______________________________________________________________ *)
 
 module U = NUri
-module N = Level
+module N = Layer
 
 type uri = U.uri
 
@@ -25,8 +25,9 @@ type meta = Main     (* main object *)
 
 type node_attrs = {
    n_name: name option; (* name *)
-   n_apix: int option;  (* additional position index *)
+   n_apix: int;         (* additional position index *)
    n_degr: int;         (* degree *)
+   n_sort: int;         (* sort *)
 }
 
 type root_attrs = {
@@ -42,8 +43,8 @@ type 'term entity = root_attrs * node_attrs * uri * 'term bind (* attrs, uri, bi
 
 (* helpers ******************************************************************)
 
-let node_attrs ?(real=true) ?apix ?name ?(degr=0) () = {
-   n_apix = apix; n_name = name; n_degr = degr;
+let node_attrs ?(apix=0) ?name ?(degr=0) ?(sort=0) () = {
+   n_apix = apix; n_name = name; n_degr = degr; n_sort = sort
 }
 
 let root_attrs ?(meta=[]) ?info () = {
@@ -60,10 +61,6 @@ let rec name err f a = match a.n_name with
    | Some (n, r) -> f n r
    | None        -> err ()
 
-let rec apix err f a = match a.n_apix with
-   | Some i -> f i
-   | None   -> err ()
-
 let rec info err f a = match a.r_info with
    | Some (lg, tx) -> f lg tx
    | None          -> err ()