From 31e6e4cb803724db63860916d465831fe6b97674 Mon Sep 17 00:00:00 2001 From: Anton Dyudin Date: Tue, 1 Sep 2015 13:06:15 -0700 Subject: [PATCH] more informative |mass for ford and gall --- arvo/ford.hoon | 23 ++++++++++++++++++++++- arvo/gall.hoon | 15 ++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/arvo/ford.hoon b/arvo/ford.hoon index df0e1323cd..8d04646e03 100644 --- a/arvo/ford.hoon +++ b/arvo/ford.hoon @@ -1850,7 +1850,28 @@ :^ hen %give %mass :- %ford :- %| - :~ lex/`lex + %- |= a=(list (list mass)) ^- (list mass) :: XX single-home + =+ a2=a + ?~ a !! + ?~ i.a ~ + :_ $(a (turn a2 tail)) + :- p.i.i.a + ?~ -.q.i.i.a + [%& (turn (turn a2 head) |=(b=mass ?~(-.q.b p.q.b !!)))] + [%| $(a (turn (turn a2 head) |=(b=mass ?~(-.q.b !! p.q.b))))] + %+ turn (~(tap by pol)) + |= [@ baby] + :~ =< cache/[%| (turn `(list term)`/hood/bake/lilt/slit/slim/slap/slam .)] + =- |=(a=term [a `(~(get ja dep) a)]) + =< `dep=(jar term ,*)`(~(rep by jav) .) + |=([[* a=[term *]] b=(jar term ,*)] (~(add ja b) a)) + :: + =< depends/[%| (turn `(list term)`/init/sent/done .)] + =- |=(a=term [a `(~(get ja dep) a)]) + =< `dep=(jar term ,*)`(~(rep by deh) .) + |=([[@ a=[term *]] b=(jar term ,*)] (~(add ja b) a)) + :: + tasks/`[dym tad] == =+ our=p.q.hic =+ ^= bay ^- baby diff --git a/arvo/gall.hoon b/arvo/gall.hoon index accb6aa35c..05664dd45e 100644 --- a/arvo/gall.hoon +++ b/arvo/gall.hoon @@ -1177,7 +1177,20 @@ :^ hen %give %mass :- %gall :- %| - :~ all/`all + %- |= a=(list (list mass)) ^- (list mass) :: XX single-home + =+ a2=a + ?~ a !! + ?~ i.a ~ + :_ $(a (turn a2 tail)) + :- p.i.i.a + ?~ -.q.i.i.a + [%& (turn (turn a2 head) |=(b=mass ?~(-.q.b p.q.b !!)))] + [%| $(a (turn (turn a2 head) |=(b=mass ?~(-.q.b !! p.q.b))))] + %+ turn (~(tap by pol.all)) + |= [@ mast] + :~ foreign/`sap + blocked/[%| (sort :_(aor (~(tap by (~(run by wub) |=(sofa `+<))))))] + active/[%| (sort :_(aor (~(tap by (~(run by bum) |=(seat `+<))))))] == == ::