X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=matita%2Fcomponents%2Fgrafite_engine%2FgrafiteTypes.ml;h=06cf9b9687d5a43c6cf96bf0b3129e717cc3c586;hb=a4a2345e2efaf4cc64aa4daf40e2bce05a400f12;hp=f26be5194c7fea309c16cd92e73e3beca07a0133;hpb=99a43adccee356e3d6057f67114c5cf08518b3f3;p=helm.git diff --git a/matita/components/grafite_engine/grafiteTypes.ml b/matita/components/grafite_engine/grafiteTypes.ml index f26be5194..06cf9b968 100644 --- a/matita/components/grafite_engine/grafiteTypes.ml +++ b/matita/components/grafite_engine/grafiteTypes.ml @@ -37,22 +37,23 @@ class status = fun (b : string) -> 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)