let command_error msg = raise (Command_error msg)
-class status = fun (b : string) ->
+class virtual status = fun (b : string) ->
let fake_obj =
NUri.uri_of_string "cic:/matita/dummy.decl",0,[],[],
NCic.Constant([],"",None,NCic.Implicit `Closed,(`Provided,`Theorem,`Regular))
in
object
- val moo_content_rev = ([] : GrafiteMarshal.moo)
+ (* Warning: #stack and #obj are meaningful iff #ng_mode is `ProofMode *)
+ inherit ([Continuationals.Stack.t] NTacStatus.status fake_obj (Continuationals.Stack.empty))
+ inherit NCicLibrary.dumpable_status
+ inherit NCicLibrary.status
+ inherit GrafiteParser.status
+ inherit TermContentPres.status
val baseuri = b
val ng_mode = (`CommandMode : [`CommandMode | `ProofMode])
- method moo_content_rev = moo_content_rev
- method set_moo_content_rev v = {< moo_content_rev = v >}
method baseuri = baseuri
method set_baseuri v = {< baseuri = v >}
method ng_mode = ng_mode;
method set_ng_mode v = {< ng_mode = v >}
- (* Warning: #stack and #obj are meaningful iff #ng_mode is `ProofMode *)
- inherit ([Continuationals.Stack.t] NTacStatus.status fake_obj (Continuationals.Stack.empty))
end
-let add_moo_content cmds status =
- let content = status#moo_content_rev in
- let content' = cmds@content in
-(* prerr_endline ("new moo content: " ^ String.concat " " (List.map
- GrafiteAstPp.pp_command content')); *)
- status#set_moo_content_rev content'
+module Serializer =
+ NCicLibrary.Serializer(struct
+ type dumpable_s = status
+ let get status = (status : #status :> NCicLibrary.dumpable_status)
+ let set (status : dumpable_s) dump_status = status#set_dumpable_status dump_status
+ end)