]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/ng_refiner/nRstatus.ml
The left parameters coming from the constructor types have been refined in a
[helm.git] / helm / software / components / ng_refiner / nRstatus.ml
index 0ef8755f4b0fa756f0a7a5e544f3c3b2b2013aaf..68fdf4f50f07663efdee6d131280f50f323f2416 100644 (file)
 
 (* $Id: nCicRefiner.ml 9802 2009-05-25 15:39:26Z tassi $ *)
 
-type refiner_status = {
-        coerc_db : NCicCoercion.db;
-        uhint_db : NCicUnifHint.db;
-        library_db : NCicLibrary.timestamp;
-        dump: refiner_status -> refiner_status
-}
+class type g_status =
+ object
+  inherit NCicCoercion.g_status
+  inherit NCicLibrary.g_status
+ end
 
+class status =
+ object (self)
+  inherit NCicCoercion.status
+  inherit NCicLibrary.status
+  method set_rstatus : 'status. #g_status as 'status -> 'self
+   = fun o -> (self#set_coercion_status o)#set_library_status o
+ end
+
+type sstatus = status
+
+module Serializer =
+ struct
+  include NCicLibrary.Serializer(struct type status = sstatus end)
+
+  let require ~baseuri status = 
+   let rstatus = require ~baseuri (status : #status :> status) in
+   let status = status#set_coerc_db (rstatus#coerc_db) in
+   let status = status#set_uhint_db (rstatus#uhint_db) in
+   let status = status#set_timestamp (rstatus#timestamp) in
+    status 
+ end
+
+class type g_dumpable_status =
+ object
+  inherit g_status
+  method dump: Serializer.obj list
+ end
+
+class dumpable_status =
+ object(self)
+  inherit status
+  val dump = ([] : Serializer.obj list)
+  method dump = dump
+  method set_dump v = {< dump = v >}
+  method set_dumpable_status : 'status. #g_dumpable_status as 'status -> 'self
+   = fun o -> (self#set_dump o#dump)#set_rstatus o
+ end