diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-09-27 23:16:06 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-09-27 23:16:06 -0300 |
| commit | 43ff14bfe52d4c8b4fcbd593f6e166751a4038e5 (patch) | |
| tree | 8558ecbb2ffb486a71368490c105137d40e7fc83 /lib/protocols/Session.ml | |
| parent | 69b2212dece4c15634a6730b85f908da3919c64c (diff) | |
| download | RNT-43ff14bfe52d4c8b4fcbd593f6e166751a4038e5.tar.gz RNT-43ff14bfe52d4c8b4fcbd593f6e166751a4038e5.zip | |
drop session require in favor of handle's
Diffstat (limited to 'lib/protocols/Session.ml')
| -rw-r--r-- | lib/protocols/Session.ml | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/protocols/Session.ml b/lib/protocols/Session.ml index f740c1a..5558003 100644 --- a/lib/protocols/Session.ml +++ b/lib/protocols/Session.ml @@ -1,11 +1,3 @@ -module Error = struct - open Concepts.Condition - - let not_a_session () = - condition "not-a-session" "A handle was expected to carry the session protocol and did not" - empty -end - type state = {branch: string; snapshot: Concepts.Hash.hash} class type implementation = object @@ -18,6 +10,5 @@ type t = implementation let make impl = Session (impl :> implementation) let from handle = Handle.into handle (function Session impl -> Some impl | _ -> None) -let require handle = from handle |> Option.to_result ~none:(Error.not_a_session ()) let state i = Handle.invoke i (fun o -> o#state) let pin i state = Handle.invoke i (fun o -> o#pin state) |
