clay: shortcircuit identity casts

This commit is contained in:
Joe Bryan 2023-05-16 15:59:04 -04:00
parent c84cf7359b
commit 401776545c

View File

@ -714,6 +714,12 @@
=. stack.nub [~ stack.nub]
?: (~(has in cycle.nub) cast+[a b])
~|(cycle+cast+[a b]^cycle.nub !!)
?: =(a b)
%+ gain-leak cast+a^b
|= nob=state
%- (trace 4 |.("identity shortcircuit"))
=. nub nob
:_(nub vase+same.bud)
?: =([%mime %hoon] [a b])
%- (trace 4 |.("%mime -> %hoon shortcircuit"))
:_(nub [%vase =>(..zuse !>(|=(m=mime q.q.m)))])