From f61e42262ce75179f356e122a5c63ed34e584082 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Wed, 9 Sep 2026 21:14:29 -0300 Subject: schematics protocol --- lib/protocols/Schematics.mli | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/protocols/Schematics.mli (limited to 'lib/protocols/Schematics.mli') diff --git a/lib/protocols/Schematics.mli b/lib/protocols/Schematics.mli new file mode 100644 index 0000000..d8533bf --- /dev/null +++ b/lib/protocols/Schematics.mli @@ -0,0 +1,18 @@ +(** Instantiate once and share the protocol with schema providers and evaluators. *) +module type S = sig + module Schema : Abstract.Schematics.SCHEMA + type t + + class type implementation = object + method schema : (Schema.t, Concepts.Condition.condition) result + end + + val make : #implementation -> Handle.protocol + val from : Handle.t -> t Handle.interface option + val schema : t Handle.interface -> (Schema.t, Concepts.Condition.condition) result + val attributes : + t Handle.interface -> + ((string * Schema.attribute) BatFingerTree.t, Concepts.Condition.condition) result +end + +module Make (Schema : Abstract.Schematics.SCHEMA) : S with module Schema = Schema -- cgit v1.2.3