From 9b9eab0bb54ed951c56eb6551d9ee470dc5b43aa Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sun, 13 Sep 2026 03:19:46 -0300 Subject: appropriate enumeration for tuple split on object and resident --- lib/protocols/Context.ml | 4 ++++ lib/protocols/Relation.ml | 2 -- lib/protocols/Relation.mli | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 lib/protocols/Context.ml (limited to 'lib/protocols') diff --git a/lib/protocols/Context.ml b/lib/protocols/Context.ml new file mode 100644 index 0000000..b7c8a37 --- /dev/null +++ b/lib/protocols/Context.ml @@ -0,0 +1,4 @@ +type t = + { snapshot : Concepts.Hash.hash + ; root : Handle.t + ; status : unit -> [`Live | `Cancelled | `Exhausted] } diff --git a/lib/protocols/Relation.ml b/lib/protocols/Relation.ml index 54454cf..c05337f 100644 --- a/lib/protocols/Relation.ml +++ b/lib/protocols/Relation.ml @@ -7,7 +7,6 @@ module Error = struct end class type implementation = object - method heading : (Concepts.Hash.hash, Concepts.Condition.condition) result method predicate : (Concepts.Hash.hash option, Concepts.Condition.condition) result method local_constraints : (Concepts.Hash.hash option, Concepts.Condition.condition) result method contains : Concepts.Tuple.t -> (bool, Concepts.Condition.condition) result @@ -19,7 +18,6 @@ type t = implementation let make impl = Relation (impl :> implementation) let from handle = Handle.into handle (function Relation impl -> Some impl | _ -> None) let require handle = from handle |> Option.to_result ~none:(Error.not_a_relation ()) -let heading i = Handle.invoke i (fun o -> o#heading) let predicate i = Handle.invoke i (fun o -> o#predicate) let local_constraints i = Handle.invoke i (fun o -> o#local_constraints) let contains i tuple = Handle.invoke i (fun o -> o#contains tuple) diff --git a/lib/protocols/Relation.mli b/lib/protocols/Relation.mli index 7e64a3b..384877e 100644 --- a/lib/protocols/Relation.mli +++ b/lib/protocols/Relation.mli @@ -1,7 +1,6 @@ type t class type implementation = object - method heading : (Concepts.Hash.hash, Concepts.Condition.condition) result method predicate : (Concepts.Hash.hash option, Concepts.Condition.condition) result method local_constraints : (Concepts.Hash.hash option, Concepts.Condition.condition) result method contains : Concepts.Tuple.t -> (bool, Concepts.Condition.condition) result @@ -10,7 +9,6 @@ end val make : #implementation -> Handle.protocol val from : Handle.t -> t Handle.interface option val require : Handle.t -> (t Handle.interface, Concepts.Condition.condition) result -val heading : t Handle.interface -> (Concepts.Hash.hash, Concepts.Condition.condition) result val predicate : t Handle.interface -> (Concepts.Hash.hash option, Concepts.Condition.condition) result -- cgit v1.2.3