mirror of
https://github.com/urbit/shrub.git
synced 2024-12-13 16:03:36 +03:00
Make talk's ++prep more robust.
Jumps through a weird hoop to work with non-versioned state.
This commit is contained in:
parent
344fb38bc6
commit
d070c18270
@ -105,11 +105,6 @@
|
||||
{$help $~} :< print usage info
|
||||
== ::
|
||||
++ glyphs `wall`~[">=+-" "}),." "\"'`^" "$%&@"] :< circle char pool '
|
||||
::
|
||||
++ old-state
|
||||
(cork state |=(a/state a(mirrors (~(run by mirrors.a) old-config))))
|
||||
++ old-config
|
||||
{src/(set source) cap/cord fit/filter con/control}
|
||||
--
|
||||
::
|
||||
:> #
|
||||
@ -117,7 +112,7 @@
|
||||
:> #
|
||||
:> functional cores and arms.
|
||||
::
|
||||
|_ {bol/bowl:gall state}
|
||||
|_ {bol/bowl:gall $1 state}
|
||||
::
|
||||
:> # %transition
|
||||
:> prep transition
|
||||
@ -126,14 +121,31 @@
|
||||
++ prep
|
||||
:> adapts state
|
||||
::
|
||||
|= old/(unit old-state)
|
||||
=> |%
|
||||
++ states
|
||||
?(state-0 $%({$1 s/state}))
|
||||
::
|
||||
++ state-0
|
||||
(cork state |=(a/state a(mirrors (~(run by mirrors.a) config-0))))
|
||||
++ config-0
|
||||
{src/(set source) cap/cord fit/filter con/control}
|
||||
--
|
||||
=| mos/(list move)
|
||||
|= old/(unit states)
|
||||
^- (quip move _..prep)
|
||||
?~ old
|
||||
ta-done:ta-init:ta
|
||||
=- [~ ..prep(+<+ `state`u.old(mirrors -))]
|
||||
%- ~(run by mirrors.u.old)
|
||||
|= old-config
|
||||
?+ -.u.old
|
||||
:: $0
|
||||
=+ ole=(state-0 u.old)
|
||||
=- $(old `[%1 ole(mirrors -)])
|
||||
%- ~(run by mirrors.ole)
|
||||
|= config-0
|
||||
[src cap ~ fit con]
|
||||
::
|
||||
$1
|
||||
[mos ..prep(+<+ [%1 (state +.u.old)])]
|
||||
==
|
||||
::
|
||||
:> #
|
||||
:> # %utility
|
||||
|
Loading…
Reference in New Issue
Block a user