From 44851daf1601f0f7ac1ff22bc5677c07dfd4ae2e Mon Sep 17 00:00:00 2001 From: Estevan Castilho Date: Sat, 22 Aug 2026 22:06:47 +0000 Subject: The handle protocol --- lib/protocols/Handle.mli | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/protocols/Handle.mli (limited to 'lib/protocols/Handle.mli') diff --git a/lib/protocols/Handle.mli b/lib/protocols/Handle.mli new file mode 100644 index 0000000..6fe175b --- /dev/null +++ b/lib/protocols/Handle.mli @@ -0,0 +1,20 @@ +type t + +type 'a interface + +type protocol = .. + +class type obj = object + method reference : bool + method release : unit + method protocols : protocol list +end + +val make : obj -> t + +val into : t -> (protocol -> 'a option) -> 'a interface option + +val invoke : 'a interface -> ('a -> 'b) -> 'b + +val copy : t -> t option +val release : t -> unit -- cgit v1.2.3