blob: 16ee965bfd688a61bd9b85de41f985b699ef4458 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
type violations = (string * Concepts.Tuple.t) list
class type implementation = object
method check : (violations, Concepts.Condition.condition) result
end
type Handle.protocol += Admission of implementation
type t = implementation
let make impl = Admission (impl :> implementation)
let from handle = Handle.into handle (function Admission impl -> Some impl | _ -> None)
let require = Handle.require from
let check i = Handle.invoke i (fun o -> o#check)
|