Thanks for taking time to contribute to Fennel!
Please read this document before making contributions.
buglabel to the issue.
fennel module is the fundamental entry point; it provides the entire
public API for Fennel when it's used inside another program. All other modules
fennel.view are considered compiler internals and do not have a
guaranteed stable API.
src/fennel.fnl: returned when Fennel is embedded programmatically
src/launcher.fnl: handles being launched from the command line
src/fennel/repl.fnl: provides interactive development context
The core modules implement the text->AST->Lua pipeline. The AST used by the compiler is the exact same AST that is exposed to macros.
src/fennel/parser.fnl: turns text of code into an AST
src/fennel/compiler.fnl: turns AST into Lua output
src/fennel/specials.fnl: built-in language constructs written in Lua
src/fennel/macros.fnl: built-in language constructs written in Fennel
src/fennel/utils.fnl: definitions of core AST types and helper functions
Finally there are a few miscellaneous modules:
src/fennel/friend.fnl: emits friendly messages from compiler/parser errors
src/fennel/binary.fnl: produces binary standalone executables
src/fennel/view.fnl: turn Fennel data structures into printable strings
Fennel is written in Fennel. In order to get around the chicken-and-egg problem, we include an old version of the compiler that's used to compile the new version.
old/fennel.lua: older version of Fennel compiler from before self-hosting
old/launcher.lua: older version of the command line launcher
If you want to contribute code to the project, please send patches to the mailing list. (Note that you do not need to subscribe to the mailing list in order to post to it.) We also accept code contributions on the GitHub mirror if you prefer not to use email.
For large changes, please discuss it first either on the mailing list, IRC/Matrix channel, or in the issue tracker before sinking time and effort into something that may not be able to get merged.
mainbranch. The contents of this branch should be the same on Sourcehut as they are on the Github mirror. But make sure that
mainon your copy of the repo matches upstream.
make testallwill test against all supported versions, assuming they're installed. If you don't want to install every supported version of Lua, you can rely on the CI suite to test your patches.
changelog.md. Changes that affect the compiler API should update
api.mdwhile changes to the built-in forms will usually need to update
reference.mdto reflect the new behavior.
If all goes well, we should merge your changes fairly quickly.
Informal discussion of changes is easiest on the IRC/Matrix channel, but the mailing list can also be good for this. More serious proposals should go on the mailing list or issue tracker. There is a possibility that there is already a solution for your problems so be sure that there is a good use case for your changes before opening an issue.