mirror of
https://github.com/urbit/shrub.git
synced 2024-12-29 15:14:17 +03:00
adds type-safety to scry via +nets:wa in the scry-wrappers
This commit is contained in:
parent
9f371aff66
commit
ee84936add
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b95177c581a71c0820323177df52ffe4389a4c77d9d5d08feb44e1fd82a0da23
|
||||
size 15286456
|
||||
oid sha256:ccadeb320517eb506679198684eae00d0d37d28554de5c29f6de4a02b52b22ae
|
||||
size 13599425
|
||||
|
@ -64,7 +64,7 @@
|
||||
++ sley $- {* (unit (set monk)) term beam} :: namespace function
|
||||
(unit (unit cage)) ::
|
||||
++ slyd $- {* (unit (set monk)) term beam} :: super advanced
|
||||
(unit (unit (cask))) ::
|
||||
(unit (unit (cask milt))) ::
|
||||
++ slyt $-({* *} (unit (unit))) :: old namespace
|
||||
+$ vane [=vase =worm]
|
||||
++ vile :: reflexive constants
|
||||
@ -112,10 +112,18 @@
|
||||
?~ dyc ~
|
||||
?. ?=(^ ved) ~
|
||||
=/ ron=@tas u.hyr
|
||||
=+ bed=[[u.fal u.dyc (case p.u.ved)] (flop tyl)]
|
||||
=+ bop=(sod ref ~ ron bed)
|
||||
=/ bed=beam
|
||||
[[u.fal u.dyc (case p.u.ved)] (flop tyl)]
|
||||
=/ bop=(unit (unit (cask milt)))
|
||||
(sod ref ~ ron bed)
|
||||
?~ bop ~
|
||||
?~ u.bop [~ ~]
|
||||
:: XX figure out wth to do about hoon-version
|
||||
::
|
||||
?. ?& ?=([?(%151 %141) *] ref)
|
||||
-:(~(nets wa *worm) +.ref -.q.u.u.bop)
|
||||
==
|
||||
~>(%slog.[0 leaf+"arvo: scry-lost"] ~)
|
||||
[~ ~ +.q.u.u.bop]
|
||||
:: +sloy-light: minimal parsing version of sloy
|
||||
::
|
||||
@ -135,10 +143,18 @@
|
||||
|= [ref=* ron=@tas fal=@p dyc=@tas ved=case tyl=path]
|
||||
:: we do not flop tyl because tyl wouldn't have been flopped by +en-beam
|
||||
::
|
||||
=+ bed=[[fal dyc ved] tyl]
|
||||
=+ bop=(sod ref ~ ron bed)
|
||||
=/ bed=beam
|
||||
[[fal dyc ved] tyl]
|
||||
=/ bop=(unit (unit (cask milt)))
|
||||
(sod ref ~ ron bed)
|
||||
?~ bop ~
|
||||
?~ u.bop [~ ~]
|
||||
:: XX figure out wth to do about hoon-version
|
||||
::
|
||||
?. ?& ?=([?(%151 %141) *] ref)
|
||||
-:(~(nets wa *worm) +.ref -.q.u.u.bop)
|
||||
==
|
||||
~>(%slog.[0 leaf+"arvo: scry-dark"] ~)
|
||||
[~ ~ +.q.u.u.bop]
|
||||
::
|
||||
++ symp :: symbol or empty
|
||||
@ -350,7 +366,7 @@
|
||||
ren/@t
|
||||
bed/beam
|
||||
==
|
||||
^- (unit (unit (cask)))
|
||||
^- (unit (unit (cask milt)))
|
||||
:: ~& [%arvo-scry ren bed]
|
||||
=/ old=scry-sample
|
||||
:* fur
|
||||
@ -360,10 +376,10 @@
|
||||
`coin`[%$ r.bed]
|
||||
(flop s.bed)
|
||||
==
|
||||
^- (unit (unit (cask)))
|
||||
^- (unit (unit (cask milt)))
|
||||
=+ fun=-:(~(slap wa worm.vane) rig [%limb %scry])
|
||||
::
|
||||
%- (unit (unit (cask)))
|
||||
%- (unit (unit (cask milt)))
|
||||
(slum q.fun old)
|
||||
::
|
||||
++ soar :: scrub vane
|
||||
@ -441,12 +457,12 @@
|
||||
|_ now/@da
|
||||
++ beck
|
||||
^- slyd
|
||||
|= {* fur/(unit (set monk)) ron/term bed/beam}
|
||||
^- (unit (unit (cask)))
|
||||
|= {typ/* fur/(unit (set monk)) ron/term bed/beam}
|
||||
^- (unit (unit (cask milt)))
|
||||
=> .(fur ?^(fur fur `[[%& p.bed] ~ ~])) :: XX heinous
|
||||
=+ lal=(end 3 1 ron)
|
||||
=+ ren=(@t (rsh 3 1 ron))
|
||||
|- ^- (unit (unit (cask)))
|
||||
|- ^- (unit (unit (cask milt)))
|
||||
?~ vanes ~
|
||||
?. =(lal label.i.vanes) $(vanes t.vanes)
|
||||
~| [%failed-scry ron bed]
|
||||
|
@ -5570,7 +5570,7 @@
|
||||
%- sloy ^- slyd
|
||||
~/ %intercepted-scry
|
||||
|= [ref=* (unit (set monk)) =term =beam]
|
||||
^- (unit (unit (cask)))
|
||||
^- (unit (unit (cask milt)))
|
||||
:: if the actual scry produces a value, use that value; otherwise use local
|
||||
::
|
||||
=/ scry-response (scry +<.$)
|
||||
@ -5606,7 +5606,7 @@
|
||||
?. -:(nets:wa +.ref `type`p.q.local-cage)
|
||||
[~ ~]
|
||||
::
|
||||
[~ ~ `(cask)`local-cage]
|
||||
[~ ~ local-cage]
|
||||
:: +unblock-clients-on-duct: unblock and produce clients blocked on :build
|
||||
::
|
||||
++ unblock-clients-on-duct
|
||||
|
Loading…
Reference in New Issue
Block a user