diff options
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) |
