aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/View.ml
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-10-07 18:25:43 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-10-07 18:25:43 -0300
commit932e657e38665afa1da1aab549977841abbd9dcf (patch)
treeb2c0b3d30b7aaab7347300b3932a9f03e4f64f9a /lib/kernel/View.ml
parentcfc641a9bb97c94e5993f895a8bcdf24214adc83 (diff)
downloadRNT-932e657e38665afa1da1aab549977841abbd9dcf.tar.gz
RNT-932e657e38665afa1da1aab549977841abbd9dcf.zip
drop journal in favor of local branch history
Diffstat (limited to 'lib/kernel/View.ml')
-rw-r--r--lib/kernel/View.ml44
1 files changed, 0 insertions, 44 deletions
diff --git a/lib/kernel/View.ml b/lib/kernel/View.ml
deleted file mode 100644
index b90afef..0000000
--- a/lib/kernel/View.ml
+++ /dev/null
@@ -1,44 +0,0 @@
-type heading = Protocols.Schematics.attribute_description BatMap.String.t
-type rows = (Concepts.Tuple.t list, Concepts.Condition.condition) result
-
-let ephemeral heading enumerate =
- EphemeralRelation.instantiate heading
- {EphemeralRelation.name= None; schematics= `Temporary heading; program= None}
- (fun () ->
- Result.map
- (fun tuples -> Generator.cursor_of (fun ~yield -> List.iter yield tuples; Ok ()))
- (enumerate ()) )
-
-let fixed heading tuples = ephemeral heading (fun () -> Ok tuples)
-
-let computed heading ~current compute =
- let open Utilities.Result in
- let now = ephemeral heading (fun () -> current () |> fmap compute) in
- Prototype.mixture
- ( Protocols.Derived.make
- object
- method within directory = Ok (ephemeral heading (fun () -> compute directory))
- end
- :: Protocols.Handle.protocols now )
-
-let read relation =
- let open Utilities.Result in
- let* schematics = Protocols.Handle.require Protocols.Schematics.from relation in
- let* description = Protocols.Schematics.describe schematics in
- let* heading =
- match description with
- | Protocols.Schematics.Relation heading -> Ok heading
- | _ ->
- Error
- Concepts.Condition.(
- condition "not-a-relation" "The object does not describe itself as a relation"
- ("object" |=| Concepts.Value.String (Protocols.Handle.to_string relation)) )
- in
- let* enumerable = Protocols.Enumerable.require relation in
- let* cursor = Protocols.Enumerable.enumerate enumerable in
- Fun.protect
- ~finally:(fun () -> Protocols.Handle.release cursor)
- (fun () ->
- let* scan = Protocols.Cursor.require cursor in
- let* tuples = Protocols.Cursor.drain scan () in
- Ok (heading, BatFingerTree.to_list tuples) )