mirror of
https://github.com/urbit/shrub.git
synced 2025-01-02 01:25:55 +03:00
hoon: refine +fish:ar and +lose:ar
They were not handling the %over and %spec cases correctly. We update the %over cases to recurse as they should, and the %spec cases to +mint and +crop respectively. Co-authored-by: joemfb <joemfb@users.noreply.github.com>
This commit is contained in:
parent
bf9d3752e0
commit
e35fa977a2
@ -8846,9 +8846,14 @@
|
|||||||
%dbug $(skin skin.skin)
|
%dbug $(skin skin.skin)
|
||||||
%help $(skin skin.skin)
|
%help $(skin skin.skin)
|
||||||
%name $(skin skin.skin)
|
%name $(skin skin.skin)
|
||||||
%over $(skin skin.skin)
|
%over ::TODO (find -> tend should just be a function)
|
||||||
%spec $(skin skin.skin)
|
::NOTE might need to guard with +feel, crashing is too strict
|
||||||
%wash [%1 1]
|
~| %oops-guess-you-needed-feel-after-all
|
||||||
|
=+ fid=(find %read wing.skin)
|
||||||
|
?> &(?=(%& -.fid) ?=(%& -.q.p.fid))
|
||||||
|
[%7 [%0 (tend p.p.fid)] $(skin skin.skin, sut p.q.p.fid)]
|
||||||
|
%spec q:(~(mint ut ref) %noun [%fits ~(example ax spec.skin) [&+1 ~]])
|
||||||
|
%wash [%1 1] ::TODO shouldn't this always _match_?
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
:: -gain: make a $type by restricting .ref to .skin
|
:: -gain: make a $type by restricting .ref to .skin
|
||||||
@ -9019,8 +9024,12 @@
|
|||||||
%dbug $(skin skin.skin)
|
%dbug $(skin skin.skin)
|
||||||
%help $(skin skin.skin)
|
%help $(skin skin.skin)
|
||||||
%name $(skin skin.skin)
|
%name $(skin skin.skin)
|
||||||
%over $(skin skin.skin)
|
%over ::TODO if we guard in +fish (+feel), we have to guard again here
|
||||||
%spec $(skin skin.skin)
|
$(skin skin.skin, sut (~(play ut sut) %wing wing.skin))
|
||||||
|
%spec =/ yon $(skin skin.skin)
|
||||||
|
=/ hit (~(play ut sut) ~(example ax spec.skin))
|
||||||
|
?< (~(nest ut hit) | yon)
|
||||||
|
(~(crop ut yon) hit)
|
||||||
%wash ref
|
%wash ref
|
||||||
==
|
==
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user