dbug: cleaner subscription printing

Previously, the pretty-printing for %incoming and %outgoing results was hanging
on to and displaying irrelevant type information: "_list_ of subscriptions",
"wire with _head and tail_", and so on.

Here, we move to producing tangs, instead of vases, and print those. For the
%incoming and %outgoing cases, we print a line for every subscription, sorting
them by path and wire respectively, and giving clean, easily readable output.
This commit is contained in:
Fang 2020-03-21 18:29:33 +01:00 committed by GitHub
parent fed93b1fe5
commit 50f7dc85fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,44 +32,51 @@
[cards this] [cards this]
=/ dbug =/ dbug
!<(poke vase) !<(poke vase)
=; out=^vase =; =tang
((slog (sell out) ~) [~ this]) ((slog tang) [~ this])
?- -.dbug ?- -.dbug
%bowl !>(bowl) %bowl [(sell !>(bowl))]~
:: ::
%state %state
=? grab.dbug =('' grab.dbug) '-' =? grab.dbug =('' grab.dbug) '-'
=- [(sell !>(-))]~
%+ slap %+ slap
(slop on-save:ag !>([bowl=bowl ..zuse])) (slop on-save:ag !>([bowl=bowl ..zuse]))
(ream grab.dbug) (ream grab.dbug)
:: ::
%incoming %incoming
!> %+ murn
%+ murn ~(tap by sup.bowl) %+ sort ~(tap by sup.bowl)
|= sub=[=duct [=ship =path]] |= [[* a=[=ship =path]] [* b=[=ship =path]]]
^- (unit _sub) (aor [path ship]:a [path ship]:b)
|= [=duct [=ship =path]]
^- (unit tank)
=; relevant=? =; relevant=?
?:(relevant `sub ~) ?. relevant ~
`>[path=path from=ship duct=duct]<
?- -.about.dbug ?- -.about.dbug
%ship =(ship.sub ship.about.dbug) %ship =(ship ship.about.dbug)
%path ?=(^ (find path.about.dbug path.sub)) %path ?=(^ (find path.about.dbug path))
%wire %+ lien duct.sub %wire %+ lien duct
|=(=wire ?=(^ (find wire.about.dbug wire))) |=(=wire ?=(^ (find wire.about.dbug wire)))
%term !! %term !!
== ==
:: ::
%outgoing %outgoing
!> %+ murn
%+ murn ~(tap by wex.bowl) %+ sort ~(tap by wex.bowl)
|= sub=[[=wire =ship =term] [acked=? =path]] |= [[[a=wire *] *] [[b=wire *] *]]
^- (unit _sub) (aor a b)
|= [[=wire =ship =term] [acked=? =path]]
^- (unit tank)
=; relevant=? =; relevant=?
?:(relevant `sub ~) ?. relevant ~
`>[wire=wire agnt=[ship term] path=path ackd=acked]<
?- -.about.dbug ?- -.about.dbug
%ship =(ship.sub ship.about.dbug) %ship =(ship ship.about.dbug)
%path ?=(^ (find path.about.dbug path.sub)) %path ?=(^ (find path.about.dbug path))
%wire ?=(^ (find wire.about.dbug wire.sub)) %wire ?=(^ (find wire.about.dbug wire))
%term =(term.sub term.about.dbug) %term =(term term.about.dbug)
== ==
== ==
:: ::