5b: Macro Expansion

These functions are used internally by the compiler. They should not be used directly and are only listed here for completeness.

++ah

Tiki engine

Source

++ ah
|_ tik=tiki
++ blue
|= gen=hoon
^- hoon
?. &(?=(%| -.tik) ?=(~ p.tik)) gen
[%tsgr [%$ 3] gen]
::
++ teal
|= mod=spec
^- spec
?: ?=(%& -.tik) mod
[%over [%& 3]~ mod]
::
++ tele
|= syn=skin
^- skin
?: ?=(%& -.tik) syn
[%over [%& 3]~ syn]
::
++ gray
|= gen=hoon
^- hoon
?- -.tik
%& ?~(p.tik gen [%tstr [u.p.tik ~] [%wing q.tik] gen])
%| [%tsls ?~(p.tik q.tik [%ktts u.p.tik q.tik]) gen]
==
::
++ puce
^- wing
?- -.tik
%& ?~(p.tik q.tik [u.p.tik ~])
%| [[%& 2] ~]
==
::
++ wthp |= opt=(list (pair spec hoon))
%+ gray %wthp
[puce (turn opt |=([a=spec b=hoon] [a (blue b)]))]
++ wtkt |=([sic=hoon non=hoon] (gray [%wtkt puce (blue sic) (blue non)]))
++ wtls |= [gen=hoon opt=(list (pair spec hoon))]
%+ gray %wtls
[puce (blue gen) (turn opt |=([a=spec b=hoon] [a (blue b)]))]
++ wtpt |=([sic=hoon non=hoon] (gray [%wtpt puce (blue sic) (blue non)]))
++ wtsg |=([sic=hoon non=hoon] (gray [%wtsg puce (blue sic) (blue non)]))
++ wthx |=(syn=skin (gray [%wthx (tele syn) puce]))
++ wtts |=(mod=spec (gray [%wtts (teal mod) puce]))
--
::

++ax

Spec engine

Source

This core is very large, refer to hoon.hoon for the source.


++ap

Hoon engine

Source

This core is very large, refer to hoon.hoon for the source.