From a3acc318ead5620ac20f70815b4dfb0810ccd2a4 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Mon, 12 Oct 2026 11:47:14 -0300 Subject: abstracting headers and merkle of list construction --- lib/protocols/Admission.ml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'lib/protocols/Admission.ml') diff --git a/lib/protocols/Admission.ml b/lib/protocols/Admission.ml index c29f192..16ee965 100644 --- a/lib/protocols/Admission.ml +++ b/lib/protocols/Admission.ml @@ -1,11 +1,3 @@ -module Error = struct - open Concepts.Condition - - let not_admitting () = - condition "not-admitting" "A handle was expected to carry the admission protocol and did not" - empty -end - type violations = (string * Concepts.Tuple.t) list class type implementation = object @@ -17,5 +9,5 @@ type t = implementation let make impl = Admission (impl :> implementation) let from handle = Handle.into handle (function Admission impl -> Some impl | _ -> None) -let require handle = from handle |> Option.to_result ~none:(Error.not_admitting ()) +let require = Handle.require from let check i = Handle.invoke i (fun o -> o#check) -- cgit v1.2.3