From cc605d0e5e2729deb89c24f7177f22b40028219f Mon Sep 17 00:00:00 2001 From: Joseph Bryan Date: Fri, 3 Mar 2017 14:56:06 -0500 Subject: [PATCH] updates ++boil:ap to crash if a book has pages with the same tag --- sys/hoon.hoon | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/sys/hoon.hoon b/sys/hoon.hoon index 36fffc90dd..0ce82b7b97 100644 --- a/sys/hoon.hoon +++ b/sys/hoon.hoon @@ -6999,12 +6999,21 @@ [%axil %void] ?~ t.p.gen boil(gen i.p.gen) - =+ :* def=bile(gen i.p.gen) - ^= end ^- (list line) - ~_ leaf+"book-foul" - %+ turn `(list hoon)`t.p.gen - |=(a/hoon =+(bile(gen a) ?>(?=($& -<) ->))) - == + =/ def bile(gen i.p.gen) + =| tag/(set term) + =? tag ?=($& -.def) (~(put in tag) `@tas`q.p.p.def) + =/ end + =| lit/(list line) + |- ^+ lit + =/ tar bile(gen i.t.p.gen) + ?. ?=($& -.tar) + ~_(leaf+"book-foul" !!) + =/ hed `@tas`q.p.p.tar + ?: (~(has in tag) hed) + ~_(leaf+"book-dup-page: {}" !!) + =. lit [+.tar lit] + ?~ t.t.p.gen lit + $(tag (~(put in tag) hed), t.p.gen t.t.p.gen) ?- -.def $& [%kelp p.def end] $| ?~(end p.def [%fern p.def [%kelp end] ~])