shrub/mar/sole/effect.hoon

57 lines
1.4 KiB
Plaintext
Raw Normal View History

2015-04-10 09:57:04 +03:00
::
2015-06-05 03:27:01 +03:00
:::: /hoon/sole-effect/mar
2015-04-10 09:57:04 +03:00
::
/? 314
/- sole
2015-04-10 09:57:04 +03:00
!:
::::
::
[sole .]
2015-04-10 09:57:04 +03:00
|%
++ mar-sole-change :: XX dependency
|_ cha=sole-change
++ grow
|% ++ json
^- ^json
=+ cha
=< (jobe ted/(. ted) ler/a/~[(jone own.ler) (jone his.ler)] ~)
2015-04-14 23:38:37 +03:00
|= det=sole-edit
?- -.det
2015-04-10 09:57:04 +03:00
%nop [%s 'nop']
2015-04-14 23:38:37 +03:00
%mor [%a (turn p.det ..$)]
%del (joba %del (jone p.det))
%set (joba %set (jape (tufa p.det)))
%ins (joba %ins (jobe at/(jone p.det) cha/s/(tuft q.det) ~))
2015-04-10 09:57:04 +03:00
==
--
--
++ wush
|= [wid=@u tan=tang]
^- tape
2015-04-14 23:38:37 +03:00
=+ rolt=|=(a=wall `tape`?~(a ~ ?~(t.a i.a :(weld i.a "\0a" $(a t.a)))))
2015-06-17 00:01:07 +03:00
(rolt (turn (flop tan) |=(a=tank (rolt (wash 0^wid a)))))
2015-04-10 09:57:04 +03:00
::
--
!:
|_ sef=sole-effect
::
++ grab :: convert from
|%
++ noun sole-effect :: clam from %noun
--
++ grow
|%
++ json
^- ^json
?+ -.sef ~|(unsupported-effect/-.sef !!)
%mor [%a (turn p.sef |=(a=sole-effect json(sef a)))]
%err (joba %hop (jone p.sef))
%txt (joba %txt (jape p.sef))
%tan (joba %tan (jape (wush 160 p.sef)))
2015-04-14 03:20:54 +03:00
%det (joba %det json:~(grow mar-sole-change +.sef))
%pro (joba %pro (jobe vis/b/vis.sef tag/s/tag.sef cad/(jape cad.sef) ~))
2015-04-10 09:57:04 +03:00
?(%bel %clr %nex) (joba %act %s -.sef)
==
--
--