aboutsummaryrefslogtreecommitdiffstats
path: root/lib/protocols/Derived.ml
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-10-05 22:40:22 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-10-05 22:40:22 -0300
commitcfc641a9bb97c94e5993f895a8bcdf24214adc83 (patch)
treec793f068df0ff588565b5819b27018b616b87109 /lib/protocols/Derived.ml
parent32e663591a84d095723e62ef934a0bc6e1470b52 (diff)
downloadRNT-cfc641a9bb97c94e5993f895a8bcdf24214adc83.tar.gz
RNT-cfc641a9bb97c94e5993f895a8bcdf24214adc83.zip
journal for the websitejournal
Diffstat (limited to 'lib/protocols/Derived.ml')
-rw-r--r--lib/protocols/Derived.ml10
1 files changed, 10 insertions, 0 deletions
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)