diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-09-25 21:51:33 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-09-25 21:51:33 -0300 |
| commit | 584fbca6d920e9a9f91d451667f9380714ac2175 (patch) | |
| tree | a163b916a6f8cb550c8b38ceb01ab01558687a40 /lib/protocols/Associative.ml | |
| parent | c7b754e96714eeeb9d315ee3de402d73a27d47db (diff) | |
| download | RNT-584fbca6d920e9a9f91d451667f9380714ac2175.tar.gz RNT-584fbca6d920e9a9f91d451667f9380714ac2175.zip | |
dune fmt
Diffstat (limited to '')
| -rw-r--r-- | lib/protocols/Associative.ml | 11 | ||||
| -rw-r--r-- | lib/protocols/Associative.mli | 7 |
2 files changed, 10 insertions, 8 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 ) diff --git a/lib/protocols/Associative.mli b/lib/protocols/Associative.mli index 066cfe4..5886303 100644 --- a/lib/protocols/Associative.mli +++ b/lib/protocols/Associative.mli @@ -5,7 +5,10 @@ class type implementation = object end val make : #implementation -> Handle.protocol - val from : Handle.t -> t Handle.interface option -val update : t Handle.interface -> string -> Handle.t option -> (t Handle.interface, Concepts.Condition.condition) result +val update : + t Handle.interface -> + string -> + Handle.t option -> + (t Handle.interface, Concepts.Condition.condition) result |
