Plebeia.DeepSource 3 High level
3 High level
val deep :
go_up:bool ->
create_subtrees:bool ->
Cursor.t ->
Segment.t list ->
(Cursor.t -> Segment.t -> (Cursor.t * 'a, Error.t) Result.t) ->
(Cursor.t * 'a, Error.t) Result.tMulti Bud level interface. deep performs f against the node pointed by the multi segments.
val get :
Cursor.t ->
Segment.t list ->
(Cursor.t * [ `Bud of Node_type.view | `Leaf of Node_type.view ], Error.t)
Result.tIf the target does not exists, do nothing
Delete also internal and extender
If the target does not exists, do nothing. If the result of the removal generates an empty bud, delete_and_clean_empty also cleans it.
The result cursor points to the bud which has the top most removed element.
If the target does not exists, do nothing. If the result of the removal generates an empty bud, delete_and_clean_empty' also cleans it.
The result cursor points to the original position. If the Bud at the original position becomes empty, the funciton fails.
val copy :
?allow_overwrite:bool ->
create_subtrees:bool ->
Cursor.t ->
Segment.t list ->
Segment.t list ->
(Cursor.t, Error.t) Result.tSubtree copy by making two nodes point to the same subtree.
allow_overwrite is false by default
val copy' :
?allow_overwrite:bool ->
?only_bud:bool ->
create_subtrees:bool ->
copy_ref:Cursor.t ->
Cursor.t ->
Segment.t list ->
Segment.t list ->
(Cursor.t, Error.t) Result.tGeneral version of copy. Copiable non Buds if only_bud=true
allow_overwrite is false by default only_bud is false by default
link n c segs makes a link to n at c/segs.
link is like copy, but n needs not to be a part of the tree of c.
n and c must be of the same context.
There is no prevention of cycle creation.
val alter :
Cursor.t ->
Segment.t list ->
(Node_type.view option -> (Node_type.t, Error.t) result) ->
(Cursor.t, Error.t) result