2019-11-05 05:12:23 +03:00
|
|
|
:: lifted directly from ford, should probably be in zuse
|
2020-05-14 09:26:52 +03:00
|
|
|
=, clay
|
|
|
|
=< pile-rule
|
2019-11-05 05:12:23 +03:00
|
|
|
|%
|
2020-05-14 09:26:52 +03:00
|
|
|
++ pile-rule
|
|
|
|
|= pax=path
|
|
|
|
%- full
|
2021-02-17 22:31:20 +03:00
|
|
|
%+ ifix
|
|
|
|
:_ gay
|
2020-05-14 09:26:52 +03:00
|
|
|
:: parse optional /? and ignore
|
|
|
|
::
|
2021-02-17 22:31:20 +03:00
|
|
|
;~(plug gay (punt ;~(plug fas wut gap dem gap)))
|
|
|
|
|^
|
|
|
|
;~ plug
|
|
|
|
%+ cook (bake zing (list (list taut)))
|
|
|
|
%+ rune hep
|
|
|
|
(most ;~(plug com gaw) taut-rule)
|
|
|
|
::
|
|
|
|
%+ cook (bake zing (list (list taut)))
|
|
|
|
%+ rune lus
|
|
|
|
(most ;~(plug com gaw) taut-rule)
|
|
|
|
::
|
|
|
|
%+ rune tis
|
2021-04-07 22:14:13 +03:00
|
|
|
;~(plug sym ;~(pfix gap stap))
|
clay: add /~ ford rune, as /= for directories
Hoon files may want to import nouns from all files in a given directory.
/~ lets you do so, importing as a (map @ta *) (but with typed values).
Note the description as "directories" here, instead of "path prefix".
The behavior, as implemented, will not include /path/hoon for /~ /path,
instead only including /path/more/hoon and more deeply nested files.
This seems to be, generally, the behavior you want, for example when
importing from /app/myapp/* for /app/myapp/hoon.
Actually using the resulting map requires some manual casting, which is
not ideal. Some code style improvement work remains to be done as well.
2021-04-09 02:49:14 +03:00
|
|
|
::
|
|
|
|
%+ rune sig
|
2021-04-10 02:59:26 +03:00
|
|
|
;~((glue gap) sym wyde:vast stap)
|
2021-02-17 22:31:20 +03:00
|
|
|
::
|
|
|
|
%+ rune cen
|
2021-02-24 21:07:45 +03:00
|
|
|
;~(plug sym ;~(pfix gap ;~(pfix cen sym)))
|
2021-02-17 22:31:20 +03:00
|
|
|
::
|
|
|
|
%+ rune buc
|
|
|
|
;~ (glue gap)
|
|
|
|
sym
|
|
|
|
;~(pfix cen sym)
|
|
|
|
;~(pfix cen sym)
|
2019-11-05 05:12:23 +03:00
|
|
|
==
|
|
|
|
::
|
2021-02-17 22:31:20 +03:00
|
|
|
%+ rune tar
|
|
|
|
;~ (glue gap)
|
|
|
|
sym
|
|
|
|
;~(pfix cen sym)
|
2021-04-07 22:14:13 +03:00
|
|
|
stap
|
2019-11-05 05:12:23 +03:00
|
|
|
==
|
2021-02-17 22:31:20 +03:00
|
|
|
::
|
|
|
|
%+ stag %tssg
|
|
|
|
(most gap tall:(vang & pax))
|
2020-05-14 09:26:52 +03:00
|
|
|
==
|
2021-02-17 22:31:20 +03:00
|
|
|
::
|
|
|
|
++ pant
|
|
|
|
|* fel=^rule
|
|
|
|
;~(pose fel (easy ~))
|
|
|
|
::
|
|
|
|
++ mast
|
|
|
|
|* [bus=^rule fel=^rule]
|
|
|
|
;~(sfix (more bus fel) bus)
|
|
|
|
::
|
|
|
|
++ rune
|
|
|
|
|* [bus=^rule fel=^rule]
|
|
|
|
%- pant
|
|
|
|
%+ mast gap
|
|
|
|
;~(pfix fas bus gap fel)
|
|
|
|
--
|
2020-05-14 09:26:52 +03:00
|
|
|
::
|
|
|
|
++ taut-rule
|
|
|
|
%+ cook |=(taut +<)
|
|
|
|
;~ pose
|
|
|
|
(stag ~ ;~(pfix tar sym))
|
|
|
|
;~(plug (stag ~ sym) ;~(pfix tis sym))
|
|
|
|
(cook |=(a=term [`a a]) sym)
|
|
|
|
==
|
2019-11-05 05:12:23 +03:00
|
|
|
--
|