From cfc641a9bb97c94e5993f895a8bcdf24214adc83 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Mon, 5 Oct 2026 22:40:22 -0300 Subject: journal for the website --- lib/protocols/Derived.ml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lib/protocols/Derived.ml (limited to 'lib/protocols/Derived.ml') diff --git a/lib/protocols/Derived.ml b/lib/protocols/Derived.ml new file mode 100644 index 0000000..1968ffc --- /dev/null +++ b/lib/protocols/Derived.ml @@ -0,0 +1,10 @@ +class type implementation = object + method within : Handle.t -> (Handle.t, Concepts.Condition.condition) result +end + +type Handle.protocol += Derived of implementation +type t = implementation + +let make impl = Derived (impl :> implementation) +let from handle = Handle.into handle (function Derived impl -> Some impl | _ -> None) +let within i directory = Handle.invoke i (fun o -> o#within directory) -- cgit v1.2.3