-type ng_status =
- | ProofMode of NTacStatus.tac_status
- | CommandMode of NEstatus.extra_status
-
-type status = {
- moo_content_rev: GrafiteMarshal.moo;
- proof_status: proof_status;
- objects: UriManager.uri list;
- coercions: CoercDb.coerc_db;
- automation_cache:AutomationCache.cache;
- baseuri: string;
- ng_status: ng_status;
-}
-
-let get_lexicon x =
- match x.ng_status with
- | ProofMode t -> t.NTacStatus.istatus.NTacStatus.estatus.NEstatus.lstatus
- | CommandMode e -> e.NEstatus.lstatus
-;;
-
-let set_lexicon new_lexicon_status new_grafite_status =
- { new_grafite_status with ng_status =
- match new_grafite_status.ng_status with
- | CommandMode estatus ->
- CommandMode
- { estatus with NEstatus.lstatus = new_lexicon_status }
- | ProofMode t ->
- ProofMode
- { t with NTacStatus.istatus =
- { t.NTacStatus.istatus with NTacStatus.estatus =
- { t.NTacStatus.istatus.NTacStatus.estatus with NEstatus.lstatus =
- new_lexicon_status }}}}
-;;
-
-let get_estatus x =
- match x.ng_status with
- | ProofMode t -> t.NTacStatus.istatus.NTacStatus.estatus
- | CommandMode e -> e
-;;
-
-let set_estatus e x =
- { x with ng_status =
- match x.ng_status with
- ProofMode t ->
- ProofMode
- {t with NTacStatus.istatus =
- {t.NTacStatus.istatus with NTacStatus.estatus = e}}
- | CommandMode _ -> CommandMode e}
-;;
-
-let get_dstatus x = (get_estatus x).NEstatus.rstatus;;
-
-let get_rstatus x = (get_dstatus x).NRstatus.refiner_status;;
-
-let get_hstatus x = (get_rstatus x).NRstatus.uhint_db;;
-
-let get_library_db x = (get_rstatus x).NRstatus.library_db;;
-
-let get_dump x = (get_dstatus x).NRstatus.dump;;
-
-let set_dstatus h x =
- let estatus = get_estatus x in
- set_estatus { estatus with NEstatus.rstatus = h } x
-;;
-
-let set_rstatus h x =
- let dstatus = get_dstatus x in
- set_dstatus { dstatus with NRstatus.refiner_status = h } x
-;;
-
-let set_coercions db x =
- let rstatus = get_rstatus x in
- set_rstatus { rstatus with NRstatus.coerc_db = db } x
-;;
-
-
-let set_hstatus h x =
- let rstatus = get_rstatus x in
- set_rstatus { rstatus with NRstatus.uhint_db = h} x
-;;
-
-let set_library_db h x =
- let rstatus = get_rstatus x in
- set_rstatus { rstatus with NRstatus.library_db = h} x
-;;
-
-let set_dump h x =
- let estatus = get_estatus x in
- set_estatus
- { estatus with NEstatus.rstatus =
- { estatus.NEstatus.rstatus with
- NRstatus.dump = h}}
- x
-;;
+class 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)
+ val proof_status = No_proof
+ val objects = ([] : UriManager.uri list)
+ val coercions = CoercDb.empty_coerc_db
+ val automation_cache = AutomationCache.empty ()
+ 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 proof_status = proof_status
+ method set_proof_status v = {< proof_status = v >}
+ method objects = objects
+ method set_objects v = {< objects = v >}
+ method coercions = coercions
+ method set_coercions v = {< coercions = v >}
+ method automation_cache = automation_cache
+ method set_automation_cache v = {< automation_cache = 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