This commit is contained in:
Anton Dyudin 2015-05-26 13:20:44 -07:00
parent 593aa09701
commit cab4b671a6
2 changed files with 96 additions and 212 deletions

View File

@ -133,9 +133,9 @@
[%call p=silk q=silk] :: slam [%call p=silk q=silk] :: slam
[%cast p=mark q=silk] :: translate [%cast p=mark q=silk] :: translate
[%diff p=silk q=silk] :: diff [%diff p=silk q=silk] :: diff
[%done p=(set beam) q=gage] :: literal [%done p=(set beam) q=cage] :: literal
[%dude p=tank q=silk] :: error wrap [%dude p=tank q=silk] :: error wrap
[%dune p=(set beam) q=(unit gage)] :: unit literal [%dune p=(set beam) q=(unit cage)] :: unit literal
[%file p=beam] :: from clay [%file p=beam] :: from clay
[%join p=mark q=silk r=silk] :: merge [%join p=mark q=silk r=silk] :: merge
[%mash p=mark q=milk r=milk] :: annotate [%mash p=mark q=milk r=milk] :: annotate

View File

@ -212,6 +212,16 @@
?+(- [[p.p p.q]:hed -] [@ *] -) ?+(- [[p.p p.q]:hed -] [@ *] -)
== == == ==
:: ::
++ cages-to-map
|= tay=(list (pair cage cage))
=| can=(map path cage)
|- ^- (each (map path cage) tang)
?~ tay [%& can]
=* pax p.i.tay
?. ?=(%path p.pax)
(mule |.(`~`~|([%expected-path got=p.pax] !!)))
$(tay t.tay, can (~(put by can) ((hard path) q.q.pax) q.i.tay))
++ balk :: read and send ++ balk :: read and send
|= [hen=duct cay=(unit (each cage lobe)) mun=mood] |= [hen=duct cay=(unit (each cage lobe)) mun=mood]
^+ +> ^+ +>
@ -931,12 +941,13 @@
== ==
:: ::
++ take-foreign-x ++ take-foreign-x
|= [car=care cas=case pax=path res=(each gage tang)] |= [car=care cas=case pax=path res=gage]
^+ +> ^+ +>
?> ?=(^ ref) ?> ?=(^ ref)
?: ?=(%| -.res) ?. ?=(%& -.res)
~| "validate foreign plops failed" ~| "validate foreign plops failed"
~| [%plop-fail (turn p.res |=(tank ~(ram re +<)))] =+ tan=?-(-.res %| p.res, %tabl ~[>%bad-marc<])
~> %mean.|.(rose/[" " "[" "]"]^[>%plop-fail< tan])
!! !!
?> ?=(@ p.p.res) ?> ?=(@ p.p.res)
wake(haw.u.ref (~(put by haw.u.ref) [car cas pax] `p.res)) wake(haw.u.ref (~(put by haw.u.ref) [car cas pax] `p.res))
@ -965,34 +976,24 @@
== ==
:: ::
++ take-foreign-plops ++ take-foreign-plops
|= res=(each gage tang) |= res=gage
^+ +> ^+ +>
?> ?=(^ ref) ?> ?=(^ ref)
?> ?=(^ nak.u.ref) ?> ?=(^ nak.u.ref)
?: ?=(%| -.res) ?. ?=(%| -.res)
~| "validate foreign plops failed" ~| "validate foreign plops failed"
~| [%plop-fail (turn p.res |=(tank ~(ram re +<)))] ~> %mean.|.(rose/[" " "[" "]"]^[>%plop-fail< p.res])
!! !!
=+ cay=p.res =+ ^- lat=(list blob)
?@ p.cay ~| %plop-bad-marc !! %+ turn (gage-to-cages res)
=+ |- ^- lat=(list blob) |= [bob=cage cay=cage]
?~ p.p.cay ?. ?=(%blob p.bob)
~ ~| %plop-not-blob
:_ %_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)])
?. ?=(%blob p.i.p.p.cay)
~| %plop-strange-marc-a
!! !!
?. ?=(@ q.i.p.p.cay) =+ bol=((hard blob) q.bob)
~| %plop-strange-marc-b
!!
=+ coy=(slot 2 q.cay)
?@ q.coy
~| %plop-strange-coy
!!
=+ bol=((hard blob) -.q.coy)
?- -.bol ?- -.bol
%delta [-.bol p.bol q.bol q.i.p.p.cay +.q.coy] %delta [-.bol p.bol q.bol p.cay q.q.cay]
%direct [-.bol p.bol q.i.p.p.cay +.q.coy] %direct [-.bol p.bol p.cay q.q.cay]
%indirect ~| %plop-indirect-not-implemented !! %indirect ~| %plop-indirect-not-implemented !!
== ==
%^ apply-foreign-update %^ apply-foreign-update
@ -1583,16 +1584,16 @@
..me(mer (~(del by mer) ali), reg :_(reg [hen %mere gon.dat])) ..me(mer (~(del by mer) ali), reg :_(reg [hen %mere gon.dat]))
:: ::
++ route ++ route
|= [sat=term res=(each riot (each gage tang))] |= [sat=term res=(each riot gage)]
^+ +>.$ ^+ +>.$
?+ sat ~|((crip <[%bad-stage sat]>) !!) ?+ +< ~|((crip <[%bad-stage sat ?~(-.res %riot %gage)]>) !!)
%ali %- fetched-ali ?> ?=(%& -.res) p.res [%ali %& *] %.(p.res fetched-ali)
%diff-ali %- diffed-ali ?> ?=(%| -.res) p.res [%diff-ali %| *] %.(p.res diffed-ali)
%diff-bob %- diffed-bob ?> ?=(%| -.res) p.res [%diff-bob %| *] %.(p.res diffed-bob)
%merge %- merged ?> ?=(%| -.res) p.res [%merge %| *] %.(p.res merged)
%build %- built ?> ?=(%| -.res) p.res [%build %| *] %.(p.res built)
%checkout %- checked-out ?> ?=(%| -.res) p.res [%checkout %| *] %.(p.res checked-out)
%ergo %- ergoed ?> ?=(%| -.res) p.res [%ergo %| *] %.(p.res ergoed)
== ==
:: ::
++ start ++ start
@ -1827,34 +1828,14 @@
(diff-bas %ali ali.dat ali bob.dat) (diff-bas %ali ali.dat ali bob.dat)
:: ::
++ diffed-ali ++ diffed-ali
|= res=(each gage tang) |= res=gage
^+ +> ^+ +>
?: ?=(%| -.res) =+ tay=(gage-to-tage res)
(error:he %diff-ali-bad-made leaf/"merge diff ali failed" p.res) ?: ?=(%| -.tay)
=+ cay=p.res (error:he %diff-ali-bad-made leaf/"merge diff ali failed" p.tay)
?@ p.cay =+ can=(cages-to-map p.tay)
(error:he %diff-ali-bad-marc >p.cay< ~) ?: ?=(%| -.can)
=| can=(map path cage) (error:he %diff-ali p.can)
=>
|- ^+ +
?~ p.p.cay
+.$(can ~)
=+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)])
?: ?=(%| -.gon.dat.tal)
tal
?. ?=(%path p.i.p.p.cay)
+.$(+>.$ (error:he %diff-ali-strange-marc-a >p.i.p.p.cay< ~))
?. ?=(@ q.i.p.p.cay)
+.$(+>.$ (error:he %diff-ali-strange-marc-b >q.i.p.p.cay< ~))
=+ coy=(slot 2 q.cay)
?@ q.coy
+.$(+>.$ (error:he %diff-ali-strange-coy ~))
%_ +.$
can
%+ ~(put by can:tal)
((hard path) -.q.coy)
[q.i.p.p.cay (slot 3 coy)]
==
?: ?=(%| -.gon.dat) ?: ?=(%| -.gon.dat)
+>.$ +>.$
=. new.dal.dat =. new.dal.dat
@ -1872,7 +1853,7 @@
!=([~ lob] a) !=([~ lob] a)
=([~ lob] b) =([~ lob] b)
== ==
=. can.dal.dat can =. can.dal.dat p.can
=. old.dal.dat =. old.dal.dat
%- mo ^- (list ,[path ~]) %- mo ^- (list ,[path ~])
%+ murn (~(tap by q.bas.dat)) %+ murn (~(tap by q.bas.dat))
@ -1887,34 +1868,14 @@
(diff-bas %bob bob.dat bob ali.dat) (diff-bas %bob bob.dat bob ali.dat)
:: ::
++ diffed-bob ++ diffed-bob
|= res=(each tage tang) |= res=gage
^+ +> ^+ +>
?: ?=(%| -.res) =+ tay=(gage-to-tage res)
(error:he %diff-bob-bad-made leaf/"merge diff bob failed" p.res) ?: ?=(%| -.tay)
=+ cay=p.res (error:he %diff-bob-bad-made leaf/"merge diff bob failed" p.tay)
?@ p.cay =+ can=(cages-to-map p.tay)
(error:he %diff-bob-bad-marc >p.cay< ~) ?: ?=(%| -.can)
=| can=(map path cage) (error:he %diff-bob p.can)
=>
|- ^+ +
?~ p.p.cay
+.$(can ~)
=+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)])
?: ?=(%| -.gon.dat.tal)
tal
?. ?=(%path p.i.p.p.cay)
+.$(+>.$ (error:he %diff-bob-strange-marc-a >p.i.p.p.cay< ~))
?. ?=(@ q.i.p.p.cay)
+.$(+>.$ (error:he %diff-bob-strange-marc-b >q.i.p.p.cay< ~))
=+ coy=(slot 2 q.cay)
?@ q.coy
+.$(+>.$ (error:he %diff-bob-strange-coy ~))
%_ +.$
can
%+ ~(put by can:tal)
((hard path) -.q.coy)
[q.i.p.p.cay (slot 3 coy)]
==
?: ?=(%| -.gon.dat) ?: ?=(%| -.gon.dat)
+>.$ +>.$
=. new.dob.dat =. new.dob.dat
@ -1932,7 +1893,7 @@
!=([~ lob] b) !=([~ lob] b)
=([~ lob] a) =([~ lob] a)
== ==
=. can.dob.dat can =. can.dob.dat p.can
=. old.dob.dat =. old.dob.dat
%- mo ^- (list ,[path ~]) %- mo ^- (list ,[path ~])
%+ murn (~(tap by q.bas.dat)) %+ murn (~(tap by q.bas.dat))
@ -1966,35 +1927,14 @@
== ==
:: ::
++ merged ++ merged
|= res=(each tage tang) |= res=gage
?: ?=(%| -.res) =+ tay=(gage-to-tage res)
(error:he %merge-bad-made leaf/"merging failed" p.res) ?: ?=(%| -.tay)
=+ cay=p.res (error:he %merge-bad-made leaf/"merging failed" p.tay)
?@ p.cay =+ can=(cages-to-map p.tay)
(error:he %merge-bad-marc >p.cay< ~) ?: ?=(%| -.can)
=| bof=(map path (unit cage)) (error:he %merge p.can)
=> =+ bof=(~(run by p.can) (flit |=([a=mark ^] !?=(%null a))))
|- ^+ +
?~ p.p.cay
+.$(bof ~)
=+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)])
?: ?=(%| -.gon.dat.tal)
tal
?. ?=(%path p.i.p.p.cay)
+.$(+>.$ (error:he %merge-strange-marc-a >p.i.p.p.cay< ~))
?. ?=(@ q.i.p.p.cay)
+.$(+>.$ (error:he %merge-strange-marc-b >q.i.p.p.cay< ~))
=+ coy=(slot 2 q.cay)
?@ q.coy
+.$(+>.$ (error:he %merge-strange-coy ~))
%_ +.$
bof
%+ ~(put by bof:tal)
((hard path) -.q.coy)
?: ?=(%null q.i.p.p.cay)
~
`[q.i.p.p.cay (slot 3 coy)]
==
?: ?=(%| -.gon.dat) ?: ?=(%| -.gon.dat)
+>.$ +>.$
=. bof.dat bof =. bof.dat bof
@ -2023,37 +1963,17 @@
:: ::
++ built ++ built
|= res=(each tage tang) |= res=gage
^+ +> ^+ +>
?: ?=(%| -.res) =+ tay=(gage-to-tage res)
(error:he %build-bad-made leaf/"delta building failed" p.res) ?: ?=(%| -.tay)
=+ cay=p.res (error:he %build-bad-made leaf/"delta building failed" p.tay)
?@ p.cay =+ bop=(cages-to-map p.tay)
(error:he %build-bad-marc >p.cay< ~) ?: ?=(%| -.bop)
=| bop=(map path cage) (error:he %built p.bop)
=>
|- ^+ +
?~ p.p.cay
+.$(bop ~)
=+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)])
?: ?=(%| -.gon.dat.tal)
tal
?. ?=(%path p.i.p.p.cay)
+.$(+>.$ (error:he %build-strange-marc-a >p.i.p.p.cay< ~))
?. ?=(@ q.i.p.p.cay)
+.$(+>.$ (error:he %build-strange-marc-b >q.i.p.p.cay< ~))
=+ coy=(slot 2 q.cay)
?@ q.coy
+.$(+>.$ (error:he %build-strange-coy ~))
%_ +.$
bop
%+ ~(put by bop:tal)
((hard path) -.q.coy)
[q.i.p.p.cay (slot 3 coy)]
==
?: ?=(%| -.gon.dat) ?: ?=(%| -.gon.dat)
+>.$ +>.$
=. bop.dat bop =. bop.dat p.bop
=+ ^- con=(map path ,*) :: 2-change conflict =+ ^- con=(map path ,*) :: 2-change conflict
%- mo %- mo
%+ skim (~(tap by bof.dat)) %+ skim (~(tap by bof.dat))
@ -2159,39 +2079,19 @@
== ==
:: ::
++ checked-out ++ checked-out
|= res=(each tage tang) |= res=gage
^+ +> ^+ +>
?: ?=(%| -.res) =+ tay=(gage-to-tage res)
(error:he %checkout-bad-made leaf/"merge checkout failed" p.res) ?: ?=(%| -.tay)
=+ cay=p.res (error:he %checkout-bad-made leaf/"merge checkout failed" p.tay)
?@ p.cay =+ can=(cages-to-map p.tay)
(error:he %patch-bad-marc >p.cay< ~) ?: ?=(%| -.can)
=| can=(list ,[path cage]) (error:he %checkout p.can)
=>
|- ^+ +
?~ p.p.cay
+.$(can ~)
=+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)])
?: ?=(%| -.gon.dat.tal)
tal
?. ?=(%path p.i.p.p.cay)
+.$(+>.$ (error:he %patch-strange-marc-a >p.i.p.p.cay< ~))
?. ?=(@ q.i.p.p.cay)
+.$(+>.$ (error:he %patch-strange-marc-b >q.i.p.p.cay< ~))
=+ coy=(slot 2 q.cay)
?@ q.coy
+.$(+>.$ (error:he %patch-strange-coy ~))
%_ +.$
can
:_ can:tal
:- ((hard path) -.q.coy)
[q.i.p.p.cay (slot 3 coy)]
==
?: ?=(%| -.gon.dat) ?: ?=(%| -.gon.dat)
+>.$ +>.$
=. let.dom +(let.dom) =. let.dom +(let.dom)
=. hit.dom (~(put by hit.dom) let.dom r.new.dat) =. hit.dom (~(put by hit.dom) let.dom r.new.dat)
=. ank.dat (checkout-ankh:ze (~(uni by bop.dat) (mo can))) =. ank.dat (checkout-ankh:ze (~(uni by bop.dat) p.can))
=. ank.dom ank.dat =. ank.dom ank.dat
?~ hez ?~ hez
(done:he ~) (done:he ~)
@ -2219,44 +2119,30 @@
== ==
:: ::
++ ergoed ++ ergoed
|= res=(each tage tang) |= res=gage
^+ + ^+ +>
?: ?=(%| -.res) =+ tay=(gage-to-tage res)
(error:he %ergo-bad-made leaf/"merge ergo failed" p.res) ?: ?=(%| -.tay)
=+ cay=p.res (error:he %ergo-bad-made leaf/"merge ergo failed" p.tay)
?@ p.cay ~| %patch-bad-marc !! =+ =| can=mick
=| can=(list ,[path (unit mime)]) |- ^- tan=$&(mick [p=term q=tang])
=> ?~ p.tay can
|- ^+ + =* pax p.i.p.tay
?~ p.p.cay ?. ?=(%path p.pax)
+.$(can ~) [%ergo >[%expected-path got=p.pax]< ~]
=+ tal=%_($ cay [[%tabl t.p.p.cay] (slot 3 q.cay)]) =* mim q.i.p.tay
?: ?=(%| -.gon.dat.tal) =+ mit=?.(?=(%mime p.mim) ~ `((hard mime) q.q.mim))
tal $(p.tay t.p.tay, can :_(can [((hard path) q.q.pax) mit]))
?. ?=(%path p.i.p.p.cay) ?: ?=([@ *] tan) (error:he tan)
+.$(+>.$ (error:he %patch-strange-marc-a >p.i.p.p.cay< ~))
?. ?=(@ q.i.p.p.cay)
+.$(+>.$ (error:he %patch-strange-marc-b >p.i.p.p.cay< ~))
=+ coy=(slot 2 q.cay)
?@ q.coy
+.$(+>.$ (error:he %patch-strange-coy ~))
%_ +.$
can
:_ can:tal
:- ((hard path) -.q.coy)
?. ?=(%mime q.i.p.p.cay)
~
`((hard mime) q:(slot 3 coy))
==
?~ hez ?~ hez
(error:he %ergo-no-hez ~) (error:he %ergo-no-hez ~)
?. syn ?. syn
(error:he %ergo-sync-off ~) (error:he %ergo-sync-off ~)
?: ?=(%| -.gon.dat) ?: ?=(%| -.gon.dat)
+>.$ +>.$
%= +>.$ %_ +>.$
don %| don %|
reg [[u.hez %ergo who syd let.dom can] reg] reg [[u.hez %ergo who syd let.dom tan] reg]
== ==
:: ::
++ he ++ he
@ -2680,12 +2566,10 @@
== ==
?: ?=([%blab care @ @ *] tea) ?: ?=([%blab care @ @ *] tea)
?> ?=(%made +<.q.hin) ?> ?=(%made +<.q.hin)
?: ?=(%| -.q.q.hin) ?. ?=(%& -.q.q.hin)
~| %blab-fail ~| %blab-fail
~> %mean.|.(p.q.q.hin) :: interpolate ford fail into stack trace ~> %mean.|.(?+(-.q.q.hin -.q.q.hin %| p.q.q.hin))
!! !! :: interpolate ford fail into stack trace
?^ p.p.q.q.hin
~|(%bad-marc !!)
:_ ..^$ :_ ~ :_ ..^$ :_ ~
:* hen %give %writ ~ :* hen %give %writ ~
`[care case @tas]`[i.t.tea ((hard case) +>:(slay i.t.t.tea)) i.t.t.t.tea] `[care case @tas]`[i.t.tea ((hard case) +>:(slay i.t.t.tea)) i.t.t.t.tea]