diff options
| author | Estevan Castilho <tevo@riajuu.net> | 2026-10-24 01:50:35 +0000 |
|---|---|---|
| committer | Estevan Castilho <tevo@riajuu.net> | 2026-10-24 01:50:35 +0000 |
| commit | b2ff91614a7f1c7dd54a43bbfe88bbb6694b0a71 (patch) | |
| tree | 38617ef0008e34fcaa95a2c32ec721ced1bb1a4f /lib/kernel | |
| parent | 5a6af8a74895b548ed39649aef4a09fb53b4dbbc (diff) | |
| download | RNT-b2ff91614a7f1c7dd54a43bbfe88bbb6694b0a71.tar.gz RNT-b2ff91614a7f1c7dd54a43bbfe88bbb6694b0a71.zip | |
Formatting
Diffstat (limited to 'lib/kernel')
| -rw-r--r-- | lib/kernel/Branch.ml | 10 | ||||
| -rw-r--r-- | lib/kernel/EphemeralRelation.ml | 6 | ||||
| -rw-r--r-- | lib/kernel/Multigroup.ml | 6 | ||||
| -rw-r--r-- | lib/kernel/Namespace.ml | 5 | ||||
| -rw-r--r-- | lib/kernel/Path.ml | 6 | ||||
| -rw-r--r-- | lib/kernel/Program.ml | 3 | ||||
| -rw-r--r-- | lib/kernel/Tuple.ml | 3 |
7 files changed, 14 insertions, 25 deletions
diff --git a/lib/kernel/Branch.ml b/lib/kernel/Branch.ml index 89a16ff..598e102 100644 --- a/lib/kernel/Branch.ml +++ b/lib/kernel/Branch.ml @@ -54,9 +54,9 @@ module Make (S : Abstract.Storage.STORAGE) = struct let* previous = Bencode.field "previous" fields |>> Value.option_of_bencode (fun v -> - Value.hash_of_bencode v - |> Result.map (fun hash -> S.Hash hash) - |> Result.map (SI.Pointer.make Loader.load) ) + Value.hash_of_bencode v + |> Result.map (fun hash -> S.Hash hash) + |> Result.map (SI.Pointer.make Loader.load) ) in Ok {multigroups; previous} end @@ -107,9 +107,7 @@ module Make (S : Abstract.Storage.STORAGE) = struct method protocols : Protocols.Handle.protocol list = let bind = - Option.map - (fun root -> {EphemeralRelation.root; within= Protocols.Handle.make {<>}}) - root + Option.map (fun root -> {EphemeralRelation.root; within= Protocols.Handle.make {<>}}) root in let multigroups = Prototype.mixture_of node (fun make node -> diff --git a/lib/kernel/EphemeralRelation.ml b/lib/kernel/EphemeralRelation.ml index 8843d11..8672424 100644 --- a/lib/kernel/EphemeralRelation.ml +++ b/lib/kernel/EphemeralRelation.ml @@ -138,7 +138,8 @@ let enumerate_owned relation = end ) let asking f relation = - Protocols.Handle.releasing relation (fun () -> Result.bind (Protocols.Relation.require relation) f) + Protocols.Handle.releasing relation (fun () -> + Result.bind (Protocols.Relation.require relation) f ) let generated ?program ?within name description value = let invoking f () = @@ -163,8 +164,7 @@ module Make (S : Abstract.Storage.STORAGE) = struct module SI = Storage.Make (S) module R = SubstantialRelation.Make (S) - let restore ?program ?within ({Persisted.name; schematics; pointer} : Persisted.t) - description = + let restore ?program ?within ({Persisted.name; schematics; pointer} : Persisted.t) description = generated ?program ?within name description {name= Some name; schematics= `Persisted schematics; pointer= Some pointer} diff --git a/lib/kernel/Multigroup.ml b/lib/kernel/Multigroup.ml index 399ab30..79479d7 100644 --- a/lib/kernel/Multigroup.ml +++ b/lib/kernel/Multigroup.ml @@ -72,8 +72,8 @@ module Make (S : Abstract.Storage.STORAGE) = struct let unjudgeable denial = condition "unjudgeable-denial" - "A denial does not declare that reading it with nothing bound ends, so the state cannot \ - be judged" + "A denial does not declare that reading it with nothing bound ends, so the state cannot be \ + judged" ("denial" |=| Concepts.Value.String denial) end @@ -230,7 +230,7 @@ module Make (S : Abstract.Storage.STORAGE) = struct let derive f node' = Protocols.Handle.require Protocols.Addressable.from node' |> Result.map Protocols.Addressable.address - |>> (fun addr -> self#deriving (f addr)) + |>> fun addr -> self#deriving (f addr) in Protocols. [ Addressable.make self; diff --git a/lib/kernel/Namespace.ml b/lib/kernel/Namespace.ml index efaf667..314a28e 100644 --- a/lib/kernel/Namespace.ml +++ b/lib/kernel/Namespace.ml @@ -26,10 +26,7 @@ class namespace = method find key = let open Utilities.Option in - Atomic.get entries - |> BatMap.find_opt key - |>> Protocols.Handle.copy - |> Result.ok + Atomic.get entries |> BatMap.find_opt key |>> Protocols.Handle.copy |> Result.ok end let make () = Protocols.Handle.make (new namespace) diff --git a/lib/kernel/Path.ml b/lib/kernel/Path.ml index 24d3d10..4dfba36 100644 --- a/lib/kernel/Path.ml +++ b/lib/kernel/Path.ml @@ -49,11 +49,7 @@ let walking ?missing f g handle path = let lookup handle path = walking (fun _ _ f -> f ()) Result.ok handle path let find handle path = - walking - ~missing:(fun () -> Ok None) - (fun _ _ f -> f ()) - (fun h -> Ok (Some h)) - handle path + walking ~missing:(fun () -> Ok None) (fun _ _ f -> f ()) (fun h -> Ok (Some h)) handle path let update handle path key reference value = let open Utilities.Result in diff --git a/lib/kernel/Program.ml b/lib/kernel/Program.ml index 64a9fcf..22ef7c3 100644 --- a/lib/kernel/Program.ml +++ b/lib/kernel/Program.ml @@ -70,5 +70,4 @@ let make ?root ~evaluator ~source kind = let load root ~evaluator ~source = with_evaluator root evaluator (fun found -> - Protocols.Evaluator.parse found source - |> Result.map (make ~root ~evaluator ~source) ) + Protocols.Evaluator.parse found source |> Result.map (make ~root ~evaluator ~source) ) diff --git a/lib/kernel/Tuple.ml b/lib/kernel/Tuple.ml index 7cd952e..7fe483e 100644 --- a/lib/kernel/Tuple.ml +++ b/lib/kernel/Tuple.ml @@ -79,8 +79,7 @@ module Make (S : Abstract.Storage.STORAGE) = struct let node tx {attributes; _} = let open Utilities.Result in - AttributeM.find tx attributes - |>> Option.to_result ~none:(Error.incomplete_tuple attributes) + AttributeM.find tx attributes |>> Option.to_result ~none:(Error.incomplete_tuple attributes) let empty tx ~type_ () = let open Utilities.Result in |
