From ff727aac88be9098cbc08e4cf6604d4fc6845f3f Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Fri, 23 Oct 2026 23:47:27 -0300 Subject: move directory out of prototype --- lib/kernel/Prototype.ml | 11 ----------- lib/kernel/Prototype.mli | 4 ---- 2 files changed, 15 deletions(-) (limited to 'lib/kernel') diff --git a/lib/kernel/Prototype.ml b/lib/kernel/Prototype.ml index 185f12c..efff1af 100644 --- a/lib/kernel/Prototype.ml +++ b/lib/kernel/Prototype.ml @@ -98,17 +98,6 @@ module Directory = struct let of_properties props = List.map (fun (p, h) -> p, fun () -> Ok (Some h)) props |> of_properties' - let children directory = - let open Utilities.Result in - let* listing = Protocols.Handle.require Protocols.Directory.from directory in - let* names = Protocols.Directory.list listing in - BatFingerTree.to_list names - |> List.map (fun name -> - let* found = Protocols.Directory.find listing name in - Ok (Option.map (fun child -> name, child) found) ) - |> Utilities.List.sequence - |> Result.map (List.filter_map Fun.id) - module OfTree (S : Abstract.Storage.STORAGE) (K : Merkle.KEY with type t = string) diff --git a/lib/kernel/Prototype.mli b/lib/kernel/Prototype.mli index ec1f08e..9890800 100644 --- a/lib/kernel/Prototype.mli +++ b/lib/kernel/Prototype.mli @@ -10,10 +10,6 @@ module Directory : sig (string * (unit -> (Protocols.Handle.t option, Concepts.Condition.condition) result)) list -> Protocols.Handle.protocol - (** the names a directory lists, and what each reaches. *) - val children : - Protocols.Handle.t -> ((string * Protocols.Handle.t) list, Concepts.Condition.condition) result - module OfTree (S : Abstract.Storage.STORAGE) (K : Merkle.KEY with type t = string) -- cgit v1.2.3