mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 04:52:06 +03:00
kiln: add vats-diff mark
This commit is contained in:
parent
b1ff1eb3ff
commit
f8edf723e0
54
pkg/arvo/mar/kiln/vats-diff.hoon
Normal file
54
pkg/arvo/mar/kiln/vats-diff.hoon
Normal file
@ -0,0 +1,54 @@
|
||||
/- hood
|
||||
|_ =diff:hood
|
||||
++ grad %noun
|
||||
++ grow
|
||||
|%
|
||||
++ noun diff
|
||||
++ json
|
||||
=, enjs:format
|
||||
|^
|
||||
%+ frond -.diff
|
||||
?- -.diff
|
||||
%block (block +.diff)
|
||||
?(%merge-sunk %merge-fail) (desk-arak-err +.diff)
|
||||
?(%reset %merge %suspend %revive) (desk-arak +.diff)
|
||||
==
|
||||
::
|
||||
++ block
|
||||
|= [=desk =arak:hood =weft:hood blockers=(set desk)]
|
||||
%+ merge (desk-arak desk arak)
|
||||
%- pairs
|
||||
:~ weft+(weft:enjs:hood weft)
|
||||
blockers+a+(turn ~(tap in blockers) (lead %s))
|
||||
==
|
||||
::
|
||||
++ desk-arak
|
||||
|= [=desk =arak:hood]
|
||||
%- pairs
|
||||
:~ desk+s+desk
|
||||
arak+(arak:enjs:hood arak)
|
||||
==
|
||||
::
|
||||
++ desk-arak-err
|
||||
|= [=desk =arak:hood =tang]
|
||||
%+ merge (desk-arak desk arak)
|
||||
%+ frond %tang
|
||||
a+(turn tang tank)
|
||||
::
|
||||
++ merge
|
||||
|= [a=^json b=^json]
|
||||
^- ^json
|
||||
?> &(?=(%o -.a) ?=(%o -.b))
|
||||
o+(~(uni by p.a) p.b)
|
||||
--
|
||||
--
|
||||
++ grab
|
||||
|%
|
||||
++ noun diff:hood
|
||||
--
|
||||
--
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user