diff --git a/base/arvo/clay.hoon b/base/arvo/clay.hoon index 603b3a77fc..432e31a45b 100644 --- a/base/arvo/clay.hoon +++ b/base/arvo/clay.hoon @@ -184,6 +184,23 @@ |= gag=gage ^- (list (pair cage cage)) (unwrap-tang (gage-to-tage gag)) :: + ++ gage-to-success-cages + |= gag=gage + ^- (list (pair cage cage)) + ?. ?=(%tabl -.gag) + (ford-fail ?-(-.gag %| p.gag, %& [>%strange-gage p.p.gag<]~)) + %+ murn p.gag + |= [key=gage val=gage] ^- (unit ,[cage cage]) + ?. ?=(%& -.key) + (ford-fail ?-(-.key %| p.key, %tabl [>%strange-gage<]~)) + ?- -.val + %tabl (ford-fail >%strange-gage< ~) + %& (some [p.key p.val]) + %| =. p.val [(sell q.p.key) p.val] + ~> %slog.[0 %*(. >%ford-fail syd %for %why< |2.+> p.val)] + ~ + == + :: ++ gage-to-tage |= gag=gage ^- (each (list (pair cage cage)) tang) @@ -567,7 +584,7 @@ (apply-edit wen) +>.$ ^- (list (pair path cage)) - %+ turn (gage-to-cages res) + %+ turn (gage-to-success-cages res) |= [pax=cage cay=cage] ?. ?=(%path p.pax) ~|(%clay-take-inserting-strange-path-mark !!) @@ -2749,8 +2766,10 @@ :: ~& >> [pax %ank-kan-sig] ~ :: ~& >> [pax %ank-sig] - =+ =+ (~(tap by dir.u.kan)) - :: ~& [%dirukan pax=pax (~(run by dir.u.kan) (cury test ~))] + =+ ?~ dir.u.kan + ~ + =+ (~(tap by u.dir.u.kan)) + :: ~& [%dirukan pax=pax (~(run by u.dir.u.kan) (cury test ~))] |- ^- (list (pair path miso)) ?~ +< ~ ?~ q.i $(+< t) @@ -2769,16 +2788,18 @@ - [[(flop pax) %del q.u.q.u.ank] -] :: ~& >> [pax %neither-sig] - =+ %+ weld + =+ ?~ dir.u.kan + ~ + %+ weld =+ (~(tap by r.u.ank)) |- ^- (list ,[p=path q=miso]) ?~ +< ~ - =+ (~(get by dir.u.kan) p.i) + =+ (~(get by u.dir.u.kan) p.i) ?: ?=([~ ~] -) $(+< t) %- weld :_ $(+< t) :: ~& >> [pax %ankhing p.i ?=(~ -)] ^$(pax [p.i pax], ank `q.i, kan ?~(- ~ `u.u.-)) - =+ (~(tap by dir.u.kan)) + =+ (~(tap by u.dir.u.kan)) :: ~& > [%sdirukan pax=pax (~(run by dir.u.kan) (cury test ~))] |- ^- (list ,[p=path q=miso]) ?~ +< ~ diff --git a/base/arvo/ford.hoon b/base/arvo/ford.hoon index 949e3d696c..08649ca9f5 100644 --- a/base/arvo/ford.hoon +++ b/base/arvo/ford.hoon @@ -57,6 +57,7 @@ ++ calx :: concrete cache line $% [%hood p=calm q=(pair beam cage) r=hood] :: compile [%bake p=calm q=(trel mark beam heel) r=(unit vase)]:: load + [%lilt p=calm q=arch r=(jug mark mark)] :: translation graph [%slit p=calm q=[p=type q=type] r=type] :: slam type [%slim p=calm q=[p=type q=twig] r=(pair type nock)]:: mint [%slap p=calm q=[p=vase q=twig] r=vase] :: compute @@ -81,6 +82,7 @@ ?+ sem !! %hood ?>(?=(%hood -.cax) r.cax) %bake ?>(?=(%bake -.cax) r.cax) + %lilt ?>(?=(%lilt -.cax) r.cax) %slap ?>(?=(%slap -.cax) r.cax) %slam ?>(?=(%slam -.cax) r.cax) %slim ?>(?=(%slim -.cax) r.cax) @@ -275,6 +277,8 @@ %lime lime %lima lima %link link + %lion lion + %lily lily %lope lope %make make %meow meow @@ -435,9 +439,9 @@ %+ cope |- ^- (bolt (list (pair gage gage))) ?~ p.gag (fine cof ~) - %+ cope (fret ^$(gag q.i.p.gag)) + %+ cope (fret ^$(gag q.i.p.gag, cof cof)) |= [cof=cafe val=gage] - %+ cope ^$(p.gag t.p.gag) + %+ cope ^$(p.gag t.p.gag, cof cof) |= [cof=cafe rex=(list (pair gage gage))] (fine cof [[p.i.p.gag val] rex]) |= [cof=cafe rex=(list (pair gage gage))] @@ -826,18 +830,24 @@ $(yom t.yom, axe (peg axe 3)) :: ++ lace :: load and check - |= [cof=cafe for=mark bem=beam arg=heel] - ^- (bolt (unit vase)) + |= [cof=cafe for=mark bem=beam] + ^- (bolt (unit (burg heel vase))) %+ cope (lend cof bem) |= [cof=cafe arc=arch] ?^ q.arc - (cope (cope (liar cof bem) (lake for)) (fest (norm ska bem))) - ?: (~(has by r.arc) %hook) - %+ cope (fade cof %hook bem) - |= [cof=cafe hyd=hood] - %+ cope (cope (abut:(meow bem arg) cof hyd) (lake for)) - (fest (norm ska bem)) - (flue cof) + %+ (fest (norm ska bem)) cof + |=([cof=cafe arg=heel] (cope (liar cof bem) (lake for))) + ?. (~(has by r.arc) %hook) + (flue cof) + %+ cope (lend cof bem(s [%hook s.bem])) + |= [cof=cafe arc=arch] + ?~ q.arc + (flue cof) + %+ (fest (norm ska bem(s [%hook s.bem]))) cof + |= [cof=cafe arg=heel] + %+ cope (fade cof %hook bem) + |= [cof=cafe hyd=hood] + (cope (abut:(meow bem arg) cof hyd) (lake for)) :: ++ lake :: check/coerce |= for=mark @@ -910,6 +920,7 @@ ^- (bolt arch) =+ von=(save ~ %cy bem) ?~ von [p=cof q=[%1 [%y bem ~] ~ ~]] + :: %+ flag (norm ska bem) (fine cof ((hard arch) q.q:(need u.von))) :: ++ liar :: load vase @@ -923,40 +934,73 @@ (fine cof q.u.u.von) :: ++ lily :: translation targets - |= [cof=cafe for=mark] - ^- (bolt (list ,@tas)) + |= [cof=cafe for=mark] ^- (bolt (set ,@tas)) + %+ cope (lilt cof) + |= [cof=cafe lil=(jug mark mark)] + (fine cof (~(get ju lil) for)) + :: + ++ lilt + |= cof=cafe ^- (bolt (jug mark mark)) + %+ cope (lend cof [bek /mar]) + |= [cof=cafe arc=arch] + %+ (clef %lilt) (fine cof arc) + |= [cof=cafe arc=arch] + :: =- =+((cope - |=([cafe lil=(jug mark mark)] ~&(lil=lil (flue cof)))) +<) + =+ all=(~(tap by r.arc)) + ~! all + |- ^- (bolt (jug mark mark)) + ?~ all (flue cof) + %+ cope $(cof cof, all t.all) + |= [cof=cafe lil=(jug mark mark)] + =* for p.i.all =+ raf=(fang cof for) - ?: =(%2 -.q.raf) (flue cof) + ?: =(%2 -.q.raf) (fine cof lil) %+ cope raf |= [cof=cafe vax=vase] %+ fine cof + %- ~(gas ju lil) + ~| weg=(jam 3 p.vax) %+ weld - ^- (list ,@tas) - ?. (slob %garb p.vax) ~ - =+ gav=((soft (list ,@tas)) q:(slap vax [%cnzy %garb])) - ?~(gav ~ u.gav) + ^- (list ,[mark mark]) + ?. (slob %grab p.vax) ~ + =+ gab=(slap vax [%cnzy %grab]) + :: =+ opt=(skip (sloe p.gap) |=(fro=mark =(fro %noun))) + (turn (sloe p.gab) |=(fro=mark [fro for])) ?. (slob %grow p.vax) ~ =+ gow=(slap vax [%cnzy %grow]) - (sort (sloe p.gow) aor) + (turn (sloe p.gow) |=(too=mark [for too])) :: ++ lima :: load at depth |= [cof=cafe for=mark bem=beam arg=heel] %+ (clef %bake) [p=cof q=[%0 p=[bem `~] q=[for bem arg]]] |= [cof=cafe for=mark bem=beam arg=heel] ^- (bolt (unit vase)) - %+ cope (lend cof bem) - |= [cof=cafe arc=arch] - ^- (bolt (unit vase)) - ?: (~(has by r.arc) for) - (lace cof for bem(s [for s.bem]) arg) - =+ haz=(turn (~(tap by r.arc) ~) |=([a=@tas b=~] a)) - ?~ haz (flue cof) - %+ cope (lion cof for haz) + %+ cope + %+ cope (lend cof bem) + |= [cof=cafe arc=arch] ^- (bolt (map mark (burg heel vase))) + ?~ r.arc (flue cof) + %+ cope $(r.arc l.r.arc) + |= [cof=cafe lam=(map mark (burg heel vase))] + %+ cope ^$(r.arc r.r.arc, cof cof) + |= [cof=cafe ram=(map mark (burg heel vase))] + =. for p.n.r.arc + %+ cope + ?. ((sane %tas) for) (flue cof) + (lace cof for bem(s [for s.bem])) + |= [cof=cafe nod=(unit (burg heel vase))] + %+ fine cof + ?^(nod [[for u.nod] lam ram] (~(uni by lam) ram)) + |= [cof=cafe mal=(map mark (burg heel vase))] + =+ lit=(~(get by mal) for) + ?^ lit + (cope (u.lit cof arg) (fest bem)) + =+ opt=(sa (turn (~(tap by mal)) head)) :: XX asymptotics + %+ cope (lion cof for opt) |= [cof=cafe wuy=(list ,@tas)] ?~ wuy (flue cof) - %+ cope (cope (make cof %bake i.wuy bem arg) furl) - |= [cof=cafe hoc=cage] - %+ cope (lope cof i.wuy t.wuy q.hoc) + %+ cope ((~(got by mal) i.wuy) cof arg) + |= [cof=cafe hoc=vase] + %+ cope (lope cof i.wuy t.wuy hoc) |= [cof=cafe vax=vase] ((fest bem) cof vax) :: @@ -994,22 +1038,24 @@ `(slap gab [%cnzy for]) ?~ zat (flaw cof [%leaf "ford: no link: {<[for too]>}"]~) + ~| [%link-maul for too] (maul cof u.zat vax) :: ++ lion :: translation search - |= [cof=cafe too=mark fro=(list mark)] + |= [cof=cafe too=mark fro=(set mark)] :: ~& lion/[too=too fro=(sa fro)] ^- (bolt (list mark)) =| $: war=(map mark (list mark)) pax=(list mark) won=[p=mark q=(qeu mark)] == %. [cof fro] - |= [cof=cafe fro=(list mark)] ^- (bolt (list mark)) + |= [cof=cafe fro=(set mark)] ^- (bolt (list mark)) ?: =(too p.won) (fine cof (flop pax)) - =. fro (skip fro ~(has by war)) - =: q.won (~(gas to q.won) fro) - war (~(gas by war) (turn fro |=(mark [+< pax]))) + =+ for=(skip (~(tap by fro)) ~(has by war)) + =. for (sort for aor) :: XX useful? + =: q.won (~(gas to q.won) for) + war (~(gas by war) (turn for |=(mark [+< pax]))) == ?: =(~ q.won) (flue cof) @@ -1062,7 +1108,7 @@ == :: %bake - :: ~& [%bake-start (tope q.kas)] + :: ~& > [p.kas (tope q.kas)] %+ cool |.(leaf/"ford: bake {