X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fng_kernel%2FnCicLibrary.mli;h=a8b546d2e2f58bbef2b93acbd7501deb06046a21;hb=f4c17198d8afe7c8cd62dbab527d08902d891491;hp=11a608e1da89af9471780685a8e04ba6833bbe43;hpb=5c8de084e314e41f3dc2f605f6242283e930b803;p=helm.git diff --git a/helm/software/components/ng_kernel/nCicLibrary.mli b/helm/software/components/ng_kernel/nCicLibrary.mli index 11a608e1d..a8b546d2e 100644 --- a/helm/software/components/ng_kernel/nCicLibrary.mli +++ b/helm/software/components/ng_kernel/nCicLibrary.mli @@ -11,22 +11,40 @@ (* $Id$ *) -exception ObjectNotFound of string Lazy.t exception LibraryOutOfSync of string Lazy.t type timestamp -val time0: timestamp -val add_obj: NUri.uri -> NCic.obj -> timestamp +class status : + object ('self) + method timestamp: timestamp + method set_timestamp: timestamp -> 'self + method set_library_status: -> 'self + end + +val add_obj: #status as 'status -> NUri.uri -> NCic.obj -> '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 clear_cache : unit -> unit -val time_travel: timestamp -> unit -val serialize: baseuri:NUri.uri -> ('status -> 'status) -> unit -val require: baseuri:NUri.uri -> 'status -> 'status +val time_travel: #status -> unit val decompile: baseuri:NUri.uri -> unit +module type Serializer = + sig + type status + type obj + val register: + string -> + ('a -> refresh_uri_in_term:(NCic.term -> NCic.term) -> status -> status) -> + ('a -> obj) + val serialize: baseuri:NUri.uri -> obj list -> unit + val require: baseuri:NUri.uri -> status -> status + end + +module Serializer(S: sig type status end): Serializer with type status= S.status + (* EOF *)