let status, lemmas =
GrafiteSync.add_coercion ~add_composites
~pack_coercion_obj:CicRefine.pack_coercion_obj
- status uri arity saturations (GrafiteTypes.get_baseuri status) in
+ status uri arity saturations status#baseuri in
let moo_content = coercion_moo_statement_of (uri,arity,saturations,0) in
let status = GrafiteTypes.add_moo_content [moo_content] status in
add_coercions_of_lemmas lemmas status
in
let estatus,obj =
GrafiteDisambiguate.disambiguate_nobj estatus
- ~baseuri:(GrafiteTypes.get_baseuri status) (text,prefix_len,obj) in
+ ~baseuri:status#baseuri (text,prefix_len,obj) in
let uri,height,nmenv,nsubst,nobj = obj in
let ninitial_stack = Continuationals.Stack.of_nmetasenv nmenv in
let status =
in
res,`Old uris
| GrafiteAst.Inverter (loc, name, indty, params) ->
- let buri = GrafiteTypes.get_baseuri status in
+ let buri = status#baseuri in
let uri = UriManager.uri_of_string (buri ^ "/" ^ name ^ ".con") in
let indty_uri =
try CicUtil.uri_of_term indty
".ind",
(match types with (name,_,_,_)::_ -> name | _ -> assert false)
| _ -> assert false in
- let buri = GrafiteTypes.get_baseuri status in
+ let buri = status#baseuri in
let uri = UriManager.uri_of_string (buri ^ "/" ^ name ^ ext) in
let obj = CicRefine.pack_coercion_obj obj in
let metasenv = GrafiteTypes.get_proof_metasenv status in
GrafiteAstPp.pp_command content')); *)
status#set_moo_content_rev content'
-let get_baseuri status = status#baseuri;;
-
let dump_status status =
HLog.message "status.aliases:\n";
HLog.message "status.proof_status:";
(** list is not reversed, head command will be the first emitted *)
val add_moo_content: GrafiteMarshal.ast_command list -> status -> status
-val get_baseuri: status -> string
-
val get_current_proof: status -> ProofEngineTypes.proof
val get_proof_metasenv: status -> Cic.metasenv
val get_stack: status -> Continuationals.Stack.t
prerr_endline "Still cleaning the library: don't be impatient!"));
prerr_endline "Matita is cleaning up. Please wait.";
let baseuri =
- GrafiteTypes.get_baseuri (MatitaScript.current ())#grafite_status
+ (MatitaScript.current ())#grafite_status#baseuri
in
LibraryClean.clean_baseuris [baseuri]
GrafiteTypes.set_metasenv metasenv grafite_status,tac
let disambiguate_command lexicon_status_ref grafite_status cmd =
- let baseuri = GrafiteTypes.get_baseuri grafite_status in
+ let baseuri = grafite_status#baseuri in
let lexicon_status,metasenv,cmd =
GrafiteDisambiguate.disambiguate_command ~baseuri
!lexicon_status_ref (GrafiteTypes.get_proof_metasenv grafite_status) cmd
let lexicon_status = GrafiteTypes.get_estatus grafite_status in
let dump = not (Helm_registry.get_bool "matita.moo") in
let lexicon_status_ref = ref (lexicon_status :> LexiconEngine.status) in
- let baseuri = GrafiteTypes.get_baseuri grafite_status in
+ let baseuri = grafite_status#baseuri in
let new_grafite_status,new_objs =
match ast with
| G.Executable (_, G.Command (_, G.Coercion _)) when dump ->
end
let clean_current_baseuri grafite_status =
- LibraryClean.clean_baseuris [GrafiteTypes.get_baseuri grafite_status]
+ LibraryClean.clean_baseuris [grafite_status#baseuri]
let save_moo grafite_status =
let script = MatitaScript.current () in
- let baseuri = GrafiteTypes.get_baseuri grafite_status in
+ let baseuri = grafite_status#baseuri in
let no_pstatus =
grafite_status#proof_status = GrafiteTypes.No_proof
in
match !grafite_status with
[] -> exit n
| grafite_status::_ ->
- let baseuri = GrafiteTypes.get_baseuri grafite_status in
+ let baseuri = grafite_status#baseuri in
LibraryClean.clean_baseuris ~verbose:false [baseuri];
exit n
else
begin
let baseuri =
- GrafiteTypes.get_baseuri
- (match !grafite_status with
- [] -> assert false
- | s::_ -> s)
+ (match !grafite_status with
+ [] -> assert false
+ | s::_ -> s)#baseuri
in
let moo_fname =
LibraryMisc.obj_file_of_baseuri