dbug: support app state printing

:your-app +dbug %state
This commit is contained in:
Fang 2020-01-24 20:48:17 -08:00
parent da6f27c55c
commit a7f07866f9
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972
2 changed files with 13 additions and 6 deletions

View File

@ -19,11 +19,14 @@
*
:: inline arguments
::
args=?(~ [=what =about ~])
args=?(~ [what=?(%bowl %state) ~] [=what =about ~])
:: named arguments
::
~
==
:- %dbug
?~ args [%bowl *about]
[what.args about.args]
?- args
~ [%bowl *about]
[@ ~] [what.args *about]
[@ * ~] [what about]:args
==

View File

@ -5,6 +5,7 @@
|%
+$ what
$? %bowl
%state
%incoming
%outgoing
==
@ -31,12 +32,14 @@
[cards this]
=/ dbug
!<([=what =about] vase)
=; out
((slog >out< ~) [~ this])
=; out=^vase
((slog (sell out) ~) [~ this])
?- what.dbug
%bowl bowl
%bowl !>(bowl)
%state on-save:ag
::
%incoming
!>
%+ murn ~(tap by sup.bowl)
|= sub=[=duct [=ship =path]]
^- (unit _sub)
@ -51,6 +54,7 @@
==
::
%outgoing
!>
%+ murn ~(tap by wex.bowl)
|= sub=[[=wire =ship =term] [acked=? =path]]
^- (unit _sub)