aboutsummaryrefslogtreecommitdiffstats
path: root/lib/protocols/Associative.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/protocols/Associative.ml')
-rw-r--r--lib/protocols/Associative.ml11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/protocols/Associative.ml b/lib/protocols/Associative.ml
index 66de5ed..16fdcc8 100644
--- a/lib/protocols/Associative.ml
+++ b/lib/protocols/Associative.ml
@@ -3,14 +3,13 @@ class type implementation = object
end
type Handle.protocol += Associative of implementation
-
type t = implementation
let make impl = Associative (impl :> implementation)
-
let from handle = Handle.into handle (function Associative impl -> Some impl | _ -> None)
-let update i key value = Handle.invoke i (fun o ->
- let open Utilities.Result in
- let* h = o#update key value in
- Handle.require from h)
+let update i key value =
+ Handle.invoke i (fun o ->
+ let open Utilities.Result in
+ let* h = o#update key value in
+ Handle.require from h )