shrub/gen/hood/merge.hoon

47 lines
1.1 KiB
Plaintext
Raw Normal View History

2016-10-22 02:44:39 +03:00
:: Kiln: Merge local desk from (optionally-)foreign one
::
2015-09-12 00:15:25 +03:00
:::: /hoon/merge/hood/gen
::
/? 310
=, clay
2016-11-17 04:42:58 +03:00
::
|%
2018-03-19 07:18:20 +03:00
++ beaky {knot knot knot ~}
++ sorc ?({bek/beaky ~} {her/@p sud/@tas ~})
--
::
::::
2016-11-17 04:42:58 +03:00
::
:- %say
2016-08-11 21:15:06 +03:00
|= $: {now/@da eny/@uvJ bek/beak}
{arg/{?(sorc {syd/$@(desk beaky) sorc})} cas/case gem/?(germ $auto)}
==
=* our p.bek
|^ :- %kiln-merge
^- {syd/desk her/ship sud/desk cas/case gem/?(germ $auto)}
?- arg
2018-03-19 07:18:20 +03:00
{@ @ ~}
=+(arg [sud ?.(=(our her) her (sein:title p.bek now her)) sud (opt-case da+now) gem])
2016-02-11 22:20:50 +03:00
::
2018-03-19 07:18:20 +03:00
{^ ~}
2016-02-11 22:20:50 +03:00
=+ (pars bek.arg)
[dez ?.(=(our who) who (sein:title p.bek now who)) dez (opt-case caz) gem]
2016-02-11 22:20:50 +03:00
::
2018-03-19 07:18:20 +03:00
{* @ @ ~}
2016-02-11 22:20:50 +03:00
:- (pars-src syd.arg)
=+(arg [her sud (opt-case da+now) gem])
::
2018-03-19 07:18:20 +03:00
{* ^ ~}
2016-02-11 22:20:50 +03:00
:- (pars-src syd.arg)
2016-02-17 00:43:28 +03:00
=+((pars bek.arg) [who dez (opt-case caz) gem])
==
2016-02-17 00:43:28 +03:00
++ opt-case |=(a/case ?:(=(*case cas) a cas)) :: override
++ pars |=(a/beaky `{{who/ship dez/desk caz/case} *}`(need (de-beam:format a)))
++ pars-src
|= syd/$@(desk beaky)
?@ syd syd
=+ (pars syd)
~| [%into-foreign who `path`syd]
?>(=(our who) dez)
--