]> matita.cs.unibo.it Git - helm.git/blob - helm/software/components/ng_kernel/nCicLibrary.mli
Good:
[helm.git] / helm / software / components / ng_kernel / nCicLibrary.mli
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$ *)
13
14 exception LibraryOutOfSync of string Lazy.t
15
16 type timestamp
17
18 class status :
19  object ('self)
20   method timestamp: timestamp
21   method set_timestamp: timestamp -> 'self
22   method set_library_status: <timestamp: timestamp; ..> -> 'self
23  end
24
25 val add_obj: #status as 'status -> NUri.uri -> NCic.obj -> 'status
26 val aliases_of: NUri.uri -> NReference.reference list
27 val resolve: string -> NReference.reference list
28 (* warning: get_obj may raise (NCicEnvironment.ObjectNotFoud l) *)
29 val get_obj: NUri.uri -> NCic.obj (* changes the current timestamp *)
30
31 val clear_cache : unit -> unit
32
33 val time_travel: #status -> unit
34 val decompile: baseuri:NUri.uri -> unit
35
36 module type Serializer =
37  sig
38   type status
39   type obj
40   val register:
41    string ->
42     ('a -> refresh_uri_in_term:(NCic.term -> NCic.term) -> status -> status) ->
43     ('a -> obj)
44   val serialize: baseuri:NUri.uri -> obj list -> unit
45   val require: baseuri:NUri.uri -> status -> status
46  end
47
48 module Serializer(S: sig type status end): Serializer with type status= S.status
49
50 (* EOF *)