From: Andrea Asperti Date: Thu, 23 Nov 2006 14:44:48 +0000 (+0000) Subject: Added a new command "index" for the indexing terms in the "universe". X-Git-Tag: 0.4.95@7852~788 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=666e2a3fcbfffd2df99650e3404965e95e6b352b;p=helm.git Added a new command "index" for the indexing terms in the "universe". --- diff --git a/components/grafite/grafiteAst.ml b/components/grafite/grafiteAst.ml index 8816f2efa..7108a323a 100644 --- a/components/grafite/grafiteAst.ml +++ b/components/grafite/grafiteAst.ml @@ -118,9 +118,10 @@ type 'term macro = (** To be increased each time the command type below changes, used for "safe" * marshalling *) -let magic = 10 +let magic = 11 type ('term,'obj) command = + | Index of loc * 'term option (* key *) * UriManager.uri (* value *) | Coercion of loc * UriManager.uri * bool (* add_obj *) * int (* arity *) | Default of loc * string * UriManager.uri list | Drop of loc diff --git a/components/grafite/grafiteAstPp.ml b/components/grafite/grafiteAstPp.ml index 2e3d95abe..366c0e264 100644 --- a/components/grafite/grafiteAstPp.ml +++ b/components/grafite/grafiteAstPp.ml @@ -226,6 +226,7 @@ let pp_coercion uri do_composites arity = (if do_composites then "compounds" else "no compounds") let pp_command ~term_pp ~obj_pp = function + | Index (_,_,uri) -> "Indexing " ^ UriManager.string_of_uri uri | Coercion (_, uri, do_composites, i) -> pp_coercion uri do_composites i | Default (_,what,uris) -> pp_default what uris | Drop _ -> "drop" diff --git a/components/grafite/grafiteMarshal.ml b/components/grafite/grafiteMarshal.ml index cc4423b96..056b1225d 100644 --- a/components/grafite/grafiteMarshal.ml +++ b/components/grafite/grafiteMarshal.ml @@ -46,6 +46,8 @@ let rehash_cmd_uris = GrafiteAst.Default (loc, name, uris) | GrafiteAst.Coercion (loc, uri, close, arity) -> GrafiteAst.Coercion (loc, rehash_uri uri, close, arity) + | GrafiteAst.Index (loc, key, uri) -> + GrafiteAst.Index (loc, HExtlib.map_option CicUtil.rehash_term key, rehash_uri uri) | cmd -> prerr_endline "Found a command not expected in a .moo:"; let term_pp _ = assert false in