urbit/base/mar/sole-effect.hoon

56 lines
1.4 KiB
Plaintext
Raw Normal View History

2015-04-10 09:57:04 +03:00
::
:::: /hook/door/sole-effect/mar
::
/? 314
/- *sole
!:
::::
::
|%
++ 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-04-10 09:57:04 +03:00
(rolt (turn tan |=(a=tank (rolt (wash 0^wid a)))))
::
--
!:
|_ 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)
==
--
--