]> matita.cs.unibo.it Git - helm.git/blob - helm/software/components/ng_refiner/nRstatus.ml
Good:
[helm.git] / helm / software / components / ng_refiner / nRstatus.ml
1 (*
2     ||M||  This file is part of HELM, an Hypertextual, Electronic        
3     ||A||  Library of Mathematics, developed at the Computer Science     
4     ||T||  Department, University of Bologna, Italy.                     
5     ||I||                                                                
6     ||T||  HELM is free software; you can redistribute it and/or         
7     ||A||  modify it under the terms of the GNU General Public License   
8     \   /  version 2 or (at your option) any later version.      
9      \ /   This software is distributed as is, NO WARRANTY.     
10       V_______________________________________________________________ *)
11
12 (* $Id: nCicRefiner.ml 9802 2009-05-25 15:39:26Z tassi $ *)
13
14 class status =
15  object (self)
16   inherit NCicUnifHint.status
17   inherit NCicCoercion.status
18   inherit NCicLibrary.status
19   method set_rstatus
20    : 'status.
21        < coerc_db : NCicCoercion.db;
22          uhint_db : NCicUnifHint.db;
23          timestamp: NCicLibrary.timestamp; .. > as 'status -> 'self
24    = fun o ->
25       ((self#set_unifhint_status o)#set_coercion_status o)#set_library_status o
26  end
27
28 type sstatus = status
29
30 module Serializer =
31  struct
32   include NCicLibrary.Serializer(struct type status = sstatus end)
33
34   let require ~baseuri status = 
35    let rstatus = require ~baseuri (status : #status :> status) in
36    let status = status#set_uhint_db (rstatus#uhint_db) in
37    let status = status#set_coerc_db (rstatus#coerc_db) in
38    let status = status#set_timestamp (rstatus#timestamp) in
39     status 
40  end
41
42 class dumpable_status =
43  object
44   inherit status
45   val dump = ([] : Serializer.obj list)
46   method dump = dump
47   method set_dump v = {< dump = v >}
48   method set_dumpable_status
49    : 'status.
50        < coerc_db : NCicCoercion.db;
51          uhint_db : NCicUnifHint.db;
52          timestamp: NCicLibrary.timestamp;
53          dump: Serializer.obj list; .. > as 'status -> 'self
54    = fun o -> {< dump = o#dump >}#set_rstatus o
55  end