diff options
Diffstat (limited to 'lib/kernel/Scope.ml')
| -rw-r--r-- | lib/kernel/Scope.ml | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/kernel/Scope.ml b/lib/kernel/Scope.ml index ba9c1e0..817da97 100644 --- a/lib/kernel/Scope.ml +++ b/lib/kernel/Scope.ml @@ -44,7 +44,9 @@ let attribute home relation text = (* every relation of a branch state, as multigroup:schema:relation *) let catalog_of branch = let open Utilities.Result in - let name prefix last = Utilities.FingerTree.join (BatFingerTree.reverse (BatFingerTree.cons prefix last)) ":" in + let name prefix last = + Utilities.FingerTree.join (BatFingerTree.reverse (BatFingerTree.cons prefix last)) ":" + in let rec down prefix handle properties = let* level = Path.find handle Path.(List.hd properties @/ this) in match level, List.tl properties with @@ -55,7 +57,9 @@ let catalog_of branch = Ok (BatFingerTree.map (name prefix) names) | Some level, rest -> let* named = Protocols.Directory.children level in - Utilities.FingerTree.concat_mapm (fun (n, child) -> down (BatFingerTree.cons prefix n) child rest) named + Utilities.FingerTree.concat_mapm + (fun (n, child) -> down (BatFingerTree.cons prefix n) child rest) + named in down BatFingerTree.empty branch ["multigroup"; "schema"; "relation"] @@ -88,7 +92,9 @@ let rec make branch home = let* previous = Path.find branch Path.("previous" @/ this) in Ok (Option.map (fun p -> make p home) previous) - method catalog = catalog_of branch |> Result.map BatFingerTree.to_list (* FIXME: use finger trees thoroughly *) + method catalog = + catalog_of branch + |> Result.map BatFingerTree.to_list (* FIXME: use finger trees thoroughly *) end ] let heads = Path.("system" @/ "branch" @/ this) |
