]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/components/ng_library/nCicLibrary.mli
Implementation of Ocaml extraction (largely ported from Coq).
[helm.git] / matita / components / ng_library / nCicLibrary.mli
index c65ee1df1d8b8a831347aedd9558b7b4e85eea9f..451beaa70fc51883f1cddb09c68b4c188ea2654d 100644 (file)
@@ -16,10 +16,12 @@ exception IncludedFileNotCompiled of string * string
 
 type timestamp
 
-class status :
+class virtual status :
  object ('self)
+  inherit NCic.status
   method timestamp: timestamp
   method set_timestamp: timestamp -> 'self
+  (*CSC: bug here, we are not copying the NCicExtraction and OCamlExtraction part of the status *)
  end
 
 (* it also checks it and add it to the environment *)
@@ -28,10 +30,13 @@ val add_constraint:
   #status as 'status -> NCic.universe -> NCic.universe -> 'status
 val aliases_of: NUri.uri -> NReference.reference list
 val resolve: string -> NReference.reference list
+(*
 (* warning: get_obj may raise (NCicEnvironment.ObjectNotFoud l) *)
-val get_obj: NUri.uri -> NCic.obj (* changes the current timestamp *)
+val get_obj: #NCic.status -> NUri.uri -> NCic.obj (* changes the current timestamp *)
+*)
 
 val time_travel: #status -> unit
+val replace: #status -> unit
 
 val init: unit -> unit
 
@@ -60,7 +65,7 @@ module type SerializerType =
   type 'a register_type =
    'a ->
     refresh_uri_in_universe:(NCic.universe -> NCic.universe) ->
-    refresh_uri_in_term:(NCic.term -> NCic.term) ->
+    refresh_uri_in_term:(NCic.status -> NCic.term -> NCic.term) ->
     refresh_uri_in_reference:(NReference.reference -> NReference.reference) ->
     alias_only:bool ->
      dumpable_status -> dumpable_status
@@ -73,7 +78,7 @@ module type SerializerType =
   val dependencies_of: baseuri:NUri.uri -> string list
  end
 
-module Serializer(D: sig type dumpable_s val get: dumpable_s -> dumpable_status  val set: dumpable_s -> dumpable_status -> dumpable_s end) :
+module Serializer(D: sig type dumpable_s = private #dumpable_status end) :
   SerializerType with type dumpable_status = D.dumpable_s
 
 val refresh_uri: NUri.uri -> NUri.uri