aboutsummaryrefslogtreecommitdiffstats
path: root/lib/protocols/Registry.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/protocols/Registry.ml')
-rw-r--r--lib/protocols/Registry.ml7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/protocols/Registry.ml b/lib/protocols/Registry.ml
index 4c47001..f01f06b 100644
--- a/lib/protocols/Registry.ml
+++ b/lib/protocols/Registry.ml
@@ -1,6 +1,5 @@
class type implementation = object
- method register : string -> Handle.t -> (unit, Concepts.Condition.condition) result
- method unregister : string -> (unit, Concepts.Condition.condition) result
+ method update : string -> Handle.t option -> Handle.t option -> (bool, Concepts.Condition.condition) result
end
type Handle.protocol += Registry of implementation
@@ -11,6 +10,4 @@ let make impl = Registry (impl :> implementation)
let from handle = Handle.into handle (function Registry impl -> Some impl | _ -> None)
-let register i key value = Handle.invoke i (fun o -> o#register key value)
-
-let unregister i key = Handle.invoke i (fun o -> o#unregister key)
+let update i key reference value = Handle.invoke i (fun o -> o#update key reference value)