X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=matitaB%2Fcomponents%2Fcontent%2FnotationPt.ml;h=7cdb86c80b2afe99c2678af993a7038c5a0d6f84;hb=41b61472d2c475e0f69e3dfc85539da3ad2bac1e;hp=b624c9a8639c6e46a9ba2fef120cbdb6af3d11c8;hpb=1b67bd4dfa12ef25b8fa63884c71893b961db27d;p=helm.git diff --git a/matitaB/components/content/notationPt.ml b/matitaB/components/content/notationPt.ml index b624c9a86..7cdb86c80 100644 --- a/matitaB/components/content/notationPt.ml +++ b/matitaB/components/content/notationPt.ml @@ -62,7 +62,7 @@ type 'term capture_variable = 'term * 'term option (** To be increased each time the term type below changes, used for "safe" * marshalling *) -let magic = 7 +let magic = 8 type term = (* CIC AST *) @@ -101,8 +101,9 @@ type term = | NCic of NCic.term (* Syntax pattern extensions *) - - | Literal of literal + (* string option = optional name of an Ast.Symbol occurring in the level 2 + * term, which is associated to this literal *) + | Literal of (string option * literal) | Layout of layout_pattern | Magic of magic_term @@ -193,6 +194,12 @@ type 'term obj = | Record of 'term capture_variable list * string * 'term * (string * 'term * bool * int) list (** left parameters, name, type, fields *) +let name_of_obj = function + | Theorem (_,n,_,_,_) | Record (_,n,_,_) + | Inductive (_,(n,_,_,_)::_) -> n + | _ -> (* empty inductive block *) assert false +;; + let map_variable f (t,u) = f t, HExtlib.map_option f u ;; let map_pattern f = function