1
1
mirror of https://github.com/urbit/shrub.git synced 2024-12-26 21:44:11 +03:00
shrub/pkg/arvo/app/goad.hoon

47 lines
826 B
Plaintext
Raw Normal View History

/+ default-agent, verb
%+ verb |
^- agent:gall
=>
|%
++ goad
|= force=?
:~ [%pass /gall %arvo %g %goad force ~]
==
2021-02-12 05:01:02 +03:00
+$ state
$@ ~
[%0 ~]
--
|_ =bowl:gall
+* this .
def ~(. (default-agent this %|) bowl)
2020-06-10 11:16:25 +03:00
::
++ on-poke
|= [=mark =vase]
?: ?=([%noun * %go] +<)
[(goad |) this]
?: ?=([%noun * %force] +<)
[(goad &) this]
(on-poke:def mark vase)
::
2020-06-10 11:16:25 +03:00
++ on-arvo
|= [wir=wire sin=sign-arvo]
?+ wir (on-arvo:def wir sin)
[%clay ~] `this
2020-06-29 09:43:52 +03:00
[%behn ~] `this :: backcompat
2020-06-10 11:16:25 +03:00
==
::
++ on-agent on-agent:def
++ on-fail on-fail:def
2020-06-10 11:16:25 +03:00
++ on-init on-init:def
++ on-leave on-leave:def
2021-02-12 05:01:02 +03:00
++ on-load
|= =vase
=+ !<(old=state vase)
?^ old `this
[(goad &) this]
::
2020-06-10 11:16:25 +03:00
++ on-peek on-peek:def
2021-02-12 05:01:02 +03:00
++ on-save !>([%0 ~])
2020-06-10 11:16:25 +03:00
++ on-watch on-watch:def
--