Merge branch 'lf/md-hook-reload'

This commit is contained in:
Liam Fitzgerald 2021-02-12 12:21:18 +10:00
commit f2f2f24000
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB
2 changed files with 15 additions and 4 deletions

View File

@ -7,6 +7,9 @@
|= force=? |= force=?
:~ [%pass /gall %arvo %g %goad force ~] :~ [%pass /gall %arvo %g %goad force ~]
== ==
+$ state
$@ ~
[%0 ~]
-- --
|_ =bowl:gall |_ =bowl:gall
+* this . +* this .
@ -31,8 +34,13 @@
++ on-fail on-fail:def ++ on-fail on-fail:def
++ on-init on-init:def ++ on-init on-init:def
++ on-leave on-leave:def ++ on-leave on-leave:def
++ on-load on-load:def ++ on-load
|= =vase
=+ !<(old=state vase)
?^ old `this
[(goad &) this]
::
++ on-peek on-peek:def ++ on-peek on-peek:def
++ on-save on-save:def ++ on-save !>([%0 ~])
++ on-watch on-watch:def ++ on-watch on-watch:def
-- --

View File

@ -34,12 +34,15 @@
^- agent:gall ^- agent:gall
|_ =bowl:gall |_ =bowl:gall
+* this . +* this .
def ~(. (default-agent *agent:gall %|) bowl) def ~(. (default-agent this %|) bowl)
++ on-init on-init:def ++ on-init on-init:def
++ on-save !>(state) ++ on-save !>(state)
++ on-load ++ on-load
|= =vase |= =vase
=+ !<(old=versioned-state vase) =/ m-old=(unit versioned-state)
(mole |.(!<(versioned-state vase)))
?~ m-old `this
=* old u.m-old
|^ |^
?: ?=(%2 -.old) ?: ?=(%2 -.old)
`this `this