]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_notation/grafiteAst.ml
added metadata "commands"
[helm.git] / helm / ocaml / cic_notation / grafiteAst.ml
index 53cbc353fa49aa676003df9ced084cd221a7fd53..d3c9d0e9581121be2ca909f97ae0a3261f2dcdcd 100644 (file)
@@ -124,8 +124,7 @@ type obj =
   | Inductive of (string * Ast.term) list *
       Ast.term inductive_type list
       (** parameters, list of loc * mutual inductive types *)
-  | Theorem of thm_flavour * string * Ast.term *
-      Ast.term option
+  | Theorem of thm_flavour * string * Ast.term * Ast.term option
       (** flavour, name, type, body
        * - name is absent when an unnamed theorem is being proved, tipically in
        *   interactive usage
@@ -136,9 +135,17 @@ type obj =
       (string * Ast.term) list
       (** left parameters, name, type, fields *)
 
+type metadata =
+  | Dependency of string  (* baseuri without trailing slash *)
+  | Baseuri of string 
+
+let compare_metadata = Pervasives.compare
+
+let eq_metadata = (=)
+
 (** To be increased each time the command type below changes, used for "safe"
  * marshalling *)
-let magic = 1
+let magic = 2
 
 type ('term,'obj) command =
   | Default of loc * string * UriManager.uri list
@@ -161,6 +168,8 @@ type ('term,'obj) command =
         Ast.cic_appl_pattern
       (* description (i.e. id), symbol, arg pattern, appl pattern *)
 
+  | Metadata of loc * metadata
+
     (* DEBUGGING *)
   | Dump of loc (* dump grammar on stdout *)
     (* DEBUGGING *)