]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_notation/grafiteAst.ml
added magic numbers
[helm.git] / helm / ocaml / cic_notation / grafiteAst.ml
index 45f7c1aea7882afbb31bf08374cc27d45dd5f1b1..350b32a37f196457d6f6c5d05a2f37de79159a64 100644 (file)
@@ -136,6 +136,10 @@ type obj =
       (string * Ast.term) list
       (** left parameters, name, type, fields *)
 
+(** To be increased each time the command type below changes, used for "safe"
+ * marshalling *)
+let magic = 1
+
 type ('term,'obj) command =
   | Default of loc * string * UriManager.uri list
   | Include of loc * string
@@ -162,7 +166,10 @@ type ('term,'obj) command =
     (* DEBUGGING *)
   | Render of loc * UriManager.uri (* render library object *)
 
-let reash_uris =
+(* composed magic: term + command magics. No need to change this value *)
+let magic = magic + 10000 * CicNotationPt.magic
+
+let reash_cmd_uris =
   function
   | Default (loc, name, uris) ->
       let uris =
@@ -206,4 +213,4 @@ type dependency =
   | IncludeDep of string
   | BaseuriDep of string
   | UriDep of UriManager.uri
-  
+