aboutsummaryrefslogblamecommitdiffstats
path: root/lib/protocols/Registry.ml
blob: d7c4480fd7019244028023d26c184bd1dac3d7df (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)