diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-10-12 11:47:14 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-10-12 11:47:14 -0300 |
| commit | a3acc318ead5620ac20f70815b4dfb0810ccd2a4 (patch) | |
| tree | e1bf3b6331c07005a83650da36499a931dfeb24d /lib/protocols/Admission.ml | |
| parent | c66c3c82fda2f68e5aac62d16657d8a77e6d91ee (diff) | |
| download | RNT-a3acc318ead5620ac20f70815b4dfb0810ccd2a4.tar.gz RNT-a3acc318ead5620ac20f70815b4dfb0810ccd2a4.zip | |
abstracting headers and merkle of list construction
Diffstat (limited to '')
| -rw-r--r-- | lib/protocols/Admission.ml | 10 |
1 files changed, 1 insertions, 9 deletions
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) |
