aboutsummaryrefslogblamecommitdiffstats
path: root/lib/protocols/Registry.ml
blob: f01f06b0005c3c85e6b6a8cb26eb3b39d502d1e9 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                  
                                                                                                             





                                                  
                                                 


                                                                                      
                                                                                          
class type implementation = object
  method update : string -> Handle.t option -> Handle.t option -> (bool, Concepts.Condition.condition) result
end

type Handle.protocol += Registry of implementation

type t = implementation

let make impl = Registry (impl :> implementation)

let from handle = Handle.into handle (function Registry impl -> Some impl | _ -> None)

let update i key reference value = Handle.invoke i (fun o -> o#update key reference value)