X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Flambda-delta%2Fsrc%2Fcommon%2Fentity.ml;fp=helm%2Fsoftware%2Flambda-delta%2Fsrc%2Fcommon%2Fentity.ml;h=9915dd3c37b385ef42b6cebf992feebf228ddb34;hb=fa5cd121c672589afc0ac8ddd5d184897a38c7c6;hp=b88af255c288911108570404d60aa5a6e6188734;hpb=5280ec9794de75e63ffc01bddf1756ebcca02be0;p=helm.git diff --git a/helm/software/lambda-delta/src/common/entity.ml b/helm/software/lambda-delta/src/common/entity.ml index b88af255c..9915dd3c3 100644 --- a/helm/software/lambda-delta/src/common/entity.ml +++ b/helm/software/lambda-delta/src/common/entity.ml @@ -20,11 +20,16 @@ type name = id * bool (* token, real? *) type names = name list -type attr = Name of name (* name *) - | Apix of int (* additional position index *) - | Mark of int (* node marker *) - | Meta of string (* metaliguistic annotation *) - | Priv (* private global definition *) +type meta = Main (* main object *) + | InProp (* inhabitant of a proposition *) + | Progress (* uncompleted object *) + | Private (* private global definition *) + +type attr = Name of name (* name *) + | Apix of int (* additional position index *) + | Mark of int (* node marker *) + | Meta of meta list (* metaliguistic classification *) + | Info of (string * string) (* metaliguistic annotation: language (defaults to "en-US"), text *) type attrs = attr list (* attributes *) @@ -82,15 +87,15 @@ let rec mark err f = function | _ :: tl -> mark err f tl | [] -> err () -let rec priv err f = function - | Priv :: _ -> f () - | _ :: tl -> priv err f tl - | [] -> err () - let rec meta err f = function - | Meta s :: _ -> f s - | _ :: tl -> meta err f tl - | [] -> err () + | Meta ms :: _ -> f ms + | _ :: tl -> meta err f tl + | [] -> err () + +let rec info err f = function + | Info (lg, tx) :: _ -> f lg tx + | _ :: tl -> info err f tl + | [] -> err () let resolve err f name a = let rec aux i = function