aboutsummaryrefslogtreecommitdiffstats
path: root/lib/protocols/Registry.ml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/protocols/Registry.ml6
-rw-r--r--lib/protocols/Registry.mli11
2 files changed, 10 insertions, 7 deletions
diff --git a/lib/protocols/Registry.ml b/lib/protocols/Registry.ml
index f01f06b..d7c4480 100644
--- a/lib/protocols/Registry.ml
+++ b/lib/protocols/Registry.ml
@@ -1,13 +1,11 @@
class type implementation = object
- method update : string -> Handle.t option -> Handle.t option -> (bool, 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
-
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)
diff --git a/lib/protocols/Registry.mli b/lib/protocols/Registry.mli
index 3390167..627a60f 100644
--- a/lib/protocols/Registry.mli
+++ b/lib/protocols/Registry.mli
@@ -1,11 +1,16 @@
type t
class type implementation = object
- method update : string -> Handle.t option -> Handle.t option -> (bool, Concepts.Condition.condition) result
+ method update :
+ string -> Handle.t option -> Handle.t option -> (bool, Concepts.Condition.condition) result
end
val make : #implementation -> Handle.protocol
-
val from : Handle.t -> t Handle.interface option
-val update : t Handle.interface -> string -> Handle.t option -> Handle.t option -> (bool, Concepts.Condition.condition) result
+val update :
+ t Handle.interface ->
+ string ->
+ Handle.t option ->
+ Handle.t option ->
+ (bool, Concepts.Condition.condition) result