Closed alexmozaidze closed 10 months ago
Unfortunately this would be a pretty serious blow to the consistency and transparency that Fennel is built upon. We are not going to do this; you can read more about why here: https://fennel-lang.org/values#transparency
Some projects require heavy use of some repetitive operations, and importing the same set of macros over and over again in almost every file is quite tiring. It would be useful to have some way of declaring global macros.
I see it being implemented as a new argument in
fennel.dofile
that determines which file(s) Fennel evaluates for macro definitions:And with that,
main.fnl
and every filemain.fnl
requires will have macros as defined inmacros/global.fnl
.