X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fgrafite%2FgrafiteMarshal.ml;h=d666f62b61837163fe53dc9905fdc0d2f2df1020;hb=e9b09b14538f770b9e65083c24e3e9cf487df648;hp=2b1ed9dbaafb6765e1acc78f04b4770fcc1b4e6e;hpb=abd2098b6c4a40b36bb4b950c607eb4b4a7852bc;p=helm.git diff --git a/helm/software/components/grafite/grafiteMarshal.ml b/helm/software/components/grafite/grafiteMarshal.ml index 2b1ed9dba..d666f62b6 100644 --- a/helm/software/components/grafite/grafiteMarshal.ml +++ b/helm/software/components/grafite/grafiteMarshal.ml @@ -25,7 +25,7 @@ (* $Id$ *) -type ast_command = Cic.obj GrafiteAst.command +type ast_command = (Cic.term,Cic.obj) GrafiteAst.command type moo = ast_command list let format_name = "grafite" @@ -44,12 +44,20 @@ let rehash_cmd_uris = | GrafiteAst.Default (loc, name, uris) -> let uris = List.map rehash_uri uris in GrafiteAst.Default (loc, name, uris) - | GrafiteAst.Coercion (loc, uri, close, arity) -> - GrafiteAst.Coercion (loc, rehash_uri uri, close, arity) + | GrafiteAst.PreferCoercion (loc, uri) -> + GrafiteAst.PreferCoercion (loc, CicUtil.rehash_term uri) + | GrafiteAst.Coercion (loc, uri, close, arity, saturations) -> + GrafiteAst.Coercion (loc, CicUtil.rehash_term uri, close, arity, saturations) + | GrafiteAst.Index (loc, key, uri) -> + GrafiteAst.Index (loc, HExtlib.map_option CicUtil.rehash_term key, rehash_uri uri) + | GrafiteAst.Select (loc, uri) -> + GrafiteAst.Select (loc, rehash_uri uri) + | GrafiteAst.Include _ as cmd -> cmd | cmd -> prerr_endline "Found a command not expected in a .moo:"; + let term_pp _ = assert false in let obj_pp _ = assert false in - prerr_endline (GrafiteAstPp.pp_command ~obj_pp cmd); + prerr_endline (GrafiteAstPp.pp_command ~term_pp ~obj_pp cmd); assert false let save_moo ~fname moo = save_moo_to_file ~fname (List.rev moo)